Fixed so that players rolling reactions will update the message

This commit is contained in:
WBHarry 2025-12-22 01:00:49 +01:00
parent 99d0eab5bd
commit a1f9d597ed
5 changed files with 12 additions and 9 deletions

View file

@ -262,7 +262,7 @@ export function ActionMixin(Base) {
async toChat(origin) { async toChat(origin) {
const cls = getDocumentClass('ChatMessage'); const cls = getDocumentClass('ChatMessage');
const systemData = { const systemData = {
title: game.i18n.localize('DAGGERHEART.CONFIG.ActionType.action'), title: game.i18n.localize('DAGGERHEART.CONFIG.FeatureForm.action'),
origin: origin, origin: origin,
action: { action: {
name: this.name, name: this.name,

View file

@ -305,7 +305,7 @@ export const registerRollDiceHooks = () => {
if (!config.roll.hasOwnProperty('success') && !config.targets?.length) return; if (!config.roll.hasOwnProperty('success') && !config.targets?.length) return;
const rollResult = config.roll.success || config.targets.some(t => t.hit), const rollResult = config.roll.success || config.targets?.some(t => t.hit),
looseSpotlight = !rollResult || config.roll.result.duality === -1; looseSpotlight = !rollResult || config.roll.result.duality === -1;
if (looseSpotlight && game.combat?.active) { if (looseSpotlight && game.combat?.active) {

View file

@ -73,10 +73,13 @@ export const registerSocketHooks = () => {
Hooks.callAll(socketEvent.Refresh, { refreshType: RefreshType.Countdown }); Hooks.callAll(socketEvent.Refresh, { refreshType: RefreshType.Countdown });
break; break;
case GMUpdateEvent.UpdateSaveMessage: case GMUpdateEvent.UpdateSaveMessage:
const action = await fromUuid(data.update.action), const message = game.messages.get(data.update.message);
message = game.messages.get(data.update.message); if (!message) return;
if (!action || !message) return; game.system.api.fields.ActionFields.SaveField.updateSaveMessage(
action.updateSaveMessage(data.update.result, message, data.update.token); data.update.result,
message,
data.update.token
);
break; break;
} }

View file

@ -2,7 +2,7 @@
<div class="dialog-header-inner"> <div class="dialog-header-inner">
<h1> <h1>
{{#if reactionOverride}} {{#if reactionOverride}}
{{localize "DAGGERHEART.CONFIG.ActionType.reaction"}} {{localize "DAGGERHEART.CONFIG.FeatureForm.reaction"}}
{{else}} {{else}}
{{ifThen rollConfig.headerTitle rollConfig.headerTitle rollConfig.title}} {{ifThen rollConfig.headerTitle rollConfig.headerTitle rollConfig.title}}
{{/if}} {{/if}}

View file

@ -136,7 +136,7 @@
{{localize (concat 'DAGGERHEART.ACTIONS.TYPES.' item.type '.name')}} {{localize (concat 'DAGGERHEART.ACTIONS.TYPES.' item.type '.name')}}
</div> </div>
<div class="tag"> <div class="tag">
{{localize (concat 'DAGGERHEART.CONFIG.ActionType.' item.actionType)}} {{localize (concat 'DAGGERHEART.CONFIG.FeatureForm.' item.actionType)}}
</div> </div>
</div> </div>
{{/if}} {{/if}}
@ -146,7 +146,7 @@
{{localize 'DAGGERHEART.GENERAL.unarmed'}} {{localize 'DAGGERHEART.GENERAL.unarmed'}}
</div> </div>
<div class="tag"> <div class="tag">
{{localize 'DAGGERHEART.CONFIG.ActionType.action'}} {{localize 'DAGGERHEART.CONFIG.FeatureForm.action'}}
</div> </div>
</div> </div>
{{/if}} {{/if}}