1
0
forked from noxious/server

OOP is my passion ( ͡° ͜ʖ ͡°)

This commit is contained in:
2025-01-04 18:35:53 +01:00
parent 0b4420f956
commit 067976c54a
46 changed files with 165 additions and 164 deletions

View File

@ -10,7 +10,8 @@ class MapManager {
private logger = Logger.type(LoggerType.GAME)
public async boot(): Promise<void> {
const maps = await MapRepository.getAll()
const mapRepository = new MapRepository()
const maps = await mapRepository.getAll()
await Promise.all(maps.map((map) => this.loadMap(map)))
this.logger.info(`Map manager loaded with ${Object.keys(this.maps).length} maps`)
@ -47,4 +48,4 @@ class MapManager {
}
}
export default new MapManager()
export default new MapManager()