mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-17 06:48:42 +02:00
Fixed some bugs, Hide Faction Augmentations Content in the hideAllContent() function
This commit is contained in:
@@ -124,7 +124,12 @@ PlayerObject.prototype.checkForFactionInvitations = function() {
|
||||
}
|
||||
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
|
||||
var illuminatiFac = Factions["Illuminati"];
|
||||
@@ -454,6 +459,12 @@ displayFactionContent = function(factionName) {
|
||||
purchaseAugmentations.parentNode.replaceChild(newPurchaseAugmentationsButton, purchaseAugmentations);
|
||||
|
||||
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);
|
||||
return false;
|
||||
});
|
||||
@@ -600,22 +611,6 @@ displayFactionContent = 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 augmentationsList = document.getElementById("faction-augmentations-list");
|
||||
|
||||
@@ -28,24 +28,25 @@ var Engine = {
|
||||
hacking_skill: null,
|
||||
|
||||
//Main menu content
|
||||
terminalContent: null,
|
||||
characterContent: null,
|
||||
scriptEditorContent: null,
|
||||
activeScriptsContent: null,
|
||||
worldContent: null,
|
||||
createProgramContent: null,
|
||||
factionsContent: null,
|
||||
factionContent: null,
|
||||
augmentationsContent: null,
|
||||
tutorialContent: null,
|
||||
locationContent: null,
|
||||
workInProgressContent: null,
|
||||
terminalContent: null,
|
||||
characterContent: null,
|
||||
scriptEditorContent: null,
|
||||
activeScriptsContent: null,
|
||||
worldContent: null,
|
||||
createProgramContent: null,
|
||||
factionsContent: null,
|
||||
factionContent: null,
|
||||
factionAugmentationsContent: null,
|
||||
augmentationsContent: null,
|
||||
tutorialContent: null,
|
||||
locationContent: null,
|
||||
workInProgressContent: null,
|
||||
|
||||
//Character info
|
||||
characterInfo: null,
|
||||
characterInfo: null,
|
||||
|
||||
//Script editor text
|
||||
scriptEditorText: null,
|
||||
scriptEditorText: null,
|
||||
},
|
||||
|
||||
//Current page status
|
||||
@@ -264,6 +265,7 @@ var Engine = {
|
||||
Engine.Display.createProgramContent.style.visibility = "hidden";
|
||||
Engine.Display.factionsContent.style.visibility = "hidden";
|
||||
Engine.Display.factionContent.style.visibility = "hidden";
|
||||
Engine.Display.factionAugmentationsContent.style.visibility = "hidden";
|
||||
Engine.Display.augmentationsContent.style.visibility = "hidden";
|
||||
Engine.Display.tutorialContent.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
|
||||
updateDisplays: 10, //Update displays such as Active Scripts display and character display
|
||||
serverGrowth: 450, //Process server growth every minute and a half
|
||||
//checkFactionInvitations: 1500, //Check whether you qualify for any faction invitations every 5 minutes
|
||||
checkFactionInvitations: 30,
|
||||
checkFactionInvitations: 1500, //Check whether you qualify for any faction invitations every 5 minutes
|
||||
},
|
||||
|
||||
decrementAllCounters: function(numCycles = 1) {
|
||||
@@ -709,6 +710,9 @@ var Engine = {
|
||||
Engine.Display.factionContent = document.getElementById("faction-container");
|
||||
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.style.visibility = "hidden";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user