Fixed sync between GM for Combat tracker "initiative encounter type" and "initiative prepared"

This commit is contained in:
Vlyan
2022-07-28 12:27:25 +02:00
parent 7a8ad990a6
commit fc07ee9f46
7 changed files with 12 additions and 11 deletions

View File

@@ -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]]);
});
}