diff --git a/index.html b/index.html index 82fd736e0..7a3e9439f 100644 --- a/index.html +++ b/index.html @@ -89,6 +89,15 @@ + + +
  • Help diff --git a/src/Faction.js b/src/Faction.js index 3df608161..2cb232617 100644 --- a/src/Faction.js +++ b/src/Faction.js @@ -392,6 +392,9 @@ function displayFactionContent(factionName) { var hacking = false; if (factionName === "NiteSec" || factionName === "The Black Hand") {hacking = true;} Player.startGang(factionName, hacking); + document.getElementById("gang-tab").style.display = "list-item"; + document.getElementById("world-menu-header").click(); + document.getElementById("world-menu-header").click(); Engine.loadGangContent(); yesNoBoxClose(); }); diff --git a/src/Location.js b/src/Location.js index 8c92fe78d..22795f8c3 100644 --- a/src/Location.js +++ b/src/Location.js @@ -1934,6 +1934,9 @@ function initLocationButtons() { name:companyName, }); displayLocationContent(); + document.getElementById("corporation-tab").style.display = "list-item"; + document.getElementById("world-menu-header").click(); + document.getElementById("world-menu-header").click(); dialogBoxCreate("Congratulations! You just started your own corporation. You can visit " + "and manage your company in the City"); return yesNoTxtInpBoxClose(); @@ -1961,6 +1964,9 @@ function initLocationButtons() { Player.bladeburner = new Bladeburner({new:true}); dialogBoxCreate("You have been accepted into the Bladeburner division!"); displayLocationContent(); + document.getElementById("bladeburner-tab").style.display = "list-item"; + document.getElementById("world-menu-header").click(); + document.getElementById("world-menu-header").click(); } else { dialogBoxCreate("Rejected! Please apply again when you have 100 of each combat stat (str, def, dex, agi)"); } diff --git a/src/engine.js b/src/engine.js index b32b6126b..5597eadaa 100644 --- a/src/engine.js +++ b/src/engine.js @@ -150,6 +150,9 @@ let Engine = { factionsMainMenuButton: null, augmentationsMainMenuButton: null, tutorialMainMenuButton: null, + bladeburnerMenuButton: null, + corporationMenuButton: null, + gangMenuButton: null, devMainMenuButton: null, saveMainMenuButton: null, deleteMainMenuButton: null, @@ -547,6 +550,9 @@ let Engine = { document.getElementById("tutorial-menu-link").classList.remove("active"); document.getElementById("options-menu-link").classList.remove("active"); document.getElementById("dev-menu-link").classList.remove("active"); + document.getElementById("bladeburner-menu-link").classList.remove("active"); + document.getElementById("corporation-menu-link").classList.remove("active"); + document.getElementById("gang-menu-link").classList.remove("active"); }, displayCharacterOverviewInfo: function() { @@ -1278,6 +1284,9 @@ let Engine = { var city = document.getElementById("city-tab"); var travel = document.getElementById("travel-tab"); var job = document.getElementById("job-tab"); + var bladeburner = document.getElementById("bladeburner-tab"); + var corp = document.getElementById("corporation-tab"); + var gang = document.getElementById("gang-tab"); var tutorial = document.getElementById("tutorial-tab"); var options = document.getElementById("options-tab"); var dev = document.getElementById("dev-tab"); @@ -1370,6 +1379,12 @@ let Engine = { else {travel.style.display = "none";} if (Player.firstProgramAvailable) {visibleMenuTabs.push(createProgram);} else {createProgram.style.display = "none";} + if(Player.bladeburner instanceof Bladeburner) {visibleMenuTabs.push(bladeburner);} + else {bladeburner.style.display = "none";} + if(Player.corporation instanceof Corporation) {visibleMenuTabs.push(corp);} + else {corp.style.display = "none";} + if(Player.inGang()) {visibleMenuTabs.push(gang);} + else {gang.style.display = "none";} Engine.closeMainMenuHeader(visibleMenuTabs); } else { @@ -1409,6 +1424,9 @@ let Engine = { job.style.display = "none"; travel.style.display = "none"; createProgram.style.display = "none"; + bladeburner.style.display = "none"; + corp.style.display = "none"; + gang.style.display = "none"; Engine.openMainMenuHeader( [terminal, createScript, activeScripts, stats, @@ -1812,16 +1830,22 @@ let Engine = { var travelLink = document.getElementById("travel-menu-link"); var job = document.getElementById("job-tab"); var jobLink = document.getElementById("job-menu-link"); + var bladeburner = document.getElementById("bladeburner-tab"); + var bladeburnerLink = document.getElementById("bladeburner-menu-link"); + var corporation = document.getElementById("corporation-tab"); + var corporationLink = document.getElementById("corporation-menu-link"); + var gang = document.getElementById("gang-tab"); + var gangLink = document.getElementById("gang-menu-link"); this.classList.toggle("opened"); if (city.style.maxHeight) { Engine.toggleMainMenuHeader(false, - [city, travel, job], - [cityLink, travelLink, jobLink] + [city, travel, job, bladeburner, corporation, gang], + [cityLink, travelLink, jobLink, bladeburnerLink, corporationLink, gangLink] ); } else { Engine.toggleMainMenuHeader(true, - [city, travel, job], - [cityLink, travelLink, jobLink] + [city, travel, job, bladeburner, corporation, gang], + [cityLink, travelLink, jobLink, bladeburnerLink, corporationLink, gangLink] ); } } @@ -1919,6 +1943,23 @@ let Engine = { return false; }); + Engine.Clickables.bladeburnerMenuButton = clearEventListeners("bladeburner-menu-link"); + Engine.Clickables.bladeburnerMenuButton.addEventListener("click", function() { + Engine.loadBladeburnerContent(); + return false; + }); + Engine.Clickables.corporationMenuButton = clearEventListeners("corporation-menu-link"); + Engine.Clickables.corporationMenuButton.addEventListener("click", function() { + Engine.loadCorporationContent(); + return false; + }); + Engine.Clickables.gangMenuButton = clearEventListeners("gang-menu-link"); + Engine.Clickables.gangMenuButton.addEventListener("click", function() { + Engine.loadGangContent(); + return false; + }); + + Engine.Clickables.devMainMenuButton = clearEventListeners("dev-menu-link"); Engine.Clickables.devMainMenuButton.addEventListener("click", function() { Engine.loadDevMenuContent();