diff --git a/module/data/action/baseAction.mjs b/module/data/action/baseAction.mjs index 3666b6e7..5d3f7721 100644 --- a/module/data/action/baseAction.mjs +++ b/module/data/action/baseAction.mjs @@ -163,7 +163,7 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel const hasRoll = this.getUseHasRoll(byPass); return { event, - title: `${this.item.name}: ${this.name}`, + title: `${this.item.name}: ${game.i18n.localize(this.name)}`, source: { item: this.item._id, action: this._id, @@ -208,15 +208,15 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel } async consume(config, successCost = false) { - const actor= this.actor.system.partner ?? this.actor, + const actor = this.actor.system.partner ?? this.actor, usefulResources = { - ...foundry.utils.deepClone(actor.system.resources), - fear: { - value: game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Resources.Fear), - max: game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Homebrew).maxFear, - reversed: false - } - }; + ...foundry.utils.deepClone(actor.system.resources), + fear: { + value: game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Resources.Fear), + max: game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Homebrew).maxFear, + reversed: false + } + }; for (var cost of config.costs) { if (cost.keyIsID) { diff --git a/module/dice/damageRoll.mjs b/module/dice/damageRoll.mjs index 427b6273..aa9e1d94 100644 --- a/module/dice/damageRoll.mjs +++ b/module/dice/damageRoll.mjs @@ -37,7 +37,13 @@ export default class DamageRoll extends DHRoll { Object.values(config.damage).flatMap(r => r.parts.map(p => p.roll)) ), diceRoll = Roll.fromTerms([pool]); - await game.dice3d.showForRoll(diceRoll, game.user, true, chatMessage.whisper, chatMessage.blind); + await game.dice3d.showForRoll( + diceRoll, + game.user, + true, + chatMessage.whisper?.length > 0 ? chatMessage.whisper : null, + chatMessage.blind + ); } await super.buildPost(roll, config, message); if (config.source?.message) { diff --git a/module/documents/chatMessage.mjs b/module/documents/chatMessage.mjs index a51686e6..b8667384 100644 --- a/module/documents/chatMessage.mjs +++ b/module/documents/chatMessage.mjs @@ -73,22 +73,6 @@ export default class DhpChatMessage extends foundry.documents.ChatMessage { break; } } - - const autoExpandRoll = game.settings.get( - CONFIG.DH.id, - CONFIG.DH.SETTINGS.gameSettings.appearance - ).expandRollMessage, - rollSections = html.querySelectorAll('.roll-part'), - itemDesc = html.querySelector('.domain-card-move'); - rollSections.forEach(s => { - if (s.classList.contains('roll-section')) { - const toExpand = s.querySelector('[data-action="expandRoll"]'); - toExpand.classList.toggle('expanded', autoExpandRoll.roll); - } else if (s.classList.contains('damage-section')) - s.classList.toggle('expanded', autoExpandRoll.damage); - else if (s.classList.contains('target-section')) s.classList.toggle('expanded', autoExpandRoll.target); - }); - if (itemDesc && autoExpandRoll.desc) itemDesc.setAttribute('open', ''); } if (!game.user.isGM) { diff --git a/system.json b/system.json index d954c6d5..e6b7650f 100644 --- a/system.json +++ b/system.json @@ -2,7 +2,7 @@ "id": "daggerheart", "title": "Daggerheart", "description": "An unofficial implementation of the Daggerheart system", - "version": "1.0.5", + "version": "1.0.6", "compatibility": { "minimum": "13", "verified": "13.347", diff --git a/templates/ui/tooltip/action.hbs b/templates/ui/tooltip/action.hbs index 20929bf3..a3020aff 100644 --- a/templates/ui/tooltip/action.hbs +++ b/templates/ui/tooltip/action.hbs @@ -1,5 +1,5 @@
-

{{item.name}}

+

{{localize item.name}}

{{{description}}}
{{#if item.uses.max}}