Skip to content

Commit

Permalink
Removed unintended debug tool
Browse files Browse the repository at this point in the history
  • Loading branch information
WBHarry committed Oct 20, 2024
1 parent c987783 commit 397b272
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 27 deletions.
47 changes: 23 additions & 24 deletions BestiaryTracking.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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();
Expand All @@ -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();
Expand All @@ -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" },
Expand Down Expand Up @@ -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(
"../../../",
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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();
}
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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 = () => {
Expand All @@ -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]}")`);
Expand Down Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion module.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion pf2e-bestiary-tracking.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
2 changes: 1 addition & 1 deletion scripts/setup.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 = () => {
Expand Down

0 comments on commit 397b272

Please sign in to comment.