mirror of
https://github.com/Foundryborne/daggerheart.git
synced 2026-01-12 03:31:07 +01:00
Fixed enricher button; localization fixes; debug cleanup
This commit is contained in:
parent
7d0011792f
commit
3c75c0f6c6
3 changed files with 24 additions and 18 deletions
|
|
@ -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';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue