diff --git a/modules/hawkmoon-actor-sheet.js b/modules/hawkmoon-actor-sheet.js index 2f7785e..952ebe0 100644 --- a/modules/hawkmoon-actor-sheet.js +++ b/modules/hawkmoon-actor-sheet.js @@ -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; diff --git a/system.json b/system.json index 9860828..46f17ac 100644 --- a/system.json +++ b/system.json @@ -1,7 +1,7 @@ { "id": "fvtt-hawkmoon-cyd", "description": "Hawkmoon RPG for FoundryVTT (CYD system - French)", - "version": "10.1.6", + "version": "10.1.7", "authors": [ { "name": "Uberwald/LeRatierBretonnien", @@ -35,7 +35,7 @@ "gridUnits": "m", "license": "LICENSE.txt", "manifest": "https://www.uberwald.me/gitea/public/fvtt-hawkmoon-cyd/raw/branch/master/system.json", - "download": "https://www.uberwald.me/gitea/public/fvtt-hawkmoon-cyd/archive/fvtt-hawkmoon-cyd-10.1.6.zip", + "download": "https://www.uberwald.me/gitea/public/fvtt-hawkmoon-cyd/archive/fvtt-hawkmoon-cyd-10.1.7.zip", "languages": [ { "lang": "fr", diff --git a/templates/actor-sheet.html b/templates/actor-sheet.html index 552d69f..56fea86 100644 --- a/templates/actor-sheet.html +++ b/templates/actor-sheet.html @@ -362,7 +362,7 @@