From 6ef28abd03df3a58a64d068f47459e528da2d382 Mon Sep 17 00:00:00 2001 From: WBHarry <89362246+WBHarry@users.noreply.github.com> Date: Sun, 3 Aug 2025 14:34:33 +0200 Subject: [PATCH] Fixed Hope&Fear (#538) --- module/applications/ui/chatLog.mjs | 2 +- styles/less/ui/chat/chat.less | 19 +++++++++++++++++-- templates/ui/chat/parts/roll-part.hbs | 18 ++++++++++++------ 3 files changed, 30 insertions(+), 9 deletions(-) diff --git a/module/applications/ui/chatLog.mjs b/module/applications/ui/chatLog.mjs index 151b1cc5..958d0386 100644 --- a/module/applications/ui/chatLog.mjs +++ b/module/applications/ui/chatLog.mjs @@ -223,7 +223,7 @@ export default class DhpChatLog extends foundry.applications.sidebar.tabs.ChatLo if (!confirmed) return; } - const target = event.target.closest('button[data-die-index]'); + const target = event.target.closest('[data-die-index]'); let originalRoll_parsed = message.rolls.map(roll => JSON.parse(roll))[0]; const rollClass = game.system.api.dice[ diff --git a/styles/less/ui/chat/chat.less b/styles/less/ui/chat/chat.less index 99cb981b..941b6896 100644 --- a/styles/less/ui/chat/chat.less +++ b/styles/less/ui/chat/chat.less @@ -467,14 +467,25 @@ > :last-child { margin-bottom: 5px; } + + .roll-die { + position: relative; + + .dice-rerolled { + position: absolute; + top: 0; + right: 0; + font-size: 10px; + z-index: 2; + filter: drop-shadow(0 0 3px black); + } + } } } .roll-result-container { display: flex; justify-content: center; - align-items: center; - gap: 10px; color: var(--text-color); font-weight: 700; font-family: 'Cinzel', sans-serif; @@ -486,6 +497,10 @@ .roll-result-desc { font-size: var(--font-size-16); margin-top: 2px; + + span { + margin-left: 10px; + } } } diff --git a/templates/ui/chat/parts/roll-part.hbs b/templates/ui/chat/parts/roll-part.hbs index f5518936..0d9ce15d 100644 --- a/templates/ui/chat/parts/roll-part.hbs +++ b/templates/ui/chat/parts/roll-part.hbs @@ -4,18 +4,18 @@ {{roll.total}} {{#if roll.isCritical}} - {{localize "DAGGERHEART.GENERAL.criticalShort"}} + {{localize "DAGGERHEART.GENERAL.criticalShort"}} {{else}} {{#if roll.result}} - {{localize "DAGGERHEART.GENERAL.withThing" thing=roll.result.label}} + {{localize "DAGGERHEART.GENERAL.withThing" thing=roll.result.label}} {{/if}} {{/if}} - {{#if roll.difficulty}}difficulty {{roll.difficulty}}{{/if}} + {{#if roll.difficulty}}{{localize "DAGGERHEART.GENERAL.difficulty"}} {{roll.difficulty}}{{/if}}