Actually fix #772
This commit is contained in:
File diff suppressed because one or more lines are too long
2
dist/CookieMonster.js
vendored
2
dist/CookieMonster.js
vendored
File diff suppressed because one or more lines are too long
2
dist/CookieMonster.js.map
vendored
2
dist/CookieMonster.js.map
vendored
File diff suppressed because one or more lines are too long
@@ -3,7 +3,6 @@ import CMDrawHook from '../Disp/DrawHook';
|
|||||||
import CMClickHook from '../Main/ClickHook';
|
import CMClickHook from '../Main/ClickHook';
|
||||||
import InitializeCookieMonster from '../Main/Initialization';
|
import InitializeCookieMonster from '../Main/Initialization';
|
||||||
import CMLoopHook from '../Main/LoopHook';
|
import CMLoopHook from '../Main/LoopHook';
|
||||||
import CMRestHook from '../Main/ResetHook';
|
|
||||||
import { isInitializing } from './Variables';
|
import { isInitializing } from './Variables';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -26,7 +25,7 @@ export default function init() {
|
|||||||
Game.registerHook('click', CMClickHook);
|
Game.registerHook('click', CMClickHook);
|
||||||
Game.registerHook('draw', CMDrawHook);
|
Game.registerHook('draw', CMDrawHook);
|
||||||
Game.registerHook('logic', CMLoopHook);
|
Game.registerHook('logic', CMLoopHook);
|
||||||
Game.registerHook('reset', CMRestHook);
|
|
||||||
isInitializing = false; // eslint-disable-line no-unused-vars
|
isInitializing = false; // eslint-disable-line no-unused-vars
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,11 +87,12 @@ export default function CMLoopHook() {
|
|||||||
LoopCache();
|
LoopCache();
|
||||||
|
|
||||||
// Check all changing minigames and game-states
|
// Check all changing minigames and game-states
|
||||||
CheckGoldenCookie();
|
|
||||||
CheckTickerFortune();
|
CheckTickerFortune();
|
||||||
CheckSeasonPopup();
|
CheckSeasonPopup();
|
||||||
CheckGardenTick();
|
CheckGardenTick();
|
||||||
CheckMagicMeter();
|
CheckMagicMeter();
|
||||||
CheckWrinklerCount();
|
CheckWrinklerCount();
|
||||||
}
|
}
|
||||||
|
// To remove Timers when ascending
|
||||||
|
CheckGoldenCookie();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,12 +0,0 @@
|
|||||||
import { GCTimers } from '../Disp/VariablesAndData';
|
|
||||||
|
|
||||||
/**
|
|
||||||
* This is called when the user ascends
|
|
||||||
* It is called by CM.Main.Loop
|
|
||||||
*/
|
|
||||||
export default function CMRestHook() {
|
|
||||||
Object.keys(GCTimers).forEach((i) => {
|
|
||||||
GCTimers[i].parentNode.removeChild(GCTimers[i]);
|
|
||||||
delete GCTimers[i];
|
|
||||||
});
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user