diff --git a/Libraries/SPTarkov.Server.Core/Generators/LocationLootGenerator.cs b/Libraries/SPTarkov.Server.Core/Generators/LocationLootGenerator.cs index 1e44e83c..cd01f222 100644 --- a/Libraries/SPTarkov.Server.Core/Generators/LocationLootGenerator.cs +++ b/Libraries/SPTarkov.Server.Core/Generators/LocationLootGenerator.cs @@ -275,8 +275,8 @@ public class LocationLootGenerator( /// /// Get containers with a non-100% chance to spawn OR are NOT on the container type randomistion blacklist /// - /// - /// StaticContainerData array + /// All static containers to pick from + /// StaticContainerData collection protected IEnumerable GetRandomisableContainersOnMap(IEnumerable staticContainers) { return staticContainers.Where(staticContainer => @@ -292,7 +292,7 @@ public class LocationLootGenerator( /// Get containers with 100% spawn rate or have a type on the randomistion ignore list /// /// - /// IStaticContainerData array + /// IStaticContainerData collection protected IEnumerable GetGuaranteedContainers(IEnumerable staticContainersOnMap) { return staticContainersOnMap.Where(staticContainer => @@ -354,20 +354,20 @@ public class LocationLootGenerator( { // Create dictionary of all group ids and choose a count of containers the map will spawn of that group var mapping = new Dictionary(); - foreach (var groupKvP in staticContainerGroupData.ContainersGroups) + foreach (var (containerGroupId, containerMinMax) in staticContainerGroupData.ContainersGroups) { - mapping[groupKvP.Key] = new ContainerGroupCount + mapping[containerGroupId] = new ContainerGroupCount { ContainerIdsWithProbability = new Dictionary(), ChosenCount = randomUtil.GetInt( (int) Math.Round( - groupKvP.Value.MinContainers.Value + containerMinMax.MinContainers.Value * LocationConfig.ContainerRandomisationSettings.ContainerGroupMinSizeMultiplier ), (int) Math.Round( - groupKvP.Value.MaxContainers.Value + containerMinMax.MaxContainers.Value * LocationConfig.ContainerRandomisationSettings.ContainerGroupMaxSizeMultiplier ) ),