From 397b272c2c8a5f0e1a4e69b0087ee0f0d8853c62 Mon Sep 17 00:00:00 2001 From: WBHarry Date: Sun, 20 Oct 2024 22:14:35 +0200 Subject: [PATCH] Removed unintended debug tool --- BestiaryTracking.js | 47 +++++++++++++++++++-------------------- module.json | 2 +- pf2e-bestiary-tracking.js | 1 - scripts/setup.js | 2 +- 4 files changed, 25 insertions(+), 27 deletions(-) diff --git a/BestiaryTracking.js b/BestiaryTracking.js index 28dd955..8f21d1f 100644 --- a/BestiaryTracking.js +++ b/BestiaryTracking.js @@ -9468,8 +9468,7 @@ class BestiaryThemesMenu extends HandlebarsApplicationMixin$5( name: this.customThemes[this.selectedTheme].name, props: { ...this.customThemes[this.selectedTheme].props, - [event.currentTarget.dataset.theme]: - event.currentTarget.value, + [event.currentTarget.dataset.theme]: event.currentTarget.value, }, }; this.render(); @@ -9481,8 +9480,7 @@ class BestiaryThemesMenu extends HandlebarsApplicationMixin$5( name: this.customThemes[this.selectedTheme].name, props: { ...this.customThemes[this.selectedTheme].props, - [event.currentTarget.dataset.theme]: - event.currentTarget.value, + [event.currentTarget.dataset.theme]: event.currentTarget.value, }, }; this.render(); @@ -9494,8 +9492,7 @@ class BestiaryThemesMenu extends HandlebarsApplicationMixin$5( name: this.customThemes[this.selectedTheme].name, props: { ...this.customThemes[this.selectedTheme].props, - [event.currentTarget.dataset.theme]: - event.currentTarget.value, + [event.currentTarget.dataset.theme]: event.currentTarget.value, }, }; this.render(); @@ -9518,10 +9515,10 @@ class BestiaryThemesMenu extends HandlebarsApplicationMixin$5( })); context.backgroundSizeOptions = [ { value: "initial", name: "initial" }, - { value: "cover", name: "cover" } + { value: "cover", name: "cover" }, ]; context.backgroundRepeatOptions = [ - { value: 'no-repeat', name: 'no-repeat' }, + { value: "no-repeat", name: "no-repeat" }, { value: "repeat", name: "repeat" }, { value: "round", name: "round" }, { value: "initial", name: "initial" }, @@ -9562,7 +9559,8 @@ class BestiaryThemesMenu extends HandlebarsApplicationMixin$5( "../../../", )[1]; copyProps["--pf2e-bestiary-tracking-application-header-image"] = - copyProps["--pf2e-bestiary-tracking-application-header-image"] === "ignore" + copyProps["--pf2e-bestiary-tracking-application-header-image"] === + "ignore" ? "" : copyProps["--pf2e-bestiary-tracking-application-header-image"].split( "../../../", @@ -9611,7 +9609,7 @@ class BestiaryThemesMenu extends HandlebarsApplicationMixin$5( "--pf2e-bestiary-tracking-secondary-icon": "#FFFFFF", "--pf2e-bestiary-tracking-application-image-size": "cover", "--pf2e-bestiary-tracking-application-image-repeat": "round", - "--pf2e-bestiary-tracking-application-image-position": "top" + "--pf2e-bestiary-tracking-application-image-position": "top", }, }; this.selectedTheme = id; @@ -9713,19 +9711,17 @@ class BestiaryThemesMenu extends HandlebarsApplicationMixin$5( ? `../../../${updateTheme["--pf2e-bestiary-tracking-application-image"]}` : "ignore"; - updateTheme["--pf2e-bestiary-tracking-application-header-image"] = updateTheme[ - "--pf2e-bestiary-tracking-application-header-image" - ] - ? `../../../${updateTheme["--pf2e-bestiary-tracking-application-header-image"]}` - : "ignore"; + updateTheme["--pf2e-bestiary-tracking-application-header-image"] = + updateTheme["--pf2e-bestiary-tracking-application-header-image"] + ? `../../../${updateTheme["--pf2e-bestiary-tracking-application-header-image"]}` + : "ignore"; setupTheme(updateTheme); } static clearBackgroundImage(_, button) { - this.customThemes[this.selectedTheme].props[ - button.dataset.theme - ] = "ignore"; + this.customThemes[this.selectedTheme].props[button.dataset.theme] = + "ignore"; BestiaryThemesMenu.updateTheme(this.customThemes[this.selectedTheme].props); this.render(); } @@ -9763,9 +9759,10 @@ class BestiaryThemesMenu extends HandlebarsApplicationMixin$5( ["--pf2e-bestiary-tracking-application-image"]: backgroundImage ? `../../../${backgroundImage}` : "ignore", - ["--pf2e-bestiary-tracking-application-header-image"]: headerBackgroundImage - ? `../../../${headerBackgroundImage}` - : "ignore", + ["--pf2e-bestiary-tracking-application-header-image"]: + headerBackgroundImage + ? `../../../${headerBackgroundImage}` + : "ignore", }, }; return acc; @@ -9810,7 +9807,7 @@ class BestiaryThemesMenu extends HandlebarsApplicationMixin$5( }; } -const currentVersion = "1.1.20"; +const currentVersion = "1.1.21"; const bestiaryFolder = "BestiaryTracking Bestiares"; const dataTypeSetup = () => { @@ -9826,7 +9823,10 @@ const setupTheme = (theme) => { const root = document.querySelector(":root"); for (var property of Object.keys(theme)) { if ( - ["--pf2e-bestiary-tracking-application-image", "--pf2e-bestiary-tracking-application-header-image"].includes(property) && + [ + "--pf2e-bestiary-tracking-application-image", + "--pf2e-bestiary-tracking-application-header-image", + ].includes(property) && theme[property] !== "ignore" ) { root.style.setProperty(property, `url("${theme[property]}")`); @@ -17678,7 +17678,6 @@ Hooks.once("ready", async () => { }); Hooks.once("setup", () => { - CONFIG.debug.hooks = true; const userTheme = game.user.getFlag( "pf2e-bestiary-tracking", "bestiary-theme", diff --git a/module.json b/module.json index b4463e4..f2fa56d 100644 --- a/module.json +++ b/module.json @@ -3,7 +3,7 @@ "name": "pf2e-bestiary-tracking", "title": "PF2E Bestiary Tracking", "description": "A module to track known information about enemies for players in a bestiary.", - "version": "1.1.20", + "version": "1.1.21", "authors": [ { "name": "HarryBoy" diff --git a/pf2e-bestiary-tracking.js b/pf2e-bestiary-tracking.js index 69efbaa..3251851 100644 --- a/pf2e-bestiary-tracking.js +++ b/pf2e-bestiary-tracking.js @@ -101,7 +101,6 @@ Hooks.once("ready", async () => { }); Hooks.once("setup", () => { - CONFIG.debug.hooks = true; const userTheme = game.user.getFlag( "pf2e-bestiary-tracking", "bestiary-theme", diff --git a/scripts/setup.js b/scripts/setup.js index 95c47bf..5a74314 100644 --- a/scripts/setup.js +++ b/scripts/setup.js @@ -20,7 +20,7 @@ import { import BestiaryDisplayMenu from "../module/bestiaryDisplayMenu.js"; import BestiaryThemesMenu from "../module/bestiaryThemesMenu.js"; -export const currentVersion = "1.1.20"; +export const currentVersion = "1.1.21"; export const bestiaryFolder = "BestiaryTracking Bestiares"; export const dataTypeSetup = () => {