From c802087940b69f2b11811084feb50e2dd17876fa Mon Sep 17 00:00:00 2001 From: Dorako Date: Sun, 8 Sep 2024 18:51:59 +0200 Subject: [PATCH] 3.5.16 --- CHANGELOG.md | 5 +++++ esmodules/consts.js | 2 +- esmodules/ui-theme.js | 9 +++++---- 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 45ca25e..6ab7e71 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# 3.5.16 + +- (Refinement) Removed some logspam. +- (Refinement) Excluded one more PF2e Graphics application from theming. + # 3.5.15 - (Refinement) Excluded the applications windows from PF2e Graphics from theming. diff --git a/esmodules/consts.js b/esmodules/consts.js index 78dd6e4..49aa8f6 100644 --- a/esmodules/consts.js +++ b/esmodules/consts.js @@ -27,4 +27,4 @@ export const unlimitedScopeApplications = ["PlaylistDirectory"]; /* ----------------------------------------- */ /* Excluded */ /* ----------------------------------------- */ -export const excludedApplications = ["ActorAnimationsApp","AnimationHistoryApp", "UserAnimationsApp", "WorldAnimationsApp","JSONEditorApp", "VCEChatLog", "AutorecMenuApp","GmScreenApplicationDrawer","MixerApp","EnhancedJournal","PartyOverviewApp","KingdomBuilder","ChatLogPF2e","ItemMenuApp","LevelsUI", "SpecialEffectsManagement", "ParticleEffectsManagement", "FilterEffectsManagementConfig"]; // \ No newline at end of file +export const excludedApplications = ["ItemAnimationsApp","ActorAnimationsApp","AnimationHistoryApp", "UserAnimationsApp", "WorldAnimationsApp","JSONEditorApp", "VCEChatLog", "AutorecMenuApp","GmScreenApplicationDrawer","MixerApp","EnhancedJournal","PartyOverviewApp","KingdomBuilder","ChatLogPF2e","ItemMenuApp","LevelsUI", "SpecialEffectsManagement", "ParticleEffectsManagement", "FilterEffectsManagementConfig"]; // \ No newline at end of file diff --git a/esmodules/ui-theme.js b/esmodules/ui-theme.js index 2002e4f..b9b9099 100644 --- a/esmodules/ui-theme.js +++ b/esmodules/ui-theme.js @@ -136,6 +136,9 @@ for (const appName of [...systemSheets, ...moduleWindowApps]) { Hooks.on("render" + appName, (app, html, data) => { const theme = game.settings.get("pf2e-dorako-ui", "theme.window-app-theme"); if (theme === "no-theme") return; + const uiTheme = lookupThemeAndSchemeForKey(theme); + if (uiTheme === null) return; + const { dorakoUiTheme, colorScheme } = uiTheme; if ( game.modules.get("sf2e-playtest-deluxe-adventure-pack")?.active && app.constructor.name === "CharacterSheetPF2e" @@ -145,12 +148,10 @@ for (const appName of [...systemSheets, ...moduleWindowApps]) { ); return; } - const uiTheme = lookupThemeAndSchemeForKey(theme); - if (uiTheme === null) return; - const { dorakoUiTheme, colorScheme } = uiTheme; + const excludeString = game.settings.get("pf2e-dorako-ui", "customization.excluded-applications"); const excludeList = excludeString.split(/[\s,]+/); - if (excludeList.includes(app.constructor.name)) { + if (excludeList.includes(app.constructor.name) || excludedApplications.includes(app.constructor.name)) { console.debug( `${MODULE_NAME} | render${app.constructor.name} | is included in excluded applications string ${excludeString} => do not set dorako-ui-theme to ${dorakoUiTheme}` );