diff --git a/module/actor-creature-sheet.js b/module/actor-creature-sheet.js index 218ba08f..215731aa 100644 --- a/module/actor-creature-sheet.js +++ b/module/actor-creature-sheet.js @@ -56,15 +56,15 @@ export class RdDActorCreatureSheet extends RdDActorSheet { if (!this.options.editable) return; // On competence change - html.find('.creature-carac').change((event) => { + html.find('.creature-carac').change(async event => { let compName = event.currentTarget.attributes.compname.value; this.actor.updateCreatureCompetence(compName, "carac_value", parseInt(event.target.value)); }); - html.find('.creature-niveau').change((event) => { + html.find('.creature-niveau').change(async event => { let compName = event.currentTarget.attributes.compname.value; this.actor.updateCreatureCompetence(compName, "niveau", parseInt(event.target.value)); }); - html.find('.creature-dommages').change((event) => { + html.find('.creature-dommages').change(async event => { let compName = event.currentTarget.attributes.compname.value; this.actor.updateCreatureCompetence(compName, "dommages", parseInt(event.target.value)); }); diff --git a/module/actor-entite-sheet.js b/module/actor-entite-sheet.js index aa836cbf..eabaf828 100644 --- a/module/actor-entite-sheet.js +++ b/module/actor-entite-sheet.js @@ -69,59 +69,59 @@ export class RdDActorEntiteSheet extends ActorSheet { if (!this.options.editable) return; // Update Inventory Item - html.find('.item-edit').click(ev => { - const li = $(ev.currentTarget).parents(".item"); + html.find('.item-edit').click(event => { + const li = $(event.currentTarget).parents(".item"); const item = this.actor.getEmbeddedDocument('Item', li.data("itemId")); item.sheet.render(true); }); // Delete Inventory Item - html.find('.item-delete').click(ev => { - const li = $(ev.currentTarget).parents(".item"); + html.find('.item-delete').click(event => { + const li = $(event.currentTarget).parents(".item"); this.actor.deleteEmbeddedDocuments('Item', [li.data("itemId")]); li.slideUp(200, () => this.render(false)); }); // Roll Carac - html.find('.carac-label a').click((event) => { + html.find('.carac-label a').click(async event => { let caracName = event.currentTarget.attributes.name.value; this.actor.rollCarac( caracName.toLowerCase() ); }); // On competence change - html.find('.creature-carac').change((event) => { + html.find('.creature-carac').change(async event => { let compName = event.currentTarget.attributes.compname.value; this.actor.updateCreatureCompetence( compName, "carac_value", parseInt(event.target.value) ); } ); - html.find('.creature-niveau').change((event) => { + html.find('.creature-niveau').change(async event => { let compName = event.currentTarget.attributes.compname.value; this.actor.updateCreatureCompetence( compName, "niveau", parseInt(event.target.value) ); } ); - html.find('.creature-dommages').change((event) => { + html.find('.creature-dommages').change(async event => { let compName = event.currentTarget.attributes.compname.value; this.actor.updateCreatureCompetence( compName, "dommages", parseInt(event.target.value) ); } ); // Roll Skill - html.find('.competence-label a').click((event) => { + html.find('.competence-label a').click(async event => { let compName = event.currentTarget.text; this.actor.rollCompetence( compName ); }); - html.find('.endurance-plus').click((event) => { + html.find('.endurance-plus').click(event => { this.actor.santeIncDec("endurance", 1); this.render(true); }); - html.find('.endurance-moins').click((event) => { + html.find('.endurance-moins').click(event => { this.actor.santeIncDec("endurance", -1); this.render(true); }); - html.find('.encaisser-direct').click(ev => { + html.find('.encaisser-direct').click(event => { this.actor.encaisser(); }); - html.find('.remise-a-neuf').click(ev => { + html.find('.remise-a-neuf').click(event => { if (game.user.isGM) { this.actor.remiseANeuf(); } diff --git a/module/actor-vehicule-sheet.js b/module/actor-vehicule-sheet.js index 8b2f6096..4ae2356c 100644 --- a/module/actor-vehicule-sheet.js +++ b/module/actor-vehicule-sheet.js @@ -103,12 +103,12 @@ export class RdDActorVehiculeSheet extends ActorSheet { if (!this.options.editable) return; // Update Inventory Item - html.find('.item-edit').click(ev => { + html.find('.item-edit').click(async event => { const item = RdDSheetUtility.getItem(event, this.actor); item.sheet.render(true); }); // Delete Inventory Item - html.find('.item-delete').click(ev => { + html.find('.item-delete').click(async event => { const li = RdDSheetUtility.getEventElement(event); RdDUtility.confirmerSuppression(this, li); });