Merge branch 'main' into release

This commit is contained in:
WBHarry 2025-08-19 20:58:05 +02:00
commit dd045b3df7
3 changed files with 10 additions and 26 deletions

View file

@ -163,7 +163,7 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
const hasRoll = this.getUseHasRoll(byPass); const hasRoll = this.getUseHasRoll(byPass);
return { return {
event, event,
title: `${this.item.name}: ${this.name}`, title: `${this.item.name}: ${game.i18n.localize(this.name)}`,
source: { source: {
item: this.item._id, item: this.item._id,
action: this._id, action: this._id,
@ -208,15 +208,15 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel
} }
async consume(config, successCost = false) { async consume(config, successCost = false) {
const actor= this.actor.system.partner ?? this.actor, const actor = this.actor.system.partner ?? this.actor,
usefulResources = { usefulResources = {
...foundry.utils.deepClone(actor.system.resources), ...foundry.utils.deepClone(actor.system.resources),
fear: { fear: {
value: game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.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, max: game.settings.get(CONFIG.DH.id, CONFIG.DH.SETTINGS.gameSettings.Homebrew).maxFear,
reversed: false reversed: false
} }
}; };
for (var cost of config.costs) { for (var cost of config.costs) {
if (cost.keyIsID) { if (cost.keyIsID) {

View file

@ -73,22 +73,6 @@ export default class DhpChatMessage extends foundry.documents.ChatMessage {
break; 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) { if (!game.user.isGM) {

View file

@ -1,5 +1,5 @@
<div class="daggerheart dh-style tooltip"> <div class="daggerheart dh-style tooltip">
<h2 class="tooltip-title">{{item.name}}</h2> <h2 class="tooltip-title">{{localize item.name}}</h2>
<img class="tooltip-image" src="{{item.img}}" /> <img class="tooltip-image" src="{{item.img}}" />
<div class="tooltip-description">{{{description}}}</div> <div class="tooltip-description">{{{description}}}</div>
{{#if item.uses.max}} {{#if item.uses.max}}