Skip to content

Commit

Permalink
fix cryosleepers deleting the station (space-wizards#24143)
Browse files Browse the repository at this point in the history
* fix cryogenic units deleting the station

* ship it
  • Loading branch information
EmoGarbage404 authored Jan 16, 2024
1 parent a0b026d commit 017450e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ public sealed partial class ContainerSpawnPointComponent : Component
/// <summary>
/// The ID of the container that this entity will spawn players into
/// </summary>
[DataField, ViewVariables(VVAccess.ReadWrite)]
public string ContainerId;
[DataField(required: true), ViewVariables(VVAccess.ReadWrite)]
public string ContainerId = string.Empty;

/// <summary>
/// An optional job specifier
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ private void OnSpawnPlayer(PlayerSpawningEvent args)
return;
}

Del(args.Station);
Del(args.SpawnResult);
args.SpawnResult = null;
}
}
5 changes: 3 additions & 2 deletions Resources/Prototypes/Entities/Structures/cryopod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
access: [["Cryogenics"]]
- type: InteractionOutline
- type: Cryostorage
- type: Climbable
- type: Physics
canCollide: false
- type: DragInsertContainer
containerId: storage
- type: ExitContainerOnMove
Expand All @@ -46,7 +47,7 @@
- type: entity
parent: CryogenicSleepUnit
id: CryogenicSleepUnitSpawner
suffix: Spawner, All
suffix: Spawner, Roundstart AllJobs
components:
- type: ContainerSpawnPoint
containerId: storage
Expand Down

0 comments on commit 017450e

Please sign in to comment.