working as intended

This commit is contained in:
jalensailin
2022-09-01 01:14:59 -04:00
parent 1a63a2318b
commit db2809eac0
3 changed files with 43 additions and 15 deletions
+12
View File
@@ -321,9 +321,21 @@ export class DeltaGreenActorSheet extends ActorSheet {
html.find('.gear-browse').click(ev => {
//game.packs.find(k=>k.collection==="deltagreen.firearms").render(true);
});
html.find('.toggle-lethality').click(event => {
this._toggleLethality(event);
});
}
_toggleLethality(event) {
const itemId = event.target.getAttribute("item-id");
const isLethal = event.target.getAttribute("is-lethal") === "true";
const item = this.actor.data.items.find((i) => i.id === itemId);
item.update({"data.isLethal": !isLethal});
}
_showNewEditTypeSkillDialog(targetSkill, currentLabel, currentGroup){
// TO DO: BUILD DIALOG TO CAPTURE UPDATED DATA