Skip to content

Commit

Permalink
load contracts asynchronously
Browse files Browse the repository at this point in the history
  • Loading branch information
shadow578 committed Dec 23, 2024
1 parent e38d1c9 commit 66ef076
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion components/controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -857,6 +861,8 @@ export class Controller {
log(LogLevel.DEBUG, e, "contracts")
}
}

log(LogLevel.INFO, "Contracts loading completed", "contracts")
}

/**
Expand Down

0 comments on commit 66ef076

Please sign in to comment.