added shortcuts to corp, gang and blade under the world tab

This commit is contained in:
Olivier Gagnon 2018-07-12 22:22:28 -04:00
parent 3ffc820519
commit 6514632b43
4 changed files with 63 additions and 4 deletions

@ -89,6 +89,15 @@
<li id="job-tab" class="mainmenu-accordion-panel"> <li id="job-tab" class="mainmenu-accordion-panel">
<a id="job-menu-link">Job</a> <a id="job-menu-link">Job</a>
</li> </li>
<li id="bladeburner-tab" class="mainmenu-accordion-panel">
<a id="bladeburner-menu-link"> Bladeburner </a>
</li>
<li id="corporation-tab" class="mainmenu-accordion-panel">
<a id="corporation-menu-link"> Corp </a>
</li>
<li id="gang-tab" class="mainmenu-accordion-panel">
<a id="gang-menu-link"> Gang </a>
</li>
<li id="help-menu-header-li"> <li id="help-menu-header-li">
<a id="help-menu-header" class="mainmenu-accordion-header">Help</a> <a id="help-menu-header" class="mainmenu-accordion-header">Help</a>

@ -392,6 +392,9 @@ function displayFactionContent(factionName) {
var hacking = false; var hacking = false;
if (factionName === "NiteSec" || factionName === "The Black Hand") {hacking = true;} if (factionName === "NiteSec" || factionName === "The Black Hand") {hacking = true;}
Player.startGang(factionName, hacking); 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(); Engine.loadGangContent();
yesNoBoxClose(); yesNoBoxClose();
}); });

@ -1934,6 +1934,9 @@ function initLocationButtons() {
name:companyName, name:companyName,
}); });
displayLocationContent(); 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 " + dialogBoxCreate("Congratulations! You just started your own corporation. You can visit " +
"and manage your company in the City"); "and manage your company in the City");
return yesNoTxtInpBoxClose(); return yesNoTxtInpBoxClose();
@ -1961,6 +1964,9 @@ function initLocationButtons() {
Player.bladeburner = new Bladeburner({new:true}); Player.bladeburner = new Bladeburner({new:true});
dialogBoxCreate("You have been accepted into the Bladeburner division!"); dialogBoxCreate("You have been accepted into the Bladeburner division!");
displayLocationContent(); displayLocationContent();
document.getElementById("bladeburner-tab").style.display = "list-item";
document.getElementById("world-menu-header").click();
document.getElementById("world-menu-header").click();
} else { } else {
dialogBoxCreate("Rejected! Please apply again when you have 100 of each combat stat (str, def, dex, agi)"); dialogBoxCreate("Rejected! Please apply again when you have 100 of each combat stat (str, def, dex, agi)");
} }

@ -150,6 +150,9 @@ let Engine = {
factionsMainMenuButton: null, factionsMainMenuButton: null,
augmentationsMainMenuButton: null, augmentationsMainMenuButton: null,
tutorialMainMenuButton: null, tutorialMainMenuButton: null,
bladeburnerMenuButton: null,
corporationMenuButton: null,
gangMenuButton: null,
devMainMenuButton: null, devMainMenuButton: null,
saveMainMenuButton: null, saveMainMenuButton: null,
deleteMainMenuButton: null, deleteMainMenuButton: null,
@ -547,6 +550,9 @@ let Engine = {
document.getElementById("tutorial-menu-link").classList.remove("active"); document.getElementById("tutorial-menu-link").classList.remove("active");
document.getElementById("options-menu-link").classList.remove("active"); document.getElementById("options-menu-link").classList.remove("active");
document.getElementById("dev-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() { displayCharacterOverviewInfo: function() {
@ -1278,6 +1284,9 @@ let Engine = {
var city = document.getElementById("city-tab"); var city = document.getElementById("city-tab");
var travel = document.getElementById("travel-tab"); var travel = document.getElementById("travel-tab");
var job = document.getElementById("job-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 tutorial = document.getElementById("tutorial-tab");
var options = document.getElementById("options-tab"); var options = document.getElementById("options-tab");
var dev = document.getElementById("dev-tab"); var dev = document.getElementById("dev-tab");
@ -1370,6 +1379,12 @@ let Engine = {
else {travel.style.display = "none";} else {travel.style.display = "none";}
if (Player.firstProgramAvailable) {visibleMenuTabs.push(createProgram);} if (Player.firstProgramAvailable) {visibleMenuTabs.push(createProgram);}
else {createProgram.style.display = "none";} 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); Engine.closeMainMenuHeader(visibleMenuTabs);
} else { } else {
@ -1409,6 +1424,9 @@ let Engine = {
job.style.display = "none"; job.style.display = "none";
travel.style.display = "none"; travel.style.display = "none";
createProgram.style.display = "none"; createProgram.style.display = "none";
bladeburner.style.display = "none";
corp.style.display = "none";
gang.style.display = "none";
Engine.openMainMenuHeader( Engine.openMainMenuHeader(
[terminal, createScript, activeScripts, stats, [terminal, createScript, activeScripts, stats,
@ -1812,16 +1830,22 @@ let Engine = {
var travelLink = document.getElementById("travel-menu-link"); var travelLink = document.getElementById("travel-menu-link");
var job = document.getElementById("job-tab"); var job = document.getElementById("job-tab");
var jobLink = document.getElementById("job-menu-link"); 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"); this.classList.toggle("opened");
if (city.style.maxHeight) { if (city.style.maxHeight) {
Engine.toggleMainMenuHeader(false, Engine.toggleMainMenuHeader(false,
[city, travel, job], [city, travel, job, bladeburner, corporation, gang],
[cityLink, travelLink, jobLink] [cityLink, travelLink, jobLink, bladeburnerLink, corporationLink, gangLink]
); );
} else { } else {
Engine.toggleMainMenuHeader(true, Engine.toggleMainMenuHeader(true,
[city, travel, job], [city, travel, job, bladeburner, corporation, gang],
[cityLink, travelLink, jobLink] [cityLink, travelLink, jobLink, bladeburnerLink, corporationLink, gangLink]
); );
} }
} }
@ -1919,6 +1943,23 @@ let Engine = {
return false; 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 = clearEventListeners("dev-menu-link");
Engine.Clickables.devMainMenuButton.addEventListener("click", function() { Engine.Clickables.devMainMenuButton.addEventListener("click", function() {
Engine.loadDevMenuContent(); Engine.loadDevMenuContent();