Added prettier (#661)

* Added prettier

* Added prettier

* Added prettier
This commit is contained in:
Daniël van Noord
2021-03-14 18:57:07 +01:00
committed by GitHub
parent f3e7964262
commit 932509a877
132 changed files with 7143 additions and 4894 deletions

View File

@@ -6,21 +6,23 @@ import CMLoop from '../Main/Loop';
import { isInitializing } from './Variables';
/**
* This creates a init function for the CM object. Per Game code/comments:
* "this function is called as soon as the mod is registered
* declare hooks here"
* It starts the further initialization of CookieMonster and registers hooks
*/
* This creates a init function for the CM object. Per Game code/comments:
* "this function is called as soon as the mod is registered
* declare hooks here"
* It starts the further initialization of CookieMonster and registers hooks
*/
export default function init() {
isInitializing = true;
let proceed = true;
if (Game.version !== Number(VersionMajor)) {
proceed = confirm(`Cookie Monster version ${VersionMajor}.${VersionMinor} is meant for Game version ${VersionMajor}. Loading a different version may cause errors. Do you still want to load Cookie Monster?`);
}
if (proceed) {
InitializeCookieMonster();
Game.registerHook('draw', Draw);
Game.registerHook('logic', CMLoop);
isInitializing = false;
}
isInitializing = true;
let proceed = true;
if (Game.version !== Number(VersionMajor)) {
proceed = confirm(
`Cookie Monster version ${VersionMajor}.${VersionMinor} is meant for Game version ${VersionMajor}. Loading a different version may cause errors. Do you still want to load Cookie Monster?`,
);
}
if (proceed) {
InitializeCookieMonster();
Game.registerHook('draw', Draw);
Game.registerHook('logic', CMLoop);
isInitializing = false;
}
}