using Content.Shared.CCVar; using Content.Shared.StatusIcon; using Robust.Shared.GameStates; using Robust.Shared.Prototypes; using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom; namespace Content.Shared.SSDIndicator; /// /// Shows status icon when an entity is SSD, based on if a player is attached or not. /// [RegisterComponent, NetworkedComponent] [AutoGenerateComponentState, AutoGenerateComponentPause] public sealed partial class SSDIndicatorComponent : Component { /// /// Whether or not the entity is SSD. /// [AutoNetworkedField] [DataField, ViewVariables(VVAccess.ReadOnly)] public bool IsSSD = true; /// /// The icon displayed next to the associated entity when it is SSD. /// [DataField] public ProtoId Icon = "SSDIcon"; /// /// The time at which the entity will fall asleep, if is true. /// [AutoNetworkedField, AutoPausedField] [Access(typeof(SSDIndicatorSystem))] [DataField(customTypeSerializer: typeof(TimeOffsetSerializer))] public TimeSpan FallAsleepTime = TimeSpan.Zero; /// /// The next time this component will be updated. /// [AutoNetworkedField, AutoPausedField] [DataField(customTypeSerializer: typeof(TimeOffsetSerializer))] public TimeSpan NextUpdate = TimeSpan.Zero; /// /// The time between updates checking if the entity should be force slept. /// [DataField] public TimeSpan UpdateInterval = TimeSpan.FromSeconds(1); }