From 66ef0768531ee6dee06dd1eb3fc0284de24cf959 Mon Sep 17 00:00:00 2001 From: shadow578 <52449218+shadow578@users.noreply.github.com> Date: Mon, 23 Dec 2024 15:32:48 +0100 Subject: [PATCH] load contracts asynchronously --- components/controller.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/components/controller.ts b/components/controller.ts index 754120b9..a08cc153 100644 --- a/components/controller.ts +++ b/components/controller.ts @@ -479,7 +479,11 @@ export class Controller { this._addElusiveTargets() this._getETALocations() - await this.index() + + // load contracts asynchronously to avoid blocking the server + // otherwise, the player may have to wait a long time for the + // server to start, even if they're not planning to play contracts + this.index() try { await this._loadResources() @@ -857,6 +861,8 @@ export class Controller { log(LogLevel.DEBUG, e, "contracts") } } + + log(LogLevel.INFO, "Contracts loading completed", "contracts") } /**