mirror of
https://github.com/tobspr/shapez.io.git
synced 2025-12-13 18:21:51 +00:00
Fix circular dependency
This commit is contained in:
parent
df9ebd170f
commit
3cfd4aaebd
@ -69,6 +69,7 @@ export class Application {
|
|||||||
assert(!GLOBAL_APP, "Tried to construct application twice");
|
assert(!GLOBAL_APP, "Tried to construct application twice");
|
||||||
logger.log("Creating application, platform =", getPlatformName());
|
logger.log("Creating application, platform =", getPlatformName());
|
||||||
setGlobalApp(this);
|
setGlobalApp(this);
|
||||||
|
MODS.app = this;
|
||||||
|
|
||||||
this.unloaded = false;
|
this.unloaded = false;
|
||||||
|
|
||||||
|
|||||||
@ -2,8 +2,6 @@
|
|||||||
import { Application } from "../application";
|
import { Application } from "../application";
|
||||||
/* typehints:end */
|
/* typehints:end */
|
||||||
|
|
||||||
import { MODS } from "../mods/modloader";
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used for the bug reporter, and the click detector which both have no handles to this.
|
* 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!
|
* It would be nicer to have no globals, but this is the only one. I promise!
|
||||||
@ -16,5 +14,4 @@ export let GLOBAL_APP = null;
|
|||||||
export function setGlobalApp(app) {
|
export function setGlobalApp(app) {
|
||||||
assert(!GLOBAL_APP, "Create application twice!");
|
assert(!GLOBAL_APP, "Create application twice!");
|
||||||
GLOBAL_APP = app;
|
GLOBAL_APP = app;
|
||||||
MODS.app = app;
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user