Corrected remaining cases of 'needReload' to 'needsReload'

This commit is contained in:
WBHarry 2026-07-19 23:21:46 +02:00
parent 27eb4a1430
commit e1337bfbf3
3 changed files with 5 additions and 5 deletions

View file

@ -281,7 +281,7 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo
async onRollReloadCheck(_event, messageData) { async onRollReloadCheck(_event, messageData) {
const message = game.messages.get(messageData._id); const message = game.messages.get(messageData._id);
const needReload = await message.system.action.handleReload?.({ awaitRoll: true }); const needsReload = await message.system.action.handleReload?.({ awaitRoll: true });
await message.update({ 'system.needsReload': needReload }); await message.update({ 'system.needsReload': needsReload });
} }
} }

View file

@ -139,7 +139,7 @@ export default class DHRoll extends BaseRoll {
item?.system.hasReload && item?.system.hasReload &&
action?.type === 'attack' && action?.type === 'attack' &&
reloadSetting === CONFIG.DH.SETTINGS.reloadChoices.auto.id; reloadSetting === CONFIG.DH.SETTINGS.reloadChoices.auto.id;
const needReload = useReload ? await action?.handleReload?.() : false; const needsReload = useReload ? await action?.handleReload?.() : false;
const cls = getDocumentClass('ChatMessage'), const cls = getDocumentClass('ChatMessage'),
msgData = { msgData = {
@ -148,7 +148,7 @@ export default class DHRoll extends BaseRoll {
title: roll.title, title: roll.title,
speaker: cls.getSpeaker({ actor: roll.data?.parent }), speaker: cls.getSpeaker({ actor: roll.data?.parent }),
sound: config.mute ? null : CONFIG.sounds.dice, sound: config.mute ? null : CONFIG.sounds.dice,
system: { ...config, actionDescription, needReload }, system: { ...config, actionDescription, needsReload },
rolls: [roll] rolls: [roll]
}; };

View file

@ -1,6 +1,6 @@
<div class="roll-buttons"> <div class="roll-buttons">
{{#if (eq automationSettings.reload 'button')}} {{#if (eq automationSettings.reload 'button')}}
<button class="roll-reload-check" {{#if needReload}}disabled{{/if}}>{{localize "DAGGERHEART.ACTIONS.Reload.checkReload"}}</button> <button class="roll-reload-check" {{#if needsReload}}disabled{{/if}}>{{localize "DAGGERHEART.ACTIONS.Reload.checkReload"}}</button>
{{/if}} {{/if}}
{{#if areas.length}}<button class="action-areas end-button"><i class="fa-solid fa-crosshairs"></i></button>{{/if}} {{#if areas.length}}<button class="action-areas end-button"><i class="fa-solid fa-crosshairs"></i></button>{{/if}}
{{#if hasDamage}} {{#if hasDamage}}