mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-11 19:25:21 +01:00
Fixed so that players rolling reactions will update the message (#1455)
This commit is contained in:
parent
659f73116a
commit
16f6fa98a6
6 changed files with 14 additions and 11 deletions
|
|
@ -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,
|
||||||
|
|
|
||||||
|
|
@ -293,7 +293,7 @@ export default class DualityRoll extends D20Roll {
|
||||||
|
|
||||||
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) {
|
||||||
|
|
|
||||||
|
|
@ -21,8 +21,8 @@ export const registerDHSettings = () => {
|
||||||
scope: 'world',
|
scope: 'world',
|
||||||
config: true,
|
config: true,
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
onChange: () => ui.combat.render(),
|
onChange: () => ui.combat.render()
|
||||||
})
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const registerMenuSettings = () => {
|
const registerMenuSettings = () => {
|
||||||
|
|
|
||||||
|
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -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}}
|
||||||
|
|
|
||||||
|
|
@ -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}}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue