mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-05-02 05:47:14 +02:00
Fixed bugs with new multiple Augmentations feature. Added getServerMaxMoney() netscript command
This commit is contained in:
+8
-4
@@ -9,7 +9,6 @@ function BitburnerSaveObject() {
|
||||
this.CompaniesSave = "";
|
||||
this.FactionsSave = "";
|
||||
this.SpecialServerIpsSave = "";
|
||||
this.AugmentationsSave = "";
|
||||
this.AliasesSave = "";
|
||||
this.MessagesSave = "";
|
||||
this.VersionSave = "";
|
||||
@@ -35,11 +34,10 @@ BitburnerSaveObject.prototype.saveGame = function() {
|
||||
this.CompaniesSave = JSON.stringify(Companies);
|
||||
this.FactionsSave = JSON.stringify(Factions);
|
||||
this.SpecialServerIpsSave = JSON.stringify(SpecialServerIps);
|
||||
this.AugmentationsSave = JSON.stringify(Augmentations);
|
||||
//this.AugmentationsSave = JSON.stringify(Augmentations);
|
||||
this.AliasesSave = JSON.stringify(Aliases);
|
||||
this.MessagesSave = JSON.stringify(Messages);
|
||||
this.VersionSave = JSON.stringify(CONSTANTS.Version);
|
||||
|
||||
var saveString = btoa(unescape(encodeURIComponent(JSON.stringify(this))));
|
||||
window.localStorage.setItem("bitburnerSave", saveString);
|
||||
|
||||
@@ -60,7 +58,7 @@ loadGame = function(saveObj) {
|
||||
Companies = JSON.parse(saveObj.CompaniesSave, Reviver);
|
||||
Factions = JSON.parse(saveObj.FactionsSave, Reviver);
|
||||
SpecialServerIps = JSON.parse(saveObj.SpecialServerIpsSave, Reviver);
|
||||
Augmentations = JSON.parse(saveObj.AugmentationsSave, Reviver);
|
||||
|
||||
if (saveObj.hasOwnProperty("AliasesSave")) {
|
||||
try {
|
||||
Aliases = JSON.parse(saveObj.AliasesSave, Reviver);
|
||||
@@ -97,6 +95,9 @@ loadGame = function(saveObj) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (CONSTANTS.Version == "0.23.0.BETA") {
|
||||
Augmentations = JSON.parse(saveObj.AugmentationsSave, Reviver);
|
||||
}
|
||||
createNewUpdateText();
|
||||
}
|
||||
} catch(e) {
|
||||
@@ -167,6 +168,9 @@ loadImportedGame = function(saveObj, saveString) {
|
||||
}
|
||||
}
|
||||
}
|
||||
if (CONSTANTS.Version == "0.23.0.BETA") {
|
||||
Augmentations = JSON.parse(saveObj.AugmentationsSave, Reviver);
|
||||
}
|
||||
createNewUpdateText();
|
||||
}
|
||||
} catch(e) {
|
||||
|
||||
Reference in New Issue
Block a user