Merge pull request #357 from hydroflame/gang-corp-bb-world

added shortcuts to corp, gang and blade under the world tab
This commit is contained in:
danielyxie 2018-07-14 19:27:53 -05:00 committed by GitHub
commit 1d619074fe
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 63 additions and 4 deletions

@ -89,6 +89,15 @@
<li id="job-tab" class="mainmenu-accordion-panel">
<a id="job-menu-link">Job</a>
</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">
<a id="help-menu-header" class="mainmenu-accordion-header">Help</a>

@ -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();
});

@ -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)");
}

@ -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();