From b67f230212cff8dff463f2eed2e41481c5b5d00b Mon Sep 17 00:00:00 2001 From: Vincent Vandemeulebrouck Date: Fri, 23 Sep 2022 00:57:02 +0200 Subject: [PATCH] =?UTF-8?q?Fix=20actionPrincipale=20de=20l'=C3=A9quipement?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- module/item.js | 4 ++-- templates/actor-sheet-inventaire-item.html | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/module/item.js b/module/item.js index 3e8a8cd9..7544d17d 100644 --- a/module/item.js +++ b/module/item.js @@ -148,10 +148,10 @@ export class RdDItem extends Item { getActionPrincipale(options = { warnIfNot: true }) { const warn = options.warnIfNot; switch (this.type) { - case 'nourritureboisson': return this._actionOrWarnQuantiteZero(this.boisson ? 'Boire' : 'Manger', warn); + case 'nourritureboisson': return this._actionOrWarnQuantiteZero(this.system.boisson ? 'Boire' : 'Manger', warn); case 'potion': return this._actionOrWarnQuantiteZero('Boire', warn); case 'livre': return this._actionOrWarnQuantiteZero('Lire', warn); - case 'conteneur': return this._actionOrWarnQuantiteZero('Ouvrir', warn); + case 'conteneur': return 'Ouvrir'; case 'herbe': return this.isHerbeAPotion() ? this._actionOrWarnQuantiteZero('Décoction', warn) : undefined; case 'queue': case 'ombre': return this.system.refoulement>0 ? 'Refouler' : undefined; } diff --git a/templates/actor-sheet-inventaire-item.html b/templates/actor-sheet-inventaire-item.html index b7c4629e..74d14643 100644 --- a/templates/actor-sheet-inventaire-item.html +++ b/templates/actor-sheet-inventaire-item.html @@ -40,8 +40,8 @@ {{/if}} - {{#if item.actionPrincipale}} - {{item.actionPrincipale}} + {{#if item.system.actionPrincipale}} + {{item.system.actionPrincipale}} {{/if}}