This commit is contained in:
2023-02-21 17:53:00 +01:00
parent d922d77736
commit c8f7c7c1e5
5 changed files with 14 additions and 2 deletions

View File

@@ -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}),

View File

@@ -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) {