diff --git a/CHANGELOG.md b/CHANGELOG.md index 6220f02..bf2879a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +# 1.11.24 + +- (Fix) Fixed an issue where Token Action Hud Core integration was not working as expected due to TAHC registering its settings much later than expected. +- (Fix) Fixed an issue where some Journals were dark-themed regardles of the dark-theme journals setting. + # 1.11.23 - (System) Blacklisted complex SWADE sheets from dark-theme. diff --git a/modules/dark-theme-hooks.js b/modules/dark-theme-hooks.js index 3e265ce..54895cb 100644 --- a/modules/dark-theme-hooks.js +++ b/modules/dark-theme-hooks.js @@ -60,6 +60,8 @@ Hooks.on("renderJournalTextPageSheet", (app, html, data) => { let frameHtml = journalFrame?.element; if (!frameHtml || frameHtml.length == 0) return; if (frameHtml[0].matches(premiumModuleSelector)) return; + const isDarkJournals = game.settings.get("pf2e-dorako-ui", "theme.enable-dark-theme-journals"); + if (!isDarkJournals) return; frameHtml.closest(".app").find(".journal-entry-content").addClass("dorako-ui dark-theme"); }); diff --git a/modules/misc-hooks.js b/modules/misc-hooks.js index 847e2a9..1c07874 100644 --- a/modules/misc-hooks.js +++ b/modules/misc-hooks.js @@ -49,11 +49,8 @@ Hooks.once("ready", () => { }); Hooks.once("ready", () => { - let tahModuleName = false; - if (game.modules.get("token-action-hud")?.active) tahModuleName = "token-action-hud"; - if (game.modules.get("token-action-hud-core")?.active) tahModuleName = "token-action-hud-core"; - if (!tahModuleName) return; // if no TAH is active, skip - if (game.settings.get(tahModuleName, "style") === "dorakoUI") return; // if setting is already right + if (!game.modules.get("token-action-hud")?.active) return; + if (game.settings.get("token-action-hud", "style") === "dorakoUI") return; if (!game.settings.get("pf2e-dorako-ui", "tah-nag")) return; // if nag has been disabled new Dialog({ title: "Dorako UI - Token Action HUD style", @@ -64,7 +61,33 @@ Hooks.once("ready", () => { enable: { label: "Enable Dorako UI style", callback: () => { - game.settings.set(tahModuleName, "style", "dorakoUI"); + game.settings.set("token-action-hud", "style", "dorakoUI"); + }, + }, + "dont-ask": { + label: "Do nothing, don't ask again", + callback: () => { + game.settings.set("pf2e-dorako-ui", "tah-nag", false); + }, + }, + }, + default: "enable", + }).render(true); +}); + +Hooks.on("tokenActionHudCoreReady", () => { + if (game.settings.get("token-action-hud-core", "style") === "dorakoUI") return; + if (!game.settings.get("pf2e-dorako-ui", "tah-nag")) return; // if nag has been disabled + new Dialog({ + title: "Dorako UI - Token Action HUD Core style", + content: ` +

Token Action HUD Core ships with a setting that matches the style of Dorako UI.

+

Dorako UI can turn the setting on for you (recommended).

`, + buttons: { + enable: { + label: "Enable Dorako UI style", + callback: () => { + game.settings.set("token-action-hud-core", "style", "dorakoUI"); }, }, "dont-ask": {