CryostorageContainedComponent.cs 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. using Robust.Shared.GameStates;
  2. using Robust.Shared.Network;
  3. using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
  4. namespace Content.Shared.Bed.Cryostorage;
  5. /// <summary>
  6. /// This is used to track an entity that is currently being held in Cryostorage.
  7. /// </summary>
  8. [RegisterComponent, NetworkedComponent]
  9. [AutoGenerateComponentState, AutoGenerateComponentPause]
  10. public sealed partial class CryostorageContainedComponent : Component
  11. {
  12. /// <summary>
  13. /// If true, the player's mind won't be removed from their body when they are moved into cryosleep
  14. /// allowing them to rejoin later.
  15. /// </summary>
  16. [DataField]
  17. public bool AllowReEnteringBody;
  18. /// <summary>
  19. /// The time at which the cryostorage grace period ends.
  20. /// </summary>
  21. [DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
  22. [AutoPausedField]
  23. public TimeSpan? GracePeriodEndTime;
  24. /// <summary>
  25. /// The cryostorage this entity is 'stored' in.
  26. /// </summary>
  27. [DataField, AutoNetworkedField]
  28. public EntityUid? Cryostorage;
  29. [DataField]
  30. public NetUserId? UserId;
  31. }