From ff7927896a41d8948f9fcec29a71397cf6365950 Mon Sep 17 00:00:00 2001 From: IrkTheImp <41175833+IrkTheImp@users.noreply.github.com> Date: Sun, 27 Jul 2025 14:52:29 -0500 Subject: [PATCH] fix language display and attribute roll bug (#435) --- .../applications/settings/appearanceSettings.mjs | 2 +- module/helpers/utils.mjs | 14 ++++++++------ 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/module/applications/settings/appearanceSettings.mjs b/module/applications/settings/appearanceSettings.mjs index b4a6be04..533dacff 100644 --- a/module/applications/settings/appearanceSettings.mjs +++ b/module/applications/settings/appearanceSettings.mjs @@ -43,7 +43,7 @@ export default class DHAppearanceSettings extends HandlebarsApplicationMixin(App { id: 'hope', label: 'DAGGERHEART.GENERAL.hope' }, { id: 'fear', label: 'DAGGERHEART.GENERAL.fear' }, { id: 'advantage', label: 'DAGGERHEART.GENERAL.Advantage.full' }, - { id: 'disadvantage', label: 'DAGGERHEART.GENERAL.Advantage.full' } + { id: 'disadvantage', label: 'DAGGERHEART.GENERAL.Disadvantage.full' } ], initial: 'hope' } diff --git a/module/helpers/utils.mjs b/module/helpers/utils.mjs index 93568894..8a302013 100644 --- a/module/helpers/utils.mjs +++ b/module/helpers/utils.mjs @@ -53,12 +53,14 @@ export const getCommandTarget = () => { }; export const setDiceSoNiceForDualityRoll = async (rollResult, advantageState, hopeFaces, fearFaces, advantageFaces) => { - const diceSoNicePresets = await getDiceSoNicePresets(hopeFaces, fearFaces, advantageFaces, advantageFaces); - rollResult.dice[0].options = diceSoNicePresets.hope; - rollResult.dice[1].options = diceSoNicePresets.fear; - if (rollResult.dice[2] && advantageState) { - rollResult.dice[2].options = - advantageState === 1 ? diceSoNicePresets.advantage : diceSoNicePresets.disadvantage; + if (game.modules.get('dice-so-nice')?.active) { + const diceSoNicePresets = await getDiceSoNicePresets(hopeFaces, fearFaces, advantageFaces, advantageFaces); + rollResult.dice[0].options = diceSoNicePresets.hope; + rollResult.dice[1].options = diceSoNicePresets.fear; + if (rollResult.dice[2] && advantageState) { + rollResult.dice[2].options = + advantageState === 1 ? diceSoNicePresets.advantage : diceSoNicePresets.disadvantage; + } } };