Affichage de la fortune

This commit is contained in:
Vincent Vandemeulebrouck 2022-12-14 19:58:52 +01:00
parent f5431b58fb
commit 31c4aa32d9
2 changed files with 3 additions and 1 deletions

View File

@ -11,6 +11,7 @@ import { ReglesOptionelles } from "./settings/regles-optionelles.js";
import { DialogRepos } from "./dialog-repos.js"; import { DialogRepos } from "./dialog-repos.js";
import { RdDSheetUtility } from "./rdd-sheet-utility.js"; import { RdDSheetUtility } from "./rdd-sheet-utility.js";
import { STATUSES } from "./settings/status-effects.js"; import { STATUSES } from "./settings/status-effects.js";
import { Monnaie } from "./item-monnaie.js";
/* -------------------------------------------- */ /* -------------------------------------------- */
/** /**
@ -56,6 +57,7 @@ export class RdDActorSheet extends ActorSheet {
notes: await TextEditor.enrichHTML(this.object.system.notes, {async: true}), notes: await TextEditor.enrichHTML(this.object.system.notes, {async: true}),
notesmj: await TextEditor.enrichHTML(this.object.system.notesmj, {async: true}), notesmj: await TextEditor.enrichHTML(this.object.system.notesmj, {async: true}),
calc: { calc: {
fortune: Monnaie.getFortune(this.actor),
encTotal: await this.actor.computeEncombrementTotalEtMalusArmure(), encTotal: await this.actor.computeEncombrementTotalEtMalusArmure(),
prixTotalEquipement: this.actor.computePrixTotalEquipement(), prixTotalEquipement: this.actor.computePrixTotalEquipement(),
surprise: RdDBonus.find(this.actor.getSurprise(false)).descr, surprise: RdDBonus.find(this.actor.getSurprise(false)).descr,

View File

@ -1,4 +1,4 @@
<span class="item-name"><h4>Argent et Monnaies</h4></span> <span class="item-name"><h4>Argent et Monnaies (fortune: {{calc.fortune}} sols)</h4></span>
<ul class="item-list alterne-list"> <ul class="item-list alterne-list">
{{#each monnaie as |piece id|}} {{#each monnaie as |piece id|}}
<li class="item flexrow list-item" data-item-id="{{piece._id}}"> <li class="item flexrow list-item" data-item-id="{{piece._id}}">