diff --git a/game.js b/game.js index 3b8296d..0395f17 100644 --- a/game.js +++ b/game.js @@ -3,6 +3,10 @@ /*jshint browser: true*/ /*jshint devel: true*/ +let version = "v0.7.4"; + +let save_version = 0; + let errored = false; window.onerror = function(msg, source, lineno, colno, error) { @@ -4150,6 +4154,9 @@ function loadSettings(settings = null) { settings = JSON.parse(storage.getItem('settings')); } + + migrate(settings); + let form = document.forms.namedItem("custom-species-form"); for (let i=0; i 1 - // notes: only adds version number - function(save) { - save["version"] = 1; - } - // -] + +]; function migrate(save, target=null) { if (target == null) { @@ -17,7 +12,9 @@ function migrate(save, target=null) { let version = save.version; if (version == undefined) { - version = 0; + alert("This save is from before versioning was added. It can't be automatically updated, and it might lose some settings. Double check that everything's there! Any subsequent saves will work correctly."); + save["version"] = migrations.length; + return false; } if (version < target) { diff --git a/stroll.html b/stroll.html index 5762510..44c735a 100644 --- a/stroll.html +++ b/stroll.html @@ -192,7 +192,8 @@
-
Welcome to Stroll 0.7.4
+
Welcome to Stroll
+

This game features 18+ content
 
@@ -206,7 +207,8 @@
-

Welcome to Stroll 0.7.4

+

Welcome to Stroll

+

This game features 18+ content

Changelog - Telegram - Discord

@@ -276,7 +278,7 @@
    - +
diff --git a/style.css b/style.css index 9a0b867..75033a9 100644 --- a/style.css +++ b/style.css @@ -690,3 +690,7 @@ body.dark .meterLabel { .growth-amount { display: block; } + +.save-version { + display: none; +}