1
0
mirror of https://github.com/tobspr/shapez.io.git synced 2025-12-14 02:31:51 +00:00
tobspr_shapez.io/src/js/core/globals.js
2022-01-13 21:20:42 +01:00

21 lines
533 B
JavaScript

/* typehints:start */
import { Application } from "../application";
/* typehints:end */
import { MODS } from "../mods/modloader";
/**
* Used for the bug reporter, and the click detector which both have no handles to this.
* It would be nicer to have no globals, but this is the only one. I promise!
* @type {Application} */
export let GLOBAL_APP = null;
/**
* @param {Application} app
*/
export function setGlobalApp(app) {
assert(!GLOBAL_APP, "Create application twice!");
GLOBAL_APP = app;
MODS.linkApp(app);
}