From d7661bea145c7c8e282c17c375248c7150a7d0c9 Mon Sep 17 00:00:00 2001 From: Oliver-Akins Date: Sat, 8 Feb 2025 17:44:59 -0700 Subject: [PATCH] Correct how I'm using CONFIG.ui to be inline with how Foundry uses it --- module/hooks/init.mjs | 3 +++ module/hooks/ready.mjs | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/module/hooks/init.mjs b/module/hooks/init.mjs index 4f1fe6d..a833ced 100644 --- a/module/hooks/init.mjs +++ b/module/hooks/init.mjs @@ -1,6 +1,7 @@ // Applications import { AllItemSheetV1 } from "../Apps/ItemSheets/AllItemSheetV1.mjs"; import { CombinedHeroSheet } from "../Apps/ActorSheets/CombinedHeroSheet.mjs"; +import { CryptApp } from "../Apps/CryptApp.mjs"; import { HeroSkillsCardV1 } from "../Apps/ActorSheets/HeroSkillsCardV1.mjs"; import { HeroSummaryCardV1 } from "../Apps/ActorSheets/HeroSummaryCardV1.mjs"; @@ -28,6 +29,8 @@ import { registerUserSettings } from "../settings/userSettings.mjs"; Hooks.once(`init`, () => { Logger.log(`Initializing`); + CONFIG.ui.crypt = CryptApp; + // #region Settings registerMetaSettings(); registerDevSettings(); diff --git a/module/hooks/ready.mjs b/module/hooks/ready.mjs index 6536a48..596425a 100644 --- a/module/hooks/ready.mjs +++ b/module/hooks/ready.mjs @@ -1,4 +1,3 @@ -import { CryptApp } from "../Apps/CryptApp.mjs"; import { Logger } from "../utils/Logger.mjs"; Hooks.once(`ready`, () => { @@ -19,6 +18,5 @@ Hooks.once(`ready`, () => { if (game.paused) { game.togglePause() }; }; - CONFIG.ui.crypt = new CryptApp(); - CONFIG.ui.crypt.render({ force: true }); + ui.crypt.render({ force: true }); });