Money
This commit is contained in:
parent
d922d77736
commit
c8f7c7c1e5
@ -119,6 +119,7 @@
|
|||||||
"WH.ui.magicschool": "Magic School",
|
"WH.ui.magicschool": "Magic School",
|
||||||
"WH.ui.providedslot": "Provided slot",
|
"WH.ui.providedslot": "Provided slot",
|
||||||
"WH.ui.skilllevelacquired": "Acquired at level",
|
"WH.ui.skilllevelacquired": "Acquired at level",
|
||||||
|
"WH.ui.totalmoney": "Total money owned",
|
||||||
|
|
||||||
"WH.chat.save": "Save",
|
"WH.chat.save": "Save",
|
||||||
"WH.chat.mweaponmalus": "Multiple weapons malus ",
|
"WH.chat.mweaponmalus": "Multiple weapons malus ",
|
||||||
|
@ -56,6 +56,7 @@ export class WarheroActorSheet extends ActorSheet {
|
|||||||
competency: this.actor.getCompetency(),
|
competency: this.actor.getCompetency(),
|
||||||
race: duplicate(race),
|
race: duplicate(race),
|
||||||
class: duplicate(this.actor.getClass()),
|
class: duplicate(this.actor.getClass()),
|
||||||
|
totalMoney: this.actor.computeTotalMoney(),
|
||||||
//moneys: duplicate(this.actor.getMoneys()),
|
//moneys: duplicate(this.actor.getMoneys()),
|
||||||
description: await TextEditor.enrichHTML(this.object.system.biodata.description, {async: true}),
|
description: await TextEditor.enrichHTML(this.object.system.biodata.description, {async: true}),
|
||||||
notes: await TextEditor.enrichHTML(this.object.system.biodata.notes, {async: true}),
|
notes: await TextEditor.enrichHTML(this.object.system.biodata.notes, {async: true}),
|
||||||
|
@ -174,6 +174,12 @@ export class WarheroActor extends Actor {
|
|||||||
return listItem
|
return listItem
|
||||||
}
|
}
|
||||||
/* -------------------------------------------- */
|
/* -------------------------------------------- */
|
||||||
|
computeTotalMoney() {
|
||||||
|
let nbMoney = 0
|
||||||
|
this.items.forEach(it => {if (it.type == 'money') { nbMoney += it.system.quantity} } )
|
||||||
|
return nbMoney
|
||||||
|
}
|
||||||
|
/* -------------------------------------------- */
|
||||||
buildEquipmentsSlot() {
|
buildEquipmentsSlot() {
|
||||||
let containers = {}
|
let containers = {}
|
||||||
for (let slotName in game.system.warhero.config.slotNames) {
|
for (let slotName in game.system.warhero.config.slotNames) {
|
||||||
|
@ -107,7 +107,7 @@
|
|||||||
"styles": [
|
"styles": [
|
||||||
"styles/simple.css"
|
"styles/simple.css"
|
||||||
],
|
],
|
||||||
"version": "10.0.32",
|
"version": "10.0.33",
|
||||||
"compatibility": {
|
"compatibility": {
|
||||||
"minimum": "10",
|
"minimum": "10",
|
||||||
"verified": "10",
|
"verified": "10",
|
||||||
@ -115,7 +115,7 @@
|
|||||||
},
|
},
|
||||||
"title": "Warhero RPG",
|
"title": "Warhero RPG",
|
||||||
"manifest": "https://www.uberwald.me/gitea/public/fvtt-warhero/raw/branch/master/system.json",
|
"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",
|
"url": "https://www.uberwald.me/gitea/public/fvtt-warhero",
|
||||||
"background": "images/ui/warhero_welcome_page.webp",
|
"background": "images/ui/warhero_welcome_page.webp",
|
||||||
"id": "fvtt-warhero"
|
"id": "fvtt-warhero"
|
||||||
|
@ -428,6 +428,10 @@
|
|||||||
{{!-- Equipement Tab --}}
|
{{!-- Equipement Tab --}}
|
||||||
<div class="tab equipment" data-group="primary" data-tab="equipment">
|
<div class="tab equipment" data-group="primary" data-tab="equipment">
|
||||||
|
|
||||||
|
<div class="flexrow">
|
||||||
|
<label class="">{{localize "WH.ui.totalmoney"}} : {{totalMoney}}</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
{{#each slotEquipments as |slot slotKey|}}
|
{{#each slotEquipments as |slot slotKey|}}
|
||||||
<ul class="item-list alternate-list">
|
<ul class="item-list alternate-list">
|
||||||
<li class="item flexrow list-item items-title-bg {{#if (gt slot.slotUsed slot.nbslots)}}items-title-bg-red{{/if}}">
|
<li class="item flexrow list-item items-title-bg {{#if (gt slot.slotUsed slot.nbslots)}}items-title-bg-red{{/if}}">
|
||||||
|
Reference in New Issue
Block a user