mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-27 11:27:04 +02:00
All v0.29.0 changes
This commit is contained in:
+10
-1
@@ -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!");
|
||||
|
||||
Reference in New Issue
Block a user