From bc282daf088714cc95161b59642f15c4deef1fad Mon Sep 17 00:00:00 2001 From: Daniel Xie Date: Wed, 28 Jun 2017 14:21:04 -0500 Subject: [PATCH] Bug fix with marking augmentations as owned in Player.augmentations --- src/Faction.js | 6 ++++++ src/SaveObject.js | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Faction.js b/src/Faction.js index 4037335ad..e7a1e5bb2 100644 --- a/src/Faction.js +++ b/src/Faction.js @@ -982,6 +982,12 @@ displayFactionAugmentations = function(factionName) { owned = true; } } + for (var j = 0; j < Player.augmentations.length; ++j) { + if (Player.augmentations[j].name == aug.name) { + owned = true; + } + } + var item = document.createElement("li"); var span = document.createElement("span"); var aDiv = document.createElement("div"); diff --git a/src/SaveObject.js b/src/SaveObject.js index 6d4e5aaf1..f37638585 100644 --- a/src/SaveObject.js +++ b/src/SaveObject.js @@ -168,7 +168,7 @@ loadImportedGame = function(saveObj, saveString) { } } if (CONSTANTS.Version == "0.23.0") { - Augmentations = JSON.parse(saveObj.AugmentationsSave, Reviver); + tempAugmentations = JSON.parse(saveObj.AugmentationsSave, Reviver); } createNewUpdateText(); }