All v0.29.0 changes

This commit is contained in:
danielyxie
2017-09-19 13:38:03 -05:00
parent e3991b8795
commit d1f4f8fd36
18 changed files with 3616 additions and 3188 deletions
+10 -1
View File
@@ -73,7 +73,16 @@ BitburnerSaveObject.prototype.saveGame = function() {
this.AllGangsSave = JSON.stringify(AllGangs);
}
var saveString = btoa(unescape(encodeURIComponent(JSON.stringify(this))));
window.localStorage.setItem("bitburnerSave", saveString);
try {
window.localStorage.setItem("bitburnerSave", saveString);
} catch(e) {
if (e.code == 22) {
dialogBoxCreate("Failed to save game because the size of the save file " +
"is too large. Consider killing several of your scripts to " +
"fix this, or increasing the size of your browsers localStorage");
}
}
console.log("Game saved!");
Engine.createStatusText("Game saved!");