diff --git a/project/src/controllers/GameController.ts b/project/src/controllers/GameController.ts index 6ba10227..04087bc5 100644 --- a/project/src/controllers/GameController.ts +++ b/project/src/controllers/GameController.ts @@ -400,8 +400,11 @@ export class GameController { } protected adjustLooseLootSpawnProbabilities(): void { - const adjustments = this.lootConfig.looseLootSpawnPointAdjustments; - for (const [mapId, mapAdjustments] of Object.entries(adjustments)) { + if (!this.lootConfig.looseLootSpawnPointAdjustments) { + return; + } + + for (const [mapId, mapAdjustments] of Object.entries(this.lootConfig.looseLootSpawnPointAdjustments)) { const mapLooseLootData = this.databaseService.getLocation(mapId).looseLoot; if (!mapLooseLootData) { this.logger.warning(this.localisationService.getText("location-map_has_no_loose_loot_data", mapId));