2020-05-09 14:45:23 +00:00
|
|
|
/* typehints:start */
|
|
|
|
|
import { Application } from "../application";
|
|
|
|
|
/* typehints:end */
|
|
|
|
|
|
2022-01-13 20:20:42 +00:00
|
|
|
import { MODS } from "../mods/modloader";
|
|
|
|
|
|
2020-05-09 14:45:23 +00:00
|
|
|
/**
|
|
|
|
|
* 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;
|
2022-01-13 20:20:42 +00:00
|
|
|
MODS.linkApp(app);
|
2020-05-09 14:45:23 +00:00
|
|
|
}
|