Created function CM.Cache.InitCache

This commit is contained in:
Daniel van Noord
2020-12-19 17:45:33 +01:00
parent c6c54054ee
commit 389dae4daa
4 changed files with 36 additions and 6 deletions

View File

@@ -2,6 +2,19 @@
* 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 */
@@ -18,6 +31,10 @@ CM.Cache.CacheDragonAuras = function() {
/********
* Section: Functions related to Wrinklers */
/**
* This functions caches data related to Wrinklers
* It is called by CM.Loop()
*/
CM.Cache.RemakeWrinkBank = function() {
CM.Cache.WrinkBankTotal = 0;
CM.Cache.WrinkBankNormal = 0;

View File

@@ -229,6 +229,7 @@ CM.Init = function() {
CM.DelayInit = function() {
CM.Sim.InitData();
CM.Cache.InitCache();
CM.Disp.CreateCssArea();
CM.Disp.CreateBotBar();
CM.Disp.CreateTimerBar();

View File

@@ -207,9 +207,6 @@ CM.Sim.InitData = function() {
for (var i in Game.Achievements) {
CM.Sim.Achievements[i] = CM.Sim.InitAchievement(i);
}
// Auras
CM.Cache.CacheDragonAuras();
}
CM.Sim.CopyData = function() {