Fixed sync between GM for Combat tracker "initiative encounter type" and "initiative prepared"
This commit is contained in:
@@ -10,6 +10,7 @@ __! Be certain to carefully back up any critical user data before installing thi
|
||||
- Added `itemUuid` to Roll/RnK for technique and weapons to be readable in ChatMessage (use `fromUuid()` / `fromUuidSync()` to get the object).
|
||||
- Added wiki link in system tab.
|
||||
- Removed restriction on technique types when dropping a technique (Sheet and 20Q. #39).
|
||||
- Fixed sync between GM for Combat tracker `initiative encounter type` and `initiative prepared`.
|
||||
|
||||
### OpenDicePicker API usage
|
||||
#### Fitness skill roll for the all combat targets
|
||||
|
||||
@@ -190,8 +190,11 @@ export class DicePickerDialog extends FormApplication {
|
||||
* @param {ActorL5r5e} actor
|
||||
*/
|
||||
set actor(actor) {
|
||||
if (!actor || !(actor instanceof Actor) || !actor.isOwner) {
|
||||
console.info("L5R5E | DP | Actor rejected", actor);
|
||||
if (!actor) {
|
||||
return;
|
||||
}
|
||||
if (actor instanceof Actor || !actor.isOwner) {
|
||||
console.warn("L5R5E | DP | Actor rejected : Not a valid Actor instance or permission was denied", actor);
|
||||
return;
|
||||
}
|
||||
this._actor = actor;
|
||||
|
||||
@@ -25,6 +25,7 @@ export class GmToolbox extends FormApplication {
|
||||
closeOnSubmit: false,
|
||||
submitOnClose: false,
|
||||
submitOnChange: true,
|
||||
minimizable: false,
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -145,7 +145,6 @@ export default class HooksL5r5e {
|
||||
}
|
||||
|
||||
// Buttons Listeners
|
||||
// TODO event for multiple GM
|
||||
html.find(".encounter-control").on("click", (event) => {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
@@ -153,9 +152,7 @@ export default class HooksL5r5e {
|
||||
if (!encounterTypeList.includes(encounter)) {
|
||||
return;
|
||||
}
|
||||
game.settings
|
||||
.set("l5r5e", "initiative-encounter", encounter)
|
||||
.then(() => HooksL5r5e._gmCombatBar(app, html, data));
|
||||
game.settings.set("l5r5e", "initiative-encounter", encounter);
|
||||
});
|
||||
|
||||
html.find(".prepared-control").on("mousedown", (event) => {
|
||||
@@ -171,9 +168,7 @@ export default class HooksL5r5e {
|
||||
true: rev ? "null" : "false",
|
||||
null: rev ? "false" : "true",
|
||||
};
|
||||
game.settings
|
||||
.set("l5r5e", `initiative-prepared-${preparedId}`, nextValue[prepared[preparedId]])
|
||||
.then(() => HooksL5r5e._gmCombatBar(app, html, data));
|
||||
game.settings.set("l5r5e", `initiative-prepared-${preparedId}`, nextValue[prepared[preparedId]]);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -77,6 +77,7 @@ export const RegisterSettings = function () {
|
||||
if (game.settings.get("l5r5e", "initiative-setTn1OnTypeChange")) {
|
||||
game.settings.set("l5r5e", "initiative-difficulty-value", 1);
|
||||
}
|
||||
ui.combat.render(true);
|
||||
},
|
||||
});
|
||||
game.settings.register("l5r5e", "initiative-prepared-character", {
|
||||
|
||||
@@ -61,7 +61,7 @@ export class SocketHandlerL5r5e {
|
||||
}
|
||||
|
||||
/**
|
||||
* Refresh a app by it's htmlId, not windowsId (ex "l5r5e-twenty-questions-dialog-kZHczAFghMNYFRWe", not "65")
|
||||
* Refresh an app by his "id", not "appId" (ex "l5r5e-twenty-questions-dialog-kZHczAFghMNYFRWe", not "65")
|
||||
*
|
||||
* Usage : game.l5r5e.sockets.refreshAppId(appId);
|
||||
*
|
||||
|
||||
@@ -12,7 +12,7 @@ game.l5r5e.sockets.deleteChatMessage(messageId);
|
||||
|
||||
|
||||
## refreshAppId
|
||||
Refresh a application windows by it's `htmlId` (not `windowsId`). Used in RnK.
|
||||
Refresh an application windows by his `id` (not `appId`). Used in RnK.
|
||||
<br>Ex : `l5r5e-twenty-questions-dialog-kZHczAFghMNYFRWe`, not `65`.
|
||||
|
||||
Usage :
|
||||
|
||||
Reference in New Issue
Block a user