diff --git a/js/mod.js b/js/mod.js index 85944d23fd..43d614b685 100644 --- a/js/mod.js +++ b/js/mod.js @@ -132,4 +132,25 @@ function adjustNotificationTime(diff) { activeNotifications.splice(notification,1); // Remove notification when time hits 0 } } +} + +function fixOldSave(oldVersion){ + if(oldVersion=="1.2"||oldVersion=="1.1"||oldVersion=="1.0"){ + player.en.first=player.timePlayed + player.ne.first=player.timePlayed + player.id.first=player.timePlayed + player.r.first=player.timePlayed + player.ai.first=player.timePlayed + player.c.first=player.timePlayed + } + if(oldVersion=="1.1"||oldVersion=="1.0"){ + player.ma.first=player.timePlayed + player.ge.first=player.timePlayed + player.mc.first=player.timePlayed + } + if(oldVersion=="1.0"){ + player.n.first=player.timePlayed + player.hs.first=player.timePlayed + player.i.first=player.timePlayed + } } \ No newline at end of file diff --git a/js/utils.js b/js/utils.js index a3f8734fcf..19d6e65790 100644 --- a/js/utils.js +++ b/js/utils.js @@ -462,7 +462,10 @@ function versionCheck() { } if (setVersion) { - if (player.versionType == modInfo.id && VERSION.num > player.version) player.keepGoing = false + if (player.versionType == modInfo.id && VERSION.num > player.version) { + player.keepGoing = false + if (fixOldSave) fixOldSave(player.version); + } player.versionType = getStartPlayer().versionType player.version = VERSION.num player.beta = VERSION.beta