diff --git a/Content.IntegrationTests/Tests/Roles/StartingGearStorageTests.cs b/Content.IntegrationTests/Tests/Roles/StartingGearStorageTests.cs index f8060edb2b..3b2935258a 100644 --- a/Content.IntegrationTests/Tests/Roles/StartingGearStorageTests.cs +++ b/Content.IntegrationTests/Tests/Roles/StartingGearStorageTests.cs @@ -35,15 +35,16 @@ public sealed class StartingGearPrototypeStorageTest { foreach (var gearProto in protos) { - var backpackProto = ((IEquipmentLoadout) gearProto).GetGear("back"); - if (backpackProto == string.Empty) - continue; - - var bag = server.EntMan.SpawnEntity(backpackProto, coords); var ents = new ValueList(); foreach (var (slot, entProtos) in gearProto.Storage) { + ents.Clear(); + var storageProto = ((IEquipmentLoadout)gearProto).GetGear(slot); + if (storageProto == string.Empty) + continue; + + var bag = server.EntMan.SpawnEntity(storageProto, coords); if (entProtos.Count == 0) continue; @@ -59,9 +60,8 @@ public sealed class StartingGearPrototypeStorageTest server.EntMan.DeleteEntity(ent); } + server.EntMan.DeleteEntity(bag); } - - server.EntMan.DeleteEntity(bag); } mapManager.DeleteMap(testMap.MapId); diff --git a/Content.Shared/Station/SharedStationSpawningSystem.cs b/Content.Shared/Station/SharedStationSpawningSystem.cs index 0584b10562..ad264cd22a 100644 --- a/Content.Shared/Station/SharedStationSpawningSystem.cs +++ b/Content.Shared/Station/SharedStationSpawningSystem.cs @@ -150,6 +150,7 @@ public abstract class SharedStationSpawningSystem : EntitySystem foreach (var (slot, entProtos) in startingGear.Storage) { + ents.Clear(); if (entProtos.Count == 0) continue;