Make it so that the defaultTab switching works in v13
This commit is contained in:
parent
4773e44f4c
commit
e2d8ae2928
1 changed files with 3 additions and 2 deletions
|
|
@ -5,15 +5,16 @@ Hooks.once(`ready`, () => {
|
|||
|
||||
let defaultTab = game.settings.get(`ripcrypt`, `defaultTab`);
|
||||
if (defaultTab) {
|
||||
if (!ui.sidebar?.tabs?.[defaultTab]) {
|
||||
if (!ui.sidebar?.TABS?.[defaultTab]) {
|
||||
Logger.error(`Couldn't find a sidebar tab with ID:`, defaultTab);
|
||||
} else {
|
||||
Logger.debug(`Switching sidebar tab to:`, defaultTab);
|
||||
ui.sidebar.tabs[defaultTab].activate();
|
||||
ui.sidebar.activateTab(defaultTab);
|
||||
};
|
||||
};
|
||||
|
||||
if (game.settings.get(`ripcrypt`, `devMode`)) {
|
||||
ui.sidebar.expand();
|
||||
if (game.paused) { game.togglePause() };
|
||||
};
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue