Money
This commit is contained in:
@@ -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}),
|
||||
|
@@ -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) {
|
||||
|
Reference in New Issue
Block a user