Log total count of static items being spawned

This commit is contained in:
Dev 2023-12-11 14:41:30 +00:00
parent 2cebf5f2ee
commit b15c8e196e

View File

@ -78,6 +78,7 @@ export class LocationGenerator
staticAmmoDist: Record<string, IStaticAmmoDetails[]>, staticAmmoDist: Record<string, IStaticAmmoDetails[]>,
): SpawnpointTemplate[] ): SpawnpointTemplate[]
{ {
let staticLootItemCount = 0;
const result: SpawnpointTemplate[] = []; const result: SpawnpointTemplate[] = [];
const locationId = locationBase.Id.toLowerCase(); const locationId = locationBase.Id.toLowerCase();
@ -127,11 +128,13 @@ export class LocationGenerator
locationId, locationId,
); );
result.push(containerWithLoot.template); result.push(containerWithLoot.template);
staticLootItemCount += containerWithLoot.template.Items.length;
} }
this.logger.success(`Added ${guaranteedContainers.length} guaranteed containers`); this.logger.debug(`Added ${guaranteedContainers.length} guaranteed containers`);
// randomisation is turned off globally or just turned off for this map // Randomisation is turned off globally or just turned off for this map
if ( if (
!(this.locationConfig.containerRandomisationSettings.enabled !(this.locationConfig.containerRandomisationSettings.enabled
&& this.locationConfig.containerRandomisationSettings.maps[locationId]) && this.locationConfig.containerRandomisationSettings.maps[locationId])
@ -150,8 +153,12 @@ export class LocationGenerator
locationId, locationId,
); );
result.push(containerWithLoot.template); result.push(containerWithLoot.template);
staticLootItemCount += containerWithLoot.template.Items.length;
} }
this.logger.success(`A total of ${staticLootItemCount} static items spawned`);
return result; return result;
} }
@ -230,9 +237,14 @@ export class LocationGenerator
); );
result.push(containerWithLoot.template); result.push(containerWithLoot.template);
staticContainerCount++; staticContainerCount++;
staticLootItemCount += containerWithLoot.template.Items.length;
} }
} }
this.logger.success(`A total of ${staticLootItemCount} static items spawned`);
this.logger.success( this.logger.success(
this.localisationService.getText("location-containers_generated_success", staticContainerCount), this.localisationService.getText("location-containers_generated_success", staticContainerCount),
); );