Fix StorageFill quitting early (#2130)
This commit is contained in:
@@ -46,7 +46,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
|
|||||||
foreach (var storageItem in _contents)
|
foreach (var storageItem in _contents)
|
||||||
{
|
{
|
||||||
if (string.IsNullOrEmpty(storageItem.PrototypeName)) continue;
|
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 &&
|
if (storageItem.SpawnProbability != 1f &&
|
||||||
!random.Prob(storageItem.SpawnProbability))
|
!random.Prob(storageItem.SpawnProbability))
|
||||||
@@ -55,7 +55,7 @@ namespace Content.Server.GameObjects.Components.Items.Storage
|
|||||||
}
|
}
|
||||||
|
|
||||||
storage.Insert(_entityManager.SpawnEntity(storageItem.PrototypeName, Owner.Transform.Coordinates));
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user