Avoid crash on double-loading

This commit is contained in:
Daniel van Noord
2020-12-02 13:24:56 +01:00
parent a8e3691507
commit 94745fb013
3 changed files with 36 additions and 18 deletions

View File

@@ -1,22 +1,27 @@
/********** /**********
* Header * * Header *
**********/ **********/
RunCookieMonsterHeader = function() {
CM = {};
CM = {}; CM.Backup = {};
CM.Backup = {}; CM.Cache = {};
CM.Cache = {}; CM.Config = {};
CM.Config = {}; CM.ConfigData = {};
CM.ConfigData = {}; CM.Data = {};
CM.Data = {}; CM.Disp = {};
CM.Disp = {}; CM.Sim = {};
}
CM.Sim = {}; if (typeof CM == "undefined") {
RunCookieMonsterHeader();
}
/********* /*********
* Cache * * Cache *
@@ -4598,4 +4603,8 @@ CM.Sim.SellBuildingsForChoEgg = function() {
* Footer * * Footer *
**********/ **********/
CM.Init(); if (!CM.isRunning) {
CM.Init();
CM.isRunning = 1
}

View File

@@ -2,4 +2,8 @@
* Footer * * Footer *
**********/ **********/
CM.Init(); if (!CM.isRunning) {
CM.Init();
CM.isRunning = 1
}

View File

@@ -1,20 +1,25 @@
/********** /**********
* Header * * Header *
**********/ **********/
RunCookieMonsterHeader = function() {
CM = {};
CM = {}; CM.Backup = {};
CM.Backup = {}; CM.Cache = {};
CM.Cache = {}; CM.Config = {};
CM.Config = {}; CM.ConfigData = {};
CM.ConfigData = {}; CM.Data = {};
CM.Data = {}; CM.Disp = {};
CM.Disp = {}; CM.Sim = {};
}
CM.Sim = {}; if (typeof CM == "undefined") {
RunCookieMonsterHeader();
}