diff --git a/css/styles.css b/css/styles.css
index 8d30812b1..62d99c552 100644
--- a/css/styles.css
+++ b/css/styles.css
@@ -14,7 +14,7 @@ p {
}
h1 {
-
+ color: #66ff33;
}
h2 {
diff --git a/index.html b/index.html
index 2aa24ff80..c63cc3a7a 100644
--- a/index.html
+++ b/index.html
@@ -367,9 +367,10 @@
-
Faction Augmentations
+
Faction Augmentations
Lists all augmentations that are available from
-
diff --git a/src/Faction.js b/src/Faction.js
index 47b336ef1..70093a14e 100644
--- a/src/Faction.js
+++ b/src/Faction.js
@@ -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");
diff --git a/src/engine.js b/src/engine.js
index f5e7cdeab..d5f805647 100644
--- a/src/engine.js
+++ b/src/engine.js
@@ -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";