using Robust.Shared.GameStates;
using Robust.Shared.Prototypes;
using Robust.Shared.Serialization.TypeSerializers.Implementations.Custom;
namespace Content.Shared.AlertLevel;
///
/// Alert level component. This is the component given to a station to
/// signify its alert level state.
///
[RegisterComponent, NetworkedComponent]
[AutoGenerateComponentState, AutoGenerateComponentPause]
[Access(typeof(AlertLevelSystem))]
public sealed partial class AlertLevelComponent : Component
{
///
/// The available alert levels for this station.
///
[DataField(required: true), AutoNetworkedField]
public List> AvailableAlertLevels = new();
///
/// The default alert level for this station.
///
[DataField, AutoNetworkedField]
public ProtoId DefaultAlertLevel = "Green";
///
/// The current level on the station.
///
[DataField, AutoNetworkedField]
public ProtoId CurrentAlertLevel = "Green";
///
/// Is changing the alert level currently locked?
/// For example when the nuke is active the level is locked to Delta.
///
[DataField, AutoNetworkedField]
public bool IsLevelLocked = false;
///
/// The time stamp until which changing the alert level is unavailable.
/// Used to prevent spamming alerts in chat.
///
[DataField(customTypeSerializer: typeof(TimeOffsetSerializer))]
[AutoNetworkedField, AutoPausedField]
public TimeSpan? DelayedUntil;
}