Fix ajout equipements

This commit is contained in:
2022-12-19 10:15:46 +01:00
parent b3ddfb802e
commit 8760e3eb6e
3 changed files with 10 additions and 6 deletions

View File

@@ -148,7 +148,11 @@ export class HawkmoonActorSheet extends ActorSheet {
let armeId = li.data("item-id")
this.actor.rollArmeDegats(armeId)
})
html.find('.item-add').click((event) => {
const itemType = $(event.currentTarget).data("type")
this.actor.createEmbeddedDocuments('Item', [{ name: `Nouveau ${itemType}`, type: itemType }], { renderSheet: true })
})
html.find('.lock-unlock-sheet').click((event) => {
this.options.editScore = !this.options.editScore;