null guard against a map without a base json inside fixBrokenOfflineMapWaves()

This commit is contained in:
Dev 2023-05-27 19:02:30 +01:00
parent 57d0548810
commit e2b1d4d0c6

View File

@ -279,6 +279,12 @@ export class GameController
// Loop over all of the locations waves and look for waves with identical min and max slots
const location: ILocationData = this.databaseServer.getTables().locations[locationKey];
if (!location.base)
{
this.logger.warning(`Map ${locationKey} lacks a base json, skipping map wave fixes`);
continue;
}
for (const wave of location.base.waves)
{
if ((wave.slots_max - wave.slots_min === 0))