From 017450ef17ed19f24fee3375cd35967e974ab119 Mon Sep 17 00:00:00 2001 From: Nemanja <98561806+EmoGarbage404@users.noreply.github.com> Date: Mon, 15 Jan 2024 23:10:52 -0500 Subject: [PATCH] fix cryosleepers deleting the station (#24143) * fix cryogenic units deleting the station * ship it --- .../Spawners/Components/ContainerSpawnPointComponent.cs | 4 ++-- .../Spawners/EntitySystems/ContainerSpawnPointSystem.cs | 2 +- Resources/Prototypes/Entities/Structures/cryopod.yml | 5 +++-- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Content.Server/Spawners/Components/ContainerSpawnPointComponent.cs b/Content.Server/Spawners/Components/ContainerSpawnPointComponent.cs index 5cd2ac3048e400..9782becc2714d3 100644 --- a/Content.Server/Spawners/Components/ContainerSpawnPointComponent.cs +++ b/Content.Server/Spawners/Components/ContainerSpawnPointComponent.cs @@ -13,8 +13,8 @@ public sealed partial class ContainerSpawnPointComponent : Component /// /// The ID of the container that this entity will spawn players into /// - [DataField, ViewVariables(VVAccess.ReadWrite)] - public string ContainerId; + [DataField(required: true), ViewVariables(VVAccess.ReadWrite)] + public string ContainerId = string.Empty; /// /// An optional job specifier diff --git a/Content.Server/Spawners/EntitySystems/ContainerSpawnPointSystem.cs b/Content.Server/Spawners/EntitySystems/ContainerSpawnPointSystem.cs index 65f107670071ea..15c4031d585ac6 100644 --- a/Content.Server/Spawners/EntitySystems/ContainerSpawnPointSystem.cs +++ b/Content.Server/Spawners/EntitySystems/ContainerSpawnPointSystem.cs @@ -79,7 +79,7 @@ private void OnSpawnPlayer(PlayerSpawningEvent args) return; } - Del(args.Station); + Del(args.SpawnResult); args.SpawnResult = null; } } diff --git a/Resources/Prototypes/Entities/Structures/cryopod.yml b/Resources/Prototypes/Entities/Structures/cryopod.yml index c4d13887003319..9063e8b1385c02 100644 --- a/Resources/Prototypes/Entities/Structures/cryopod.yml +++ b/Resources/Prototypes/Entities/Structures/cryopod.yml @@ -21,7 +21,8 @@ access: [["Cryogenics"]] - type: InteractionOutline - type: Cryostorage - - type: Climbable + - type: Physics + canCollide: false - type: DragInsertContainer containerId: storage - type: ExitContainerOnMove @@ -46,7 +47,7 @@ - type: entity parent: CryogenicSleepUnit id: CryogenicSleepUnitSpawner - suffix: Spawner, All + suffix: Spawner, Roundstart AllJobs components: - type: ContainerSpawnPoint containerId: storage