initAugmentations() now called applyAugmentations() at the end

This commit is contained in:
Daniel Xie
2017-06-28 15:53:12 -05:00
parent bc282daf08
commit d63f17fa8d
6 changed files with 34 additions and 18 deletions
+5 -4
View File
@@ -54,6 +54,7 @@ var Engine = {
factionAugmentationsContent: null,
augmentationsContent: null,
tutorialContent: null,
infiltrationContent: null,
locationContent: null,
workInProgressContent: null,
@@ -682,7 +683,7 @@ var Engine = {
Engine.setDisplayElements(); //Sets variables for important DOM elements
Engine.init(); //Initialize buttons, work, etc.
CompanyPositions.init();
initAugmentations();
initAugmentations(); //Also calls Player.reapplyAllAugmentations()
//Calculate the number of cycles have elapsed while offline
Engine._lastUpdate = new Date().getTime();
@@ -721,9 +722,6 @@ var Engine = {
Player.totalPlaytime += time;
Player.playtimeSinceLastAug += time;
//Re-apply augmentations
Player.reapplyAllAugmentations();
Player.lastUpdate = Engine._lastUpdate;
Engine.start(); //Run main game loop and Scripts loop
dialogBoxCreate("While you were offline, your scripts generated $" +
@@ -787,6 +785,9 @@ var Engine = {
Engine.Display.tutorialContent = document.getElementById("tutorial-container");
Engine.Display.tutorialContent.style.visibility = "hidden";
Engine.Display.infiltrationContent = document.getElementById("infiltration-container");
Engine.Display.infiltrationContent.style.visibility = "hidden";
//Character info
Engine.Display.characterInfo = document.getElementById("character-info");