using Robust.Shared.GameStates; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; namespace Content.Shared.Traits.Assorted; /// /// This is used for the narcolepsy trait. /// [RegisterComponent, NetworkedComponent] [AutoGenerateComponentState(fieldDeltas: true), AutoGenerateComponentPause] [Access(typeof(NarcolepsySystem))] public sealed partial class NarcolepsyComponent : Component { /// /// The maximum time between incidents. /// [DataField(required: true), AutoNetworkedField] public TimeSpan MaxTimeBetweenIncidents; /// /// The minimum time between incidents. /// [DataField(required: true), AutoNetworkedField] public TimeSpan MinTimeBetweenIncidents; /// /// The maximum duration of incidents. /// [DataField(required: true), AutoNetworkedField] public TimeSpan MaxDurationOfIncident; /// /// The minimum duration of incidents. /// [DataField(required: true), AutoNetworkedField] public TimeSpan MinDurationOfIncident; /// /// Next time indcident happens. /// [DataField(customTypeSerializer: typeof(TimeOffsetSerializer))] [AutoNetworkedField, AutoPausedField] public TimeSpan NextIncidentTime = TimeSpan.Zero; }