Created function CM.Cache.InitCache
This commit is contained in:
@@ -31,6 +31,19 @@ if (typeof CM == "undefined") {
|
|||||||
* Cache *
|
* Cache *
|
||||||
*********/
|
*********/
|
||||||
|
|
||||||
|
/********
|
||||||
|
* Section: General Cache related functions */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This functions runs all cache-functions to generate all "full" cache
|
||||||
|
* The declaration follows the structure of the CM.Cache.js file
|
||||||
|
* It is called by CM.DelayInit
|
||||||
|
* TODO: Add all functions that should be here and remove them from CM.Loop()
|
||||||
|
*/
|
||||||
|
CM.Cache.InitCache = function() {
|
||||||
|
CM.Cache.CacheDragonAuras();
|
||||||
|
}
|
||||||
|
|
||||||
/********
|
/********
|
||||||
* Section: Functions related to Dragon Auras */
|
* Section: Functions related to Dragon Auras */
|
||||||
|
|
||||||
@@ -47,6 +60,10 @@ CM.Cache.CacheDragonAuras = function() {
|
|||||||
/********
|
/********
|
||||||
* Section: Functions related to Wrinklers */
|
* Section: Functions related to Wrinklers */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This functions caches data related to Wrinklers
|
||||||
|
* It is called by CM.Loop()
|
||||||
|
*/
|
||||||
CM.Cache.RemakeWrinkBank = function() {
|
CM.Cache.RemakeWrinkBank = function() {
|
||||||
CM.Cache.WrinkBankTotal = 0;
|
CM.Cache.WrinkBankTotal = 0;
|
||||||
CM.Cache.WrinkBankNormal = 0;
|
CM.Cache.WrinkBankNormal = 0;
|
||||||
@@ -4000,6 +4017,7 @@ CM.Init = function() {
|
|||||||
|
|
||||||
CM.DelayInit = function() {
|
CM.DelayInit = function() {
|
||||||
CM.Sim.InitData();
|
CM.Sim.InitData();
|
||||||
|
CM.Cache.InitCache();
|
||||||
CM.Disp.CreateCssArea();
|
CM.Disp.CreateCssArea();
|
||||||
CM.Disp.CreateBotBar();
|
CM.Disp.CreateBotBar();
|
||||||
CM.Disp.CreateTimerBar();
|
CM.Disp.CreateTimerBar();
|
||||||
@@ -4469,9 +4487,6 @@ CM.Sim.InitData = function() {
|
|||||||
for (var i in Game.Achievements) {
|
for (var i in Game.Achievements) {
|
||||||
CM.Sim.Achievements[i] = CM.Sim.InitAchievement(i);
|
CM.Sim.Achievements[i] = CM.Sim.InitAchievement(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Auras
|
|
||||||
CM.Cache.CacheDragonAuras();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CM.Sim.CopyData = function() {
|
CM.Sim.CopyData = function() {
|
||||||
|
|||||||
17
src/Cache.js
17
src/Cache.js
@@ -2,6 +2,19 @@
|
|||||||
* Cache *
|
* Cache *
|
||||||
*********/
|
*********/
|
||||||
|
|
||||||
|
/********
|
||||||
|
* Section: General Cache related functions */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This functions runs all cache-functions to generate all "full" cache
|
||||||
|
* The declaration follows the structure of the CM.Cache.js file
|
||||||
|
* It is called by CM.DelayInit
|
||||||
|
* TODO: Add all functions that should be here and remove them from CM.Loop()
|
||||||
|
*/
|
||||||
|
CM.Cache.InitCache = function() {
|
||||||
|
CM.Cache.CacheDragonAuras();
|
||||||
|
}
|
||||||
|
|
||||||
/********
|
/********
|
||||||
* Section: Functions related to Dragon Auras */
|
* Section: Functions related to Dragon Auras */
|
||||||
|
|
||||||
@@ -18,6 +31,10 @@ CM.Cache.CacheDragonAuras = function() {
|
|||||||
/********
|
/********
|
||||||
* Section: Functions related to Wrinklers */
|
* Section: Functions related to Wrinklers */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This functions caches data related to Wrinklers
|
||||||
|
* It is called by CM.Loop()
|
||||||
|
*/
|
||||||
CM.Cache.RemakeWrinkBank = function() {
|
CM.Cache.RemakeWrinkBank = function() {
|
||||||
CM.Cache.WrinkBankTotal = 0;
|
CM.Cache.WrinkBankTotal = 0;
|
||||||
CM.Cache.WrinkBankNormal = 0;
|
CM.Cache.WrinkBankNormal = 0;
|
||||||
|
|||||||
@@ -229,6 +229,7 @@ CM.Init = function() {
|
|||||||
|
|
||||||
CM.DelayInit = function() {
|
CM.DelayInit = function() {
|
||||||
CM.Sim.InitData();
|
CM.Sim.InitData();
|
||||||
|
CM.Cache.InitCache();
|
||||||
CM.Disp.CreateCssArea();
|
CM.Disp.CreateCssArea();
|
||||||
CM.Disp.CreateBotBar();
|
CM.Disp.CreateBotBar();
|
||||||
CM.Disp.CreateTimerBar();
|
CM.Disp.CreateTimerBar();
|
||||||
|
|||||||
@@ -207,9 +207,6 @@ CM.Sim.InitData = function() {
|
|||||||
for (var i in Game.Achievements) {
|
for (var i in Game.Achievements) {
|
||||||
CM.Sim.Achievements[i] = CM.Sim.InitAchievement(i);
|
CM.Sim.Achievements[i] = CM.Sim.InitAchievement(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Auras
|
|
||||||
CM.Cache.CacheDragonAuras();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
CM.Sim.CopyData = function() {
|
CM.Sim.CopyData = function() {
|
||||||
|
|||||||
Reference in New Issue
Block a user