diff --git a/Content.Server/Spawners/EntitySystems/ContainerSpawnPointSystem.cs b/Content.Server/Spawners/EntitySystems/ContainerSpawnPointSystem.cs index fcb6fdb039b..f6e923ec310 100644 --- a/Content.Server/Spawners/EntitySystems/ContainerSpawnPointSystem.cs +++ b/Content.Server/Spawners/EntitySystems/ContainerSpawnPointSystem.cs @@ -26,8 +26,8 @@ private void OnSpawnPlayer(PlayerSpawningEvent args) if (args.SpawnResult != null) return; - // DeltaV - Prevent spawnpoint overrides from being ignored - if (args.DesiredSpawnPointType != null && args.DesiredSpawnPointType != SpawnPointType.Unset) + // DeltaV - Ignore these two desired spawn types + if (args.DesiredSpawnPointType is SpawnPointType.Observer or SpawnPointType.LateJoin) return; var query = EntityQueryEnumerator(); @@ -38,6 +38,16 @@ private void OnSpawnPlayer(PlayerSpawningEvent args) if (args.Station != null && _station.GetOwningStation(uid, xform) != args.Station) continue; + // DeltaV - Custom override for override spawnpoints, only used for prisoners currently. This shouldn't run for any other jobs + if (args.DesiredSpawnPointType == SpawnPointType.Job) + { + if (spawnPoint.SpawnType != SpawnPointType.Job || spawnPoint.Job != args.Job?.Prototype) + continue; + + possibleContainers.Add((uid, spawnPoint, container, xform)); + continue; + } + // If it's unset, then we allow it to be used for both roundstart and midround joins if (spawnPoint.SpawnType == SpawnPointType.Unset) { diff --git a/Resources/Prototypes/DeltaV/Entities/Structures/cryopod.yml b/Resources/Prototypes/DeltaV/Entities/Structures/cryopod.yml new file mode 100644 index 00000000000..cec45e30fcb --- /dev/null +++ b/Resources/Prototypes/DeltaV/Entities/Structures/cryopod.yml @@ -0,0 +1,9 @@ +- type: entity + parent: CryogenicSleepUnit + id: CryogenicSleepUnitSpawnerPrisoner + suffix: Spawner, Prisoner + components: + - type: ContainerSpawnPoint + containerId: storage + spawnType: Job + job: Prisoner