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

@@ -31,6 +31,19 @@ if (typeof CM == "undefined") {
* 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 */
@@ -47,6 +60,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;
@@ -4000,6 +4017,7 @@ CM.Init = function() {
CM.DelayInit = function() {
CM.Sim.InitData();
CM.Cache.InitCache();
CM.Disp.CreateCssArea();
CM.Disp.CreateBotBar();
CM.Disp.CreateTimerBar();
@@ -4469,9 +4487,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() {