Added setting registration status (closes #20)

This commit is contained in:
Oliver 2025-12-09 21:54:29 -07:00
parent b3119f5287
commit dfcbef81ef
16 changed files with 68 additions and 19 deletions

View file

@ -20,6 +20,9 @@ import { HotbarSettingsMenu } from "./apps/HotbarSettingsMenu.mjs";
// Misc
import { __ID__ } from "./consts.mjs";
const { deepFreeze } = foundry.utils;
const status = {};
Hooks.on(`setup`, () => {
game.settings.registerMenu(__ID__, `devSettings`, {
@ -29,8 +32,8 @@ Hooks.on(`setup`, () => {
restricted: false,
type: DevSettingsMenu,
});
addGlobalDocReferrer();
autoUnpauseOnLoad();
status.addGlobalDocReferrer = addGlobalDocReferrer();
status.autoUnpauseOnLoad = autoUnpauseOnLoad();
game.settings.registerMenu(__ID__, `hotbarSettings`, {
name: `OFT.menu.hotbarSettings.name`,
@ -39,13 +42,18 @@ Hooks.on(`setup`, () => {
restricted: false,
type: HotbarSettingsMenu,
});
hotbarButtonSize();
hotbarButtonGap();
repositionHotbar();
status.hotbarButtonSize = hotbarButtonSize();
status.hotbarButtonGap = hotbarButtonGap();
status.repositionHotbar = repositionHotbar();
chatSidebarBackground();
startSidebarExpanded();
startingSidebarTab();
preventTokenRotation();
preventUserConfigOpen();
status.chatSidebarBackground = chatSidebarBackground();
status.startSidebarExpanded = startSidebarExpanded();
status.startingSidebarTab = startingSidebarTab();
status.preventTokenRotation = preventTokenRotation();
status.preventUserConfigOpen = preventUserConfigOpen();
Hooks.callAll(`oft.settingStatuses`, deepFreeze(status));
game.modules.get(__ID__).api = deepFreeze({
registered: status,
});
});