Remove the requirement to use devmode for the tab switching to work

This commit is contained in:
Oliver-Akins 2024-01-13 01:24:26 -07:00
parent 2ba9ab2b21
commit e71d2133f2

View file

@ -68,13 +68,13 @@ Hooks.once(`init`, () => {
Hooks.once(`ready`, () => {
console.debug(".dungeon | Ready");
if (game.settings.get(`dotdungeon`, `devMode`)) {
let tab = game.settings.get(`dotdungeon`, `defaultTab`);
if (!ui.sidebar?.tabs?.[tab]) {
console.error(`Couldn't find a sidebar tab with ID:`, tab);
let defaultTab = game.settings.get(`dotdungeon`, `defaultTab`);
if (defaultTab ) {
if (!ui.sidebar?.tabs?.[defaultTab]) {
console.error(`Couldn't find a sidebar tab with ID:`, defaultTab);
} else {
console.debug(`Switching sidebar tab to:`, tab);
ui.sidebar.tabs[tab].activate();
console.debug(`Switching sidebar tab to:`, defaultTab);
ui.sidebar.tabs[defaultTab].activate();
};
};
});