mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-26 19:14:32 +02:00
Added stuff for compatibility with new version
This commit is contained in:
@@ -69,6 +69,19 @@ loadGame = function(saveObj) {
|
||||
try {
|
||||
var ver = JSON.parse(saveObj.VersionSave, Reviver);
|
||||
if (ver != CONSTANTS.Version) {
|
||||
if (CONSTANTS.Version == "0.21.0") {
|
||||
dialogBoxCreate("All scripts automatically killed for the sake of compatibility " +
|
||||
"with new version. If the game is still broken, try the following: " +
|
||||
"Options -> Soft Reset -> Save Game -> Reload page. If that STILL " +
|
||||
"doesn't work contact the dev");
|
||||
//This is the big update that might break games. Kill all running scripts
|
||||
for (var ip in AllServers) {
|
||||
if (AllServers.hasOwnProperty(ip)) {
|
||||
AllServers[ip].runningScripts = [];
|
||||
AllServers[ip].runningScripts.length = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
createNewUpdateText();
|
||||
}
|
||||
} catch(e) {
|
||||
@@ -126,6 +139,20 @@ loadImportedGame = function(saveObj, saveString) {
|
||||
if (ver != CONSTANTS.Version) {
|
||||
createNewUpdateText();
|
||||
}
|
||||
|
||||
if (ver != CONSTANTS.Version) {
|
||||
if (CONSTANTS.Version == "0.21.0") {
|
||||
console.log("here");
|
||||
//This is the big update that might break games. Kill all running scripts
|
||||
for (var ip in tempAllServers) {
|
||||
if (tempAllServers.hasOwnProperty(ip)) {
|
||||
tempAllServers[ip].runningScripts = [];
|
||||
tempAllServers[ip].runningScripts.length = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
createNewUpdateText();
|
||||
}
|
||||
} catch(e) {
|
||||
createNewUpdateText();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user