using Content.Shared.Access.Systems; using Robust.Shared.GameStates; using Robust.Shared.Prototypes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; namespace Content.Shared.Access.Components; /// /// This is used for an ID that expires and replaces its access after a certain period has passed. /// [RegisterComponent, NetworkedComponent, AutoGenerateComponentState, AutoGenerateComponentPause] [Access(typeof(SharedIdCardSystem))] public sealed partial class ExpireIdCardComponent : Component { /// /// Whether this ID has expired yet and had its accesses replaced. /// [DataField, AutoNetworkedField] public bool Expired; /// /// Whether this card will expire at all. /// [DataField, AutoNetworkedField] public bool Permanent; /// /// The time at which this card will expire and the access will be removed. /// [DataField(customTypeSerializer: typeof(TimeOffsetSerializer)), AutoPausedField, AutoNetworkedField] public TimeSpan ExpireTime = TimeSpan.Zero; /// /// Access the replaces current access once this card expires. /// [DataField] public HashSet> ExpiredAccess = new(); /// /// Line spoken by the card when it expires. /// [DataField] public LocId? ExpireMessage; }