Fixed so that players rolling reactions will update the message (#1455)

This commit is contained in:
WBHarry 2025-12-22 14:34:43 +01:00 committed by GitHub
parent 659f73116a
commit 16f6fa98a6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 14 additions and 11 deletions

View file

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

View file

@ -293,7 +293,7 @@ export default class DualityRoll extends D20Roll {
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;
if (looseSpotlight && game.combat?.active) {

View file

@ -21,8 +21,8 @@ export const registerDHSettings = () => {
scope: 'world',
config: true,
type: Boolean,
onChange: () => ui.combat.render(),
})
onChange: () => ui.combat.render()
});
};
const registerMenuSettings = () => {

View file

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

View file

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

View file

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