Added a system setting (appearance) to remove the Countdown UI

This commit is contained in:
WBHarry 2025-11-11 20:59:25 +01:00
parent 84ef1063d8
commit 07b3a1551a
4 changed files with 14 additions and 4 deletions

View file

@ -167,12 +167,14 @@ Hooks.on('setup', () => {
});
Hooks.on('ready', async () => {
const appearanceSettings = game.settings.get(SYSTEM.id, SYSTEM.SETTINGS.gameSettings.appearance);
ui.resources = new CONFIG.ui.resources();
if (game.settings.get(SYSTEM.id, SYSTEM.SETTINGS.gameSettings.appearance).displayFear !== 'hide')
ui.resources.render({ force: true });
if (appearanceSettings.displayFear !== 'hide') ui.resources.render({ force: true });
ui.countdowns = new CONFIG.ui.countdowns();
ui.countdowns.render({ force: true });
if (appearanceSettings.displayCountdownUI) {
ui.countdowns = new CONFIG.ui.countdowns();
ui.countdowns.render({ force: true });
}
if (!(ui.compendiumBrowser instanceof applications.ui.ItemBrowser))
ui.compendiumBrowser = new applications.ui.ItemBrowser();