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

View File

@ -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 ",

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

View File

@ -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"

View File

@ -428,6 +428,10 @@
{{!-- Equipement Tab --}}
<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|}}
<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}}">