diff --git a/lang/en.json b/lang/en.json index d0b8d0f7..c3b9284f 100755 --- a/lang/en.json +++ b/lang/en.json @@ -1326,11 +1326,6 @@ "short": "V. Far" } }, - "ReloadChoices": { - "off": { "label": "Don't Use" }, - "button": { "label": "Use button" }, - "auto": { "label": "Automatic" } - }, "RollTypes": { "trait": { "name": "Trait" diff --git a/module/applications/sheets/actors/character.mjs b/module/applications/sheets/actors/character.mjs index b88ec6fd..5107df12 100644 --- a/module/applications/sheets/actors/character.mjs +++ b/module/applications/sheets/actors/character.mjs @@ -964,9 +964,8 @@ export default class CharacterSheet extends DHBaseActorSheet { if (!item || !item.system.resource?.max) return; - await item.update({ - 'system.resource.value': item.system.needsReload ? - itemAbleRollParse(item.system.resource.max, this.document, item) : 0 + await item.update({ 'system.resource.value': + item.system.needsReload ? itemAbleRollParse(item.system.resource.max, this.document, item) : 0 }) } diff --git a/module/applications/ui/chatLog.mjs b/module/applications/ui/chatLog.mjs index 4ef19b4b..35a4a966 100644 --- a/module/applications/ui/chatLog.mjs +++ b/module/applications/ui/chatLog.mjs @@ -282,6 +282,8 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo async onRollReloadCheck(_event, messageData) { const message = game.messages.get(messageData._id); const needReload = await message.system.action.handleReload?.({ awaitRoll: true }); - await message.update({ 'system.needsReload': needReload }); + await message.update({ + 'system.needReload': needReload + }); } } diff --git a/module/config/settingsConfig.mjs b/module/config/settingsConfig.mjs index 33cce535..9e061cdc 100644 --- a/module/config/settingsConfig.mjs +++ b/module/config/settingsConfig.mjs @@ -63,14 +63,14 @@ export const actionAutomationChoices = { export const reloadChoices = { off: { id: 'off', - label: 'DAGGERHEART.CONFIG.ReloadChoices.off.label' + label: 'Don\'t Use' }, button: { id: 'button', - label: 'DAGGERHEART.CONFIG.ReloadChoices.button.label' + label: 'Use Button' }, auto: { id: 'auto', - label: 'DAGGERHEART.CONFIG.ReloadChoices.auto.label' + label: 'Automatic' } }; \ No newline at end of file diff --git a/module/data/action/attackAction.mjs b/module/data/action/attackAction.mjs index 1922140c..934cbbae 100644 --- a/module/data/action/attackAction.mjs +++ b/module/data/action/attackAction.mjs @@ -53,7 +53,7 @@ export default class DHAttackAction extends DHDamageAction { async use(event, options) { if (this.item?.system.needsReload) { - return ui.notifications.error(_loc('DAGGERHEART.UI.Notifications.reloadRequired', { weapon: this.item.name })); + return ui.notifications.error(game.i18n.format('DAGGERHEART.UI.Notifications.reloadRequired', { weapon: this.item.name })); } const result = await super.use(event, options); diff --git a/module/data/chat-message/actorRoll.mjs b/module/data/chat-message/actorRoll.mjs index 7071ed1e..f32a0736 100644 --- a/module/data/chat-message/actorRoll.mjs +++ b/module/data/chat-message/actorRoll.mjs @@ -42,7 +42,7 @@ export default class DHActorRoll extends foundry.abstract.TypeDataModel { hasEffect: new fields.BooleanField({ initial: false }), hasSave: new fields.BooleanField({ initial: false }), hasTarget: new fields.BooleanField({ initial: false }), - needsReload: new fields.BooleanField({ initial: false }), + needReload: new fields.BooleanField({ initial: false }), isDirect: new fields.BooleanField({ initial: false }), onSave: new fields.StringField(), source: new fields.SchemaField({ diff --git a/templates/ui/chat/roll.hbs b/templates/ui/chat/roll.hbs index ab4e197e..1875a645 100644 --- a/templates/ui/chat/roll.hbs +++ b/templates/ui/chat/roll.hbs @@ -2,9 +2,9 @@
{{localize "DAGGERHEART.ACTIONS.Reload.reloadRequired"}}
{{/if}}