mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-19 04:35:46 +01:00
Fixed some bugs, Hide Faction Augmentations Content in the hideAllContent() function
This commit is contained in:
parent
7aa42321f2
commit
37b5152103
@ -14,7 +14,7 @@ p {
|
|||||||
}
|
}
|
||||||
|
|
||||||
h1 {
|
h1 {
|
||||||
|
color: #66ff33;
|
||||||
}
|
}
|
||||||
|
|
||||||
h2 {
|
h2 {
|
||||||
|
@ -367,9 +367,10 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="faction-augmentations-container">
|
<div id="faction-augmentations-container">
|
||||||
<h1 id> Faction Augmentations </h1>
|
<h1> Faction Augmentations </h1>
|
||||||
<p id="faction-augmentations-page-desc"> Lists all augmentations that are available from </p>
|
<p id="faction-augmentations-page-desc"> Lists all augmentations that are available from </p>
|
||||||
<ul class="factions-augmentations-list" id="factions-augmentations-list">
|
<a href="#" id="faction-augmentations-back-button" class="a-link-button"> Back </a>
|
||||||
|
<ul class="faction-augmentations-list" id="faction-augmentations-list">
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -124,7 +124,12 @@ PlayerObject.prototype.checkForFactionInvitations = function() {
|
|||||||
}
|
}
|
||||||
invitedFactions = []; //Array which will hold all Factions th eplayer should be invited to
|
invitedFactions = []; //Array which will hold all Factions th eplayer should be invited to
|
||||||
|
|
||||||
var companyRep = Companies[this.companyName].playerReputation;
|
var company = Companies[this.companyName];
|
||||||
|
if (company == null) {
|
||||||
|
return invitedFactions;
|
||||||
|
}
|
||||||
|
var companyRep = company.playerReputation;
|
||||||
|
|
||||||
|
|
||||||
//Illuminati
|
//Illuminati
|
||||||
var illuminatiFac = Factions["Illuminati"];
|
var illuminatiFac = Factions["Illuminati"];
|
||||||
@ -454,6 +459,12 @@ displayFactionContent = function(factionName) {
|
|||||||
purchaseAugmentations.parentNode.replaceChild(newPurchaseAugmentationsButton, purchaseAugmentations);
|
purchaseAugmentations.parentNode.replaceChild(newPurchaseAugmentationsButton, purchaseAugmentations);
|
||||||
|
|
||||||
newPurchaseAugmentationsButton.addEventListener("click", function() {
|
newPurchaseAugmentationsButton.addEventListener("click", function() {
|
||||||
|
Engine.hideAllContent();
|
||||||
|
Engine.Display.factionAugmentationsContent.style.visiblility = "visible";
|
||||||
|
document.getElementById("faction-augmentations-back-button").addEventListener("click", function() {
|
||||||
|
displayFactionContent(factionName);
|
||||||
|
return false;
|
||||||
|
});
|
||||||
displayFactionAugmentations(factionName);
|
displayFactionAugmentations(factionName);
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
@ -600,22 +611,6 @@ displayFactionContent = function(factionName) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
displayFactionAugmentations = function(factionName) {
|
displayFactionAugmentations = function(factionName) {
|
||||||
//E.g:
|
|
||||||
//Add the faction to the Factions page content
|
|
||||||
var item = document.createElement("li");
|
|
||||||
var aElem = document.createElement("a");
|
|
||||||
aElem.setAttribute("href", "#");
|
|
||||||
aElem.setAttribute("class", "a-link-button");
|
|
||||||
aElem.innerHTML = faction.name;
|
|
||||||
aElem.addEventListener("click", function() {
|
|
||||||
displayFactionContent(faction.name);
|
|
||||||
return false;
|
|
||||||
});
|
|
||||||
item.appendChild(aElem);
|
|
||||||
|
|
||||||
var factionsList = document.getElementById("factions-list");
|
|
||||||
factionsList.appendChild(item);
|
|
||||||
|
|
||||||
var faction = Factions[factionName];
|
var faction = Factions[factionName];
|
||||||
|
|
||||||
var augmentationsList = document.getElementById("faction-augmentations-list");
|
var augmentationsList = document.getElementById("faction-augmentations-list");
|
||||||
|
@ -36,6 +36,7 @@ var Engine = {
|
|||||||
createProgramContent: null,
|
createProgramContent: null,
|
||||||
factionsContent: null,
|
factionsContent: null,
|
||||||
factionContent: null,
|
factionContent: null,
|
||||||
|
factionAugmentationsContent: null,
|
||||||
augmentationsContent: null,
|
augmentationsContent: null,
|
||||||
tutorialContent: null,
|
tutorialContent: null,
|
||||||
locationContent: null,
|
locationContent: null,
|
||||||
@ -264,6 +265,7 @@ var Engine = {
|
|||||||
Engine.Display.createProgramContent.style.visibility = "hidden";
|
Engine.Display.createProgramContent.style.visibility = "hidden";
|
||||||
Engine.Display.factionsContent.style.visibility = "hidden";
|
Engine.Display.factionsContent.style.visibility = "hidden";
|
||||||
Engine.Display.factionContent.style.visibility = "hidden";
|
Engine.Display.factionContent.style.visibility = "hidden";
|
||||||
|
Engine.Display.factionAugmentationsContent.style.visibility = "hidden";
|
||||||
Engine.Display.augmentationsContent.style.visibility = "hidden";
|
Engine.Display.augmentationsContent.style.visibility = "hidden";
|
||||||
Engine.Display.tutorialContent.style.visibility = "hidden";
|
Engine.Display.tutorialContent.style.visibility = "hidden";
|
||||||
Engine.Display.locationContent.style.visibility = "hidden";
|
Engine.Display.locationContent.style.visibility = "hidden";
|
||||||
@ -527,8 +529,7 @@ var Engine = {
|
|||||||
updateSkillLevelsCounter: 10, //Only update skill levels every 2 seconds. Might improve performance
|
updateSkillLevelsCounter: 10, //Only update skill levels every 2 seconds. Might improve performance
|
||||||
updateDisplays: 10, //Update displays such as Active Scripts display and character display
|
updateDisplays: 10, //Update displays such as Active Scripts display and character display
|
||||||
serverGrowth: 450, //Process server growth every minute and a half
|
serverGrowth: 450, //Process server growth every minute and a half
|
||||||
//checkFactionInvitations: 1500, //Check whether you qualify for any faction invitations every 5 minutes
|
checkFactionInvitations: 1500, //Check whether you qualify for any faction invitations every 5 minutes
|
||||||
checkFactionInvitations: 30,
|
|
||||||
},
|
},
|
||||||
|
|
||||||
decrementAllCounters: function(numCycles = 1) {
|
decrementAllCounters: function(numCycles = 1) {
|
||||||
@ -709,6 +710,9 @@ var Engine = {
|
|||||||
Engine.Display.factionContent = document.getElementById("faction-container");
|
Engine.Display.factionContent = document.getElementById("faction-container");
|
||||||
Engine.Display.factionContent.style.visibility = "hidden";
|
Engine.Display.factionContent.style.visibility = "hidden";
|
||||||
|
|
||||||
|
Engine.Display.factionAugmentationsContent = document.getElementById("faction-augmentations-container");
|
||||||
|
Engine.Display.factionAugmentationsContent.style.visibility = "hidden";
|
||||||
|
|
||||||
Engine.Display.augmentationsContent = document.getElementById("augmentations-container");
|
Engine.Display.augmentationsContent = document.getElementById("augmentations-container");
|
||||||
Engine.Display.augmentationsContent.style.visibility = "hidden";
|
Engine.Display.augmentationsContent.style.visibility = "hidden";
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user