Fix StorageFill quitting early (#2130)

This commit is contained in:
Exp
2020-09-25 13:49:59 +02:00
committed by GitHub
parent 18a788a22a
commit f2977dd436

View File

@@ -46,7 +46,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
foreach (var storageItem in _contents)
{
if (string.IsNullOrEmpty(storageItem.PrototypeName)) continue;
if (string.IsNullOrEmpty(storageItem.GroupId) && alreadySpawnedGroups.Contains(storageItem.GroupId)) continue;
if (!string.IsNullOrEmpty(storageItem.GroupId) && alreadySpawnedGroups.Contains(storageItem.GroupId)) continue;
if (storageItem.SpawnProbability != 1f &&
!random.Prob(storageItem.SpawnProbability))
@@ -55,7 +55,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
}
storage.Insert(_entityManager.SpawnEntity(storageItem.PrototypeName, Owner.Transform.Coordinates));
if(string.IsNullOrEmpty(storageItem.GroupId)) alreadySpawnedGroups.Add(storageItem.GroupId);
if (!string.IsNullOrEmpty(storageItem.GroupId)) alreadySpawnedGroups.Add(storageItem.GroupId);
}
}