Fixed enricher button; localization fixes; debug cleanup

This commit is contained in:
Chris Ryan 2025-12-09 12:13:26 +10:00
parent 7d0011792f
commit 3c75c0f6c6
3 changed files with 24 additions and 18 deletions

View file

@ -259,7 +259,16 @@ Hooks.on('chatMessage', (_, message) => {
const { result: rollCommand, flavor } = result;
const fateType = rollCommand.type ?? "Hope";
const fateTypeFromRollCommand = rollCommand?.type ?
(rollCommand?.type?.toLowerCase() == "fear" ? "Fear" :
(rollCommand?.type?.toLowerCase() == "hope" ? "Hope" : "BAD")) : "Hope";
if (fateTypeFromRollCommand == "BAD") {
ui.notifications.error(game.i18n.localize('DAGGERHEART.UI.Notifications.fateParsing'));
return false;
}
const fateType = fateTypeFromRollCommand;
const target = getCommandTarget({ allowNull: true });
const title = fateType + ' Fate Roll';