From 12bcd6e34efea076fa17df3d850a907bdf665f9b Mon Sep 17 00:00:00 2001 From: WBHarry Date: Thu, 12 Feb 2026 18:55:22 +0100 Subject: [PATCH 1/3] Fixed ScenEnvironment menu removing sceneEnvironments when used --- module/applications/ui/sceneNavigation.mjs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/module/applications/ui/sceneNavigation.mjs b/module/applications/ui/sceneNavigation.mjs index 0a3e08a5..67bfe0b4 100644 --- a/module/applications/ui/sceneNavigation.mjs +++ b/module/applications/ui/sceneNavigation.mjs @@ -63,7 +63,8 @@ export default class DhSceneNavigation extends foundry.applications.ui.SceneNavi if (scene.flags.daggerheart.sceneEnvironments[0] !== environment.uuid) { const newEnvironments = scene.flags.daggerheart.sceneEnvironments; const newFirst = newEnvironments.splice( - newEnvironments.findIndex(x => x === environment.uuid) + newEnvironments.findIndex(x => x === environment.uuid), + 1 )[0]; newEnvironments.unshift(newFirst); emitAsGM( From 60cd28ae82cac7da29179881fb5bc7376fffed94 Mon Sep 17 00:00:00 2001 From: WBHarry Date: Thu, 12 Feb 2026 19:03:21 +0100 Subject: [PATCH 2/3] Fixed the fear tracker showing up while supposed to be hidden --- module/applications/ui/fearTracker.mjs | 4 +--- module/systemRegistration/settings.mjs | 2 +- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/module/applications/ui/fearTracker.mjs b/module/applications/ui/fearTracker.mjs index e9c816db..82dda215 100644 --- a/module/applications/ui/fearTracker.mjs +++ b/module/applications/ui/fearTracker.mjs @@ -34,8 +34,6 @@ export default class FearTracker extends HandlebarsApplicationMixin(ApplicationV position: { width: 222, height: 222 - // top: "200px", - // left: "120px" } }; @@ -66,7 +64,7 @@ export default class FearTracker extends HandlebarsApplicationMixin(ApplicationV max = this.maxFear, percent = (current / max) * 100, isGM = game.user.isGM; - // Return the data for rendering + return { display, current, max, percent, isGM }; } diff --git a/module/systemRegistration/settings.mjs b/module/systemRegistration/settings.mjs index 49361877..c4acf7ed 100644 --- a/module/systemRegistration/settings.mjs +++ b/module/systemRegistration/settings.mjs @@ -126,7 +126,7 @@ const registerNonConfigSettings = () => { type: Number, default: 0, onChange: () => { - if (ui.resources) ui.resources.render({ force: true }); + if (ui.resources) ui.resources.render(); ui.combat.render({ force: true }); } }); From e0b3d33f80fdec0a3f0fb30870094f5e32702f62 Mon Sep 17 00:00:00 2001 From: WBHarry Date: Thu, 12 Feb 2026 19:27:03 +0100 Subject: [PATCH 3/3] Added the ability to exclude world compendiums in the Compendium Browser Settings --- lang/en.json | 3 ++- .../dialogs/CompendiumBrowserSettings.mjs | 13 ++++++++++--- module/data/compendiumBrowserSettings.mjs | 3 ++- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/lang/en.json b/lang/en.json index 19317228..4355140e 100755 --- a/lang/en.json +++ b/lang/en.json @@ -355,7 +355,8 @@ "CompendiumBrowserSettings": { "title": "Enable Compendiums", "enableSource": "Enable Source", - "disableSource": "Disable Source" + "disableSource": "Disable Source", + "worldCompendiums": "World Compendiums" }, "ContextMenu": { "disableEffect": "Disable Effect", diff --git a/module/applications/dialogs/CompendiumBrowserSettings.mjs b/module/applications/dialogs/CompendiumBrowserSettings.mjs index 42d0e256..bef54a6f 100644 --- a/module/applications/dialogs/CompendiumBrowserSettings.mjs +++ b/module/applications/dialogs/CompendiumBrowserSettings.mjs @@ -50,13 +50,20 @@ export default class CompendiumBrowserSettings extends HandlebarsApplicationMixi const excludedSourceData = this.browserSettings.excludedSources; const excludedPackData = this.browserSettings.excludedPacks; context.typePackCollections = game.packs.reduce((acc, pack) => { - const { type, label, packageType, packageName, id } = pack.metadata; - if (packageType === 'world' || !CompendiumBrowserSettings.#browserPackTypes.includes(type)) return acc; + const { type, label, packageType, packageName: basePackageName, id } = pack.metadata; + if (!CompendiumBrowserSettings.#browserPackTypes.includes(type)) return acc; + const isWorldPack = packageType === 'world'; + const packageName = isWorldPack ? 'world' : basePackageName; const sourceChecked = !excludedSourceData[packageName] || !excludedSourceData[packageName].excludedDocumentTypes.includes(type); - const sourceLabel = game.modules.get(packageName)?.title ?? game.system.title; + + const sourceLabel = + game.modules.get(packageName)?.title ?? + (isWorldPack + ? game.i18n.localize('DAGGERHEART.APPLICATIONS.CompendiumBrowserSettings.worldCompendiums') + : game.system.title); if (!acc[type]) acc[type] = { label: game.i18n.localize(`DOCUMENT.${type}s`), sources: {} }; if (!acc[type].sources[packageName]) acc[type].sources[packageName] = { label: sourceLabel, checked: sourceChecked, packs: [] }; diff --git a/module/data/compendiumBrowserSettings.mjs b/module/data/compendiumBrowserSettings.mjs index 9e8025dd..ea71c439 100644 --- a/module/data/compendiumBrowserSettings.mjs +++ b/module/data/compendiumBrowserSettings.mjs @@ -24,7 +24,8 @@ export default class CompendiumBrowserSettings extends foundry.abstract.DataMode const pack = game.packs.get(item.pack); if (!pack) return false; - const excludedSourceData = this.excludedSources[pack.metadata.packageName]; + const packageName = pack.metadata.packageType === 'world' ? 'world' : pack.metadata.packageName; + const excludedSourceData = this.excludedSources[packageName]; if (excludedSourceData && excludedSourceData.excludedDocumentTypes.includes(pack.metadata.type)) return true; const excludedPackData = this.excludedPacks[item.pack];