From 92bcaf4962c4d12b341e67395d525352d720c18c Mon Sep 17 00:00:00 2001 From: Carlos Fernandez Date: Fri, 13 Mar 2026 18:09:19 -0400 Subject: [PATCH 1/4] Fix clean type in v14 --- module/data/fields/actionField.mjs | 4 ++-- module/data/fields/actorField.mjs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/module/data/fields/actionField.mjs b/module/data/fields/actionField.mjs index 624985fc..20e4d6f0 100644 --- a/module/data/fields/actionField.mjs +++ b/module/data/fields/actionField.mjs @@ -87,10 +87,10 @@ export class ActionField extends foundry.data.fields.ObjectField { /* -------------------------------------------- */ /** @override */ - _cleanType(value, options) { + _cleanType(value, options, _state) { if (!(typeof value === 'object')) value = {}; const cls = this.getModel(value); - if (cls) return cls.cleanData(value, options); + if (cls) return cls.cleanData(value, options, _state); return value; } diff --git a/module/data/fields/actorField.mjs b/module/data/fields/actorField.mjs index 1399fb32..69ba6bf1 100644 --- a/module/data/fields/actorField.mjs +++ b/module/data/fields/actorField.mjs @@ -52,8 +52,8 @@ class ResourcesField extends fields.TypedObjectField { return key in CONFIG.DH.RESOURCE[this.actorType].all; } - _cleanType(value, options) { - value = super._cleanType(value, options); + _cleanType(value, options, _state) { + value = super._cleanType(value, options, _state); // If not partial, ensure all data exists if (!options.partial) { From 1160f5134797681add35500fad396f89a1effa97 Mon Sep 17 00:00:00 2001 From: Carlos Fernandez Date: Fri, 13 Mar 2026 18:47:55 -0400 Subject: [PATCH 2/4] Fix hasDamage checks on non-attack actions --- module/data/action/baseAction.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/data/action/baseAction.mjs b/module/data/action/baseAction.mjs index eea0d6c4..75fc3981 100644 --- a/module/data/action/baseAction.mjs +++ b/module/data/action/baseAction.mjs @@ -354,11 +354,11 @@ export default class DHBaseAction extends ActionMixin(foundry.abstract.DataModel } get hasDamage() { - return !foundry.utils.isEmpty(this.damage.parts) && this.type !== 'healing'; + return !foundry.utils.isEmpty(this.damage?.parts) && this.type !== 'healing'; } get hasHealing() { - return !foundry.utils.isEmpty(this.damage.parts) && this.type === 'healing'; + return !foundry.utils.isEmpty(this.damage?.parts) && this.type === 'healing'; } get hasSave() { From 7c0ab25e103d7f762863276d97c32b5581b26944 Mon Sep 17 00:00:00 2001 From: WBHarry Date: Sat, 14 Mar 2026 00:10:48 +0100 Subject: [PATCH 3/4] Fixed contextmenu --- module/applications/ux/contextMenu.mjs | 40 -------------------------- 1 file changed, 40 deletions(-) diff --git a/module/applications/ux/contextMenu.mjs b/module/applications/ux/contextMenu.mjs index 6e70da0c..9a308667 100644 --- a/module/applications/ux/contextMenu.mjs +++ b/module/applications/ux/contextMenu.mjs @@ -52,46 +52,6 @@ * @extends {foundry.applications.ux.ContextMenu} */ export default class DHContextMenu extends foundry.applications.ux.ContextMenu { - /** - * @param {HTMLElement|jQuery} container - The HTML element that contains the context menu targets. - * @param {string} selector - A CSS selector which activates the context menu. - * @param {ContextMenuEntry[]} menuItems - An Array of entries to display in the menu - * @param {ContextMenuOptions} [options] - Additional options to configure the context menu. - */ - constructor(container, selector, menuItems, options) { - super(container, selector, menuItems, options); - - /** @deprecated since v13 until v15 */ - this.#jQuery = options.jQuery; - } - - /** - * Whether to pass jQuery objects or HTMLElement instances to callback. - * @type {boolean} - */ - #jQuery; - - /**@inheritdoc */ - activateListeners(menu) { - menu.addEventListener('click', this.#onClickItem.bind(this)); - } - - /** - * Handle click events on context menu items. - * @param {PointerEvent} event The click event - */ - #onClickItem(event) { - event.preventDefault(); - event.stopPropagation(); - const element = event.target.closest('.context-item'); - if (!element) return; - const item = this.menuItems.find(i => i.element === element); - item?.onClick(event, this.#jQuery ? $(this.target) : this.target); - this.close(); - } - - /* -------------------------------------------- */ - /** * Trigger a context menu event in response to a normal click on a additional options button. * @param {PointerEvent} event From 37b088fe7d59c25cc2fbfe738c7cbd4a6c3bd92b Mon Sep 17 00:00:00 2001 From: Carlos Fernandez Date: Fri, 13 Mar 2026 20:00:05 -0400 Subject: [PATCH 4/4] Apply low performance styling to all daggerheart sheets --- styles/less/global/sheet.less | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/styles/less/global/sheet.less b/styles/less/global/sheet.less index 1e7bad0a..6f77a481 100755 --- a/styles/less/global/sheet.less +++ b/styles/less/global/sheet.less @@ -14,11 +14,7 @@ body.game:is(.performance-low, .noblur) { .themed.theme-dark .application.daggerheart.sheet.dh-style, .themed.theme-dark.application.daggerheart.sheet.dh-style, &.theme-dark .application.daggerheart { - &.adversary, - &.character, - &.item { - background: @dark-blue; - } + background: @dark-blue; } }