Apply suggestions from code review

Co-authored-by: Carlos Fernandez <CarlosFdez@users.noreply.github.com>
This commit is contained in:
WBHarry 2026-07-19 11:43:48 +02:00 committed by GitHub
parent e2414b167a
commit 274b99d8c6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 4 deletions

View file

@ -282,8 +282,6 @@ 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 needReload = await message.system.action.handleReload?.({ awaitRoll: true });
await message.update({ await message.update({ 'system.needReload': needReload });
'system.needReload': needReload
});
} }
} }

View file

@ -53,7 +53,7 @@ export default class DHAttackAction extends DHDamageAction {
async use(event, options) { async use(event, options) {
if (this.item?.system.needsReload) { if (this.item?.system.needsReload) {
return ui.notifications.error(game.i18n.format('DAGGERHEART.UI.Notifications.reloadRequired', { weapon: this.item.name })); return ui.notifications.error(_loc('DAGGERHEART.UI.Notifications.reloadRequired', { weapon: this.item.name }));
} }
const result = await super.use(event, options); const result = await super.use(event, options);