From 6bfb25325f9c3381dca4bed6ae7d092a96526f33 Mon Sep 17 00:00:00 2001 From: Dapoulp <74197441+Dapoulp@users.noreply.github.com> Date: Sun, 1 Jun 2025 23:40:10 +0200 Subject: [PATCH 1/3] Feature/89 gm fear display (#102) * gm fear display * clean up * Make Fear Panel resizable * Update for evil light mode * Fix clients fear update --- module/applications/resources.mjs | 1 - module/applications/settings.mjs | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/module/applications/resources.mjs b/module/applications/resources.mjs index 535a1631..86f85178 100644 --- a/module/applications/resources.mjs +++ b/module/applications/resources.mjs @@ -105,6 +105,5 @@ export default class Resources extends HandlebarsApplicationMixin(ApplicationV2) if(!game.user.isGM) return; value = Math.max(0, Math.min(this.maxFear, value)); await game.settings.set(SYSTEM.id, SYSTEM.SETTINGS.gameSettings.Resources.Fear, value); - await this.render(true); } } \ No newline at end of file diff --git a/module/applications/settings.mjs b/module/applications/settings.mjs index c86af3a7..4a885d17 100644 --- a/module/applications/settings.mjs +++ b/module/applications/settings.mjs @@ -179,7 +179,10 @@ export const registerDHSettings = () => { scope: 'world', config: false, type: Number, - default: 0 + default: 0, + onChange: () => { + if(ui.resources) ui.resources.render({force: true}); + } }); game.settings.register(SYSTEM.id, SYSTEM.SETTINGS.gameSettings.Resources.MaxFear, { From 43b0c626c4d83179d522a756a5cd4a69bff06c67 Mon Sep 17 00:00:00 2001 From: WBHarry Date: Mon, 2 Jun 2025 21:34:10 +0200 Subject: [PATCH 2/3] Restored ChatMessage functionality --- module/applications/chatMessage.mjs | 4 ++++ styles/daggerheart.css | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/module/applications/chatMessage.mjs b/module/applications/chatMessage.mjs index a8cf6f50..256e46b3 100644 --- a/module/applications/chatMessage.mjs +++ b/module/applications/chatMessage.mjs @@ -3,6 +3,10 @@ import { DualityRollColor } from '../data/settings/Appearance.mjs'; export default class DhpChatMessage extends ChatMessage { async renderHTML() { + if (this.type === 'dualityRoll' || this.type === 'adversaryRoll' || this.type === 'abilityUse') { + this.content = await foundry.applications.handlebars.renderTemplate(this.content, this.system); + } + /* We can change to fully implementing the renderHTML function if needed, instead of augmenting it. */ const html = await super.renderHTML(); diff --git a/styles/daggerheart.css b/styles/daggerheart.css index a5550802..a99ffbd7 100755 --- a/styles/daggerheart.css +++ b/styles/daggerheart.css @@ -2889,14 +2889,14 @@ div.daggerheart.views.multiclass { font-style: normal; font-weight: 400; font-display: swap; - src: url(https://fonts.gstatic.com/s/cinzel/v23/8vIU7ww63mVu7gtR-kwKxNvkNOjw-tbnTYo.ttf) format('truetype'); + src: url(https://fonts.gstatic.com/s/cinzel/v25/8vIU7ww63mVu7gtR-kwKxNvkNOjw-tbnTYo.ttf) format('truetype'); } @font-face { font-family: 'Cinzel'; font-style: normal; font-weight: 700; font-display: swap; - src: url(https://fonts.gstatic.com/s/cinzel/v23/8vIU7ww63mVu7gtR-kwKxNvkNOjw-jHgTYo.ttf) format('truetype'); + src: url(https://fonts.gstatic.com/s/cinzel/v25/8vIU7ww63mVu7gtR-kwKxNvkNOjw-jHgTYo.ttf) format('truetype'); } @font-face { font-family: 'Cinzel Decorative'; From 32730b3aac1c157763b750419ca1d66b23434770 Mon Sep 17 00:00:00 2001 From: Dapoulp <74197441+Dapoulp@users.noreply.github.com> Date: Wed, 4 Jun 2025 00:46:05 +0200 Subject: [PATCH 3/3] Feature/89 gm fear display (#104) * gm fear display * clean up * Make Fear Panel resizable * Update for evil light mode * Fix clients fear update * minimizable false * hover animation * fix --- module/applications/resources.mjs | 13 +++++++------ styles/resources.less | 7 ++++++- 2 files changed, 13 insertions(+), 7 deletions(-) diff --git a/module/applications/resources.mjs b/module/applications/resources.mjs index 86f85178..b25e374f 100644 --- a/module/applications/resources.mjs +++ b/module/applications/resources.mjs @@ -20,14 +20,15 @@ export default class Resources extends HandlebarsApplicationMixin(ApplicationV2) classes: [], tag: "div", window: { - frame: true, - title: "Fear", - positioned: true, - resizable: true + frame: true, + title: "Fear", + positioned: true, + resizable: true, + minimizable: false }, actions: { - setFear: Resources.setFear, - increaseFear: Resources.increaseFear + setFear: Resources.setFear, + increaseFear: Resources.increaseFear }, position: { width: 222, diff --git a/styles/resources.less b/styles/resources.less index 71a00c59..ce0f9560 100644 --- a/styles/resources.less +++ b/styles/resources.less @@ -2,12 +2,17 @@ --primary-color-fear: rgba(9, 71, 179, .75); --secondary-color-fear: rgba(9, 71, 179, .75); --shadow-text-stroke: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000; + --fear-animation : background .3s ease, box-shadow .3s ease, border-color .3s ease, opacity .3s ease; } #resources { min-height: calc(var(--header-height) + 4rem); min-width: 4rem; color: #d3d3d3; + transition: var(--fear-animation); + header, .controls, .window-resize-handle { + transition: var(--fear-animation); + } .window-content { padding: .5rem; #resource-fear { @@ -104,7 +109,7 @@ box-shadow: unset; border-color: transparent; header, .controls, .window-resize-handle { - visibility: hidden; + opacity: 0; } } &:has(.fear-bar) {