Feuille de véhicule avec compteurs

This commit is contained in:
Vincent Vandemeulebrouck
2022-11-28 21:01:28 +01:00
parent e35f77b5a8
commit 7557d33c73
3 changed files with 56 additions and 19 deletions

View File

@ -18,5 +18,22 @@ export class RdDActorVehiculeSheet extends RdDActorSheet {
});
}
activateListeners(html) {
super.activateListeners(html);
if (!this.options.editable) return;
html.find('.resistance-moins').click(async event => {
this.actor.vehicleIncDec("resistance", -1);
});
html.find('.resistance-plus').click(async event => {
this.actor.vehicleIncDec("resistance", 1);
});
html.find('.structure-moins').click(async event => {
this.actor.vehicleIncDec("structure", -1);
});
html.find('.structure-plus').click(async event => {
this.actor.vehicleIncDec("structure", 1);
});
}
}