1
0
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:
tobspr 2022-01-14 17:46:28 +01:00
parent df9ebd170f
commit 3cfd4aaebd
2 changed files with 1 additions and 3 deletions

View File

@ -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;

View File

@ -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;
} }