Complete overhaul of code structure and relevant files (#639)

This commit is contained in:
Daniël van Noord
2021-03-14 00:41:14 +01:00
committed by GitHub
parent bb34bce9a5
commit 1bffb58782
163 changed files with 7369 additions and 10882 deletions

View File

@@ -0,0 +1,17 @@
import { CMOptions } from '../../Config/VariablesAndData';
/**
* This function fixes Game.mouseY as a result of bars that are added by CookieMonster
* It is called by Game.UpdateWrinklers(), Game.UpdateSpecial() and the .onmousover of the BigCookie
* before execution of their actual function
*/
export default function FixMouseY(target) {
if (CMOptions.TimerBar === 1 && CMOptions.TimerBarPos === 0) {
const timerBarHeight = parseInt(l('CMTimerBar').style.height, 10);
Game.mouseY -= timerBarHeight;
target();
Game.mouseY += timerBarHeight;
} else {
target();
}
}