From d1dc04cbecf281bee1bd4d913d7bd4d663f53ee7 Mon Sep 17 00:00:00 2001 From: TheSparta Date: Fri, 15 Dec 2023 14:10:33 +0000 Subject: [PATCH] Fixed missed method rename - getAllSeasonalEventItems got renamed getInactiveSeasonalEventItems --- project/src/generators/LocationGenerator.ts | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/project/src/generators/LocationGenerator.ts b/project/src/generators/LocationGenerator.ts index e22c9b93..8538d478 100644 --- a/project/src/generators/LocationGenerator.ts +++ b/project/src/generators/LocationGenerator.ts @@ -515,7 +515,7 @@ export class LocationGenerator ): ProbabilityObjectArray { const seasonalEventActive = this.seasonalEventService.seasonalEventEnabled(); - const seasonalItemTplBlacklist = this.seasonalEventService.getAllSeasonalEventItems(); + const seasonalItemTplBlacklist = this.seasonalEventService.getInactiveSeasonalEventItems(); const itemDistribution = new ProbabilityObjectArray(this.mathUtil, this.jsonUtil); for (const icd of staticLootDist[containerTypeId].itemDistribution) @@ -620,7 +620,7 @@ export class LocationGenerator // Iterate over spawnpoints const seasonalEventActive = this.seasonalEventService.seasonalEventEnabled(); - const seasonalItemTplBlacklist = this.seasonalEventService.getAllSeasonalEventItems(); + const seasonalItemTplBlacklist = this.seasonalEventService.getInactiveSeasonalEventItems(); for (const spawnPoint of chosenSpawnpoints) { if (!spawnPoint.template) @@ -723,8 +723,8 @@ export class LocationGenerator } const seasonalEventActive = this.seasonalEventService.seasonalEventEnabled(); - const seasonalItemTplBlacklist = this.seasonalEventService.getAllSeasonalEventItems(); - + const seasonalItemTplBlacklist = this.seasonalEventService.getInactiveSeasonalEventItems(); + // Add remaining forced loot to array for (const forcedLootLocation of forcedSpawnPoints) { @@ -743,20 +743,22 @@ export class LocationGenerator } const locationTemplateToAdd = forcedLootLocation.template; - + // Ensure root id matches the first items id locationTemplateToAdd.Root = this.objectId.generate(); locationTemplateToAdd.Items[0]._id = locationTemplateToAdd.Root; // Push forced location into array as long as it doesnt exist already - const existingLocation = lootLocationTemplates.find(x => x.Id === locationTemplateToAdd.Id); + const existingLocation = lootLocationTemplates.find((x) => x.Id === locationTemplateToAdd.Id); if (!existingLocation) { lootLocationTemplates.push(locationTemplateToAdd); } else { - this.logger.debug(`Attempted to add a forced loot location with Id: ${locationTemplateToAdd.Id} to map ${locationName} that already has that id in use, skipping`) + this.logger.debug( + `Attempted to add a forced loot location with Id: ${locationTemplateToAdd.Id} to map ${locationName} that already has that id in use, skipping`, + ); } } }