using Robust.Shared.GameStates;
using Robust.Shared.Network;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Shared.Bed.Cryostorage;
///
/// This is used to track an entity that is currently being held in Cryostorage.
///
[RegisterComponent, NetworkedComponent]
[AutoGenerateComponentState, AutoGenerateComponentPause]
public sealed partial class CryostorageContainedComponent : Component
{
///
/// If true, the player's mind won't be removed from their body when they are moved into cryosleep
/// allowing them to rejoin later.
///
[DataField]
public bool AllowReEnteringBody;
///
/// The time at which the cryostorage grace period ends.
///
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), ViewVariables(VVAccess.ReadWrite), AutoNetworkedField]
[AutoPausedField]
public TimeSpan? GracePeriodEndTime;
///
/// The cryostorage this entity is 'stored' in.
///
[DataField, AutoNetworkedField]
public EntityUid? Cryostorage;
[DataField]
public NetUserId? UserId;
}