mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-19 06:03:50 +01:00
enable/disable dev mode with a global var
This commit is contained in:
parent
a4ef94c0e0
commit
cc5731baae
1
src/devmode.js
Normal file
1
src/devmode.js
Normal file
@ -0,0 +1 @@
|
||||
export const DevModeEnabled = false;
|
@ -24,6 +24,7 @@ import {CONSTANTS} from "./Constants.js";
|
||||
import {Programs, displayCreateProgramContent,
|
||||
getNumAvailableCreateProgram,
|
||||
initCreateProgramButtons} from "./CreateProgram.js";
|
||||
import {DevModeEnabled} from "./devmode.js"
|
||||
import {displayFactionContent, joinFaction,
|
||||
processPassiveFactionRepGain, Factions,
|
||||
inviteToFaction, initFactions} from "./Faction.js";
|
||||
@ -1823,19 +1824,17 @@ let Engine = {
|
||||
var tutorialLink = document.getElementById("tutorial-menu-link");
|
||||
var options = document.getElementById("options-tab");
|
||||
var optionsLink = document.getElementById("options-menu-link");
|
||||
var dev = document.getElementById("dev-tab");
|
||||
var devLink = document.getElementById("dev-menu-link");
|
||||
this.classList.toggle("opened");
|
||||
const elems = [tutorial, options];
|
||||
const links = [tutorialLink, optionsLink];
|
||||
if(DevModeEnabled) {
|
||||
elems.push(document.getElementById("dev-tab"));
|
||||
links.push(document.getElementById("dev-menu-link"));
|
||||
}
|
||||
if (tutorial.style.maxHeight) {
|
||||
Engine.toggleMainMenuHeader(false,
|
||||
[tutorial, options, dev],
|
||||
[tutorialLink, optionsLink, devLink]
|
||||
);
|
||||
Engine.toggleMainMenuHeader(false, elems, links);
|
||||
} else {
|
||||
Engine.toggleMainMenuHeader(true,
|
||||
[tutorial, options, dev],
|
||||
[tutorialLink, optionsLink, devLink]
|
||||
);
|
||||
Engine.toggleMainMenuHeader(true, elems, links);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user