Added pop-up notifying of new version

This commit is contained in:
Daniël van Noord
2021-02-23 21:51:13 +01:00
parent 19903378f2
commit 4a552352c8
3 changed files with 6 additions and 2 deletions

File diff suppressed because one or more lines are too long

View File

@@ -44,6 +44,10 @@ CM.save = function() {
CM.load = function(str) {
let save = JSON.parse(str);
CM.Config.LoadConfig(save.settings);
if (save.version !== CM.VersionMajor + '.' + CM.VersionMinor) {
if (Game.prefs.popups) Game.Popup('A new version of Cookie Monster has been loaded, check out the release notes in the info tab!');
else Game.Notify('A new version of Cookie Monster has been loaded, check out the release notes in the info tab!', '', '', 0, 1);
}
};
/********

View File

@@ -15,5 +15,5 @@ const CM = {
Options: {},
Sim: {},
VersionMajor: '2.031',
VersionMinor: '3',
VersionMinor: '4',
};