Skip to content

Commit

Permalink
Fix incorrect condition theme on initial load (#8635)
Browse files Browse the repository at this point in the history
  • Loading branch information
CarlosFdez authored Jul 10, 2023
1 parent 06e77fe commit 16d650a
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 9 deletions.
8 changes: 0 additions & 8 deletions src/module/canvas/status-effects.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,14 +24,6 @@ export class StatusEffects {
};

/** Set the theme for condition icons on tokens */
static setIconTheme(): void {
const iconTheme = game.settings.get("pf2e", "statusEffectType");
CONFIG.PF2E.statusEffects.lastIconTheme = iconTheme;
CONFIG.PF2E.statusEffects.iconDir = this.#ICON_THEME_DIRS[iconTheme];
this.#updateStatusIcons();
}

/** Link status effect icons to conditions */
static initialize(): void {
const iconTheme = game.settings.get("pf2e", "statusEffectType");
CONFIG.PF2E.statusEffects.lastIconTheme = iconTheme;
Expand Down
2 changes: 2 additions & 0 deletions src/scripts/hooks/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,8 @@ export const Init = {
element.setAttribute("disabled", "");
}
}

game.pf2e.StatusEffects.initialize();
});
},
};
1 change: 0 additions & 1 deletion src/scripts/hooks/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ export const Setup = {
registerSheets();

CONFIG.controlIcons.defeated = game.settings.get("pf2e", "deathIcon");
game.pf2e.StatusEffects.initialize();

// Assign the homebrew elements to their respective `CONFIG.PF2E` objects
const homebrew = new HomebrewElements();
Expand Down

0 comments on commit 16d650a

Please sign in to comment.