Changed to storing the reloadCheckValue. It's included in notification feedback

This commit is contained in:
WBHarry 2026-07-21 23:45:09 +02:00
parent cb0d22a9a0
commit b345db4f05
6 changed files with 38 additions and 13 deletions

View file

@ -281,7 +281,12 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo
async onRollReloadCheck(_event, messageData) {
const message = game.messages.get(messageData._id);
const needsReload = await message.system.action.handleReload?.({ awaitRoll: true });
await message.update({ 'system.needsReload': needsReload });
const { needsReload, rollValue } = await message.system.action.handleReload?.({ awaitRoll: true });
await message.update({ 'system.reloadCheckValue': rollValue });
if (needsReload)
ui.notifications.info(_loc('DAGGERHEART.UI.Notifications.reloadRequiredRollResponse', { roll: rollValue }));
else
ui.notifications.info(_loc('DAGGERHEART.UI.Notifications.noReloadRequiredRollResponse', { roll: rollValue }));
}
}