diff --git a/lang/en.json b/lang/en.json index 2ecdfc9..fdbdef4 100644 --- a/lang/en.json +++ b/lang/en.json @@ -119,6 +119,7 @@ "WH.ui.magicschool": "Magic School", "WH.ui.providedslot": "Provided slot", "WH.ui.skilllevelacquired": "Acquired at level", + "WH.ui.totalmoney": "Total money owned", "WH.chat.save": "Save", "WH.chat.mweaponmalus": "Multiple weapons malus ", diff --git a/modules/warhero-actor-sheet.js b/modules/warhero-actor-sheet.js index 7926ce7..12f30e7 100644 --- a/modules/warhero-actor-sheet.js +++ b/modules/warhero-actor-sheet.js @@ -56,6 +56,7 @@ export class WarheroActorSheet extends ActorSheet { competency: this.actor.getCompetency(), race: duplicate(race), class: duplicate(this.actor.getClass()), + totalMoney: this.actor.computeTotalMoney(), //moneys: duplicate(this.actor.getMoneys()), description: await TextEditor.enrichHTML(this.object.system.biodata.description, {async: true}), notes: await TextEditor.enrichHTML(this.object.system.biodata.notes, {async: true}), diff --git a/modules/warhero-actor.js b/modules/warhero-actor.js index 6319301..139577e 100644 --- a/modules/warhero-actor.js +++ b/modules/warhero-actor.js @@ -174,6 +174,12 @@ export class WarheroActor extends Actor { return listItem } /* -------------------------------------------- */ + computeTotalMoney() { + let nbMoney = 0 + this.items.forEach(it => {if (it.type == 'money') { nbMoney += it.system.quantity} } ) + return nbMoney + } + /* -------------------------------------------- */ buildEquipmentsSlot() { let containers = {} for (let slotName in game.system.warhero.config.slotNames) { diff --git a/system.json b/system.json index f6f4230..b76b3f5 100644 --- a/system.json +++ b/system.json @@ -107,7 +107,7 @@ "styles": [ "styles/simple.css" ], - "version": "10.0.32", + "version": "10.0.33", "compatibility": { "minimum": "10", "verified": "10", @@ -115,7 +115,7 @@ }, "title": "Warhero RPG", "manifest": "https://www.uberwald.me/gitea/public/fvtt-warhero/raw/branch/master/system.json", - "download": "https://www.uberwald.me/gitea/uberwald/fvtt-warhero/archive/fvtt-warhero-10.0.32.zip", + "download": "https://www.uberwald.me/gitea/uberwald/fvtt-warhero/archive/fvtt-warhero-10.0.33.zip", "url": "https://www.uberwald.me/gitea/public/fvtt-warhero", "background": "images/ui/warhero_welcome_page.webp", "id": "fvtt-warhero" diff --git a/templates/actor-sheet.html b/templates/actor-sheet.html index 210e156..9920504 100644 --- a/templates/actor-sheet.html +++ b/templates/actor-sheet.html @@ -428,6 +428,10 @@ {{!-- Equipement Tab --}}
+
+ +
+ {{#each slotEquipments as |slot slotKey|}}