using Robust.Shared.Audio; using Robust.Shared.Prototypes; namespace Content.Server.AlertLevel; [Prototype("alertLevels")] public sealed partial class AlertLevelPrototype : IPrototype { [IdDataField] public string ID { get; private set; } = default!; /// /// Dictionary of alert levels. Keyed by string - the string key is the most important /// part here. Visualizers will use this in order to dictate what alert level to show on /// client side sprites, and localization uses each key to dictate the alert level name. /// [DataField("levels")] public Dictionary Levels = new(); /// /// Default level that the station is on upon initialization. /// If this isn't in the dictionary, this will default to whatever .First() gives. /// [DataField("defaultLevel")] public string DefaultLevel { get; private set; } = default!; } /// /// Alert level detail. Does not contain an ID, that is handled by /// the Levels field in AlertLevelPrototype. /// [DataDefinition] public sealed partial class AlertLevelDetail { /// /// What is announced upon this alert level change. Can be a localized string. /// [DataField("announcement")] public string Announcement { get; private set; } = string.Empty; /// /// Whether this alert level is selectable from a communications console. /// [DataField("selectable")] public bool Selectable { get; private set; } = true; /// /// If this alert level disables user selection while it is active. Beware - /// setting this while something is selectable will disable selection permanently! /// This should only apply to entities or gamemodes that auto-select an alert level, /// such as a nuclear bomb being set to active. /// [DataField("disableSelection")] public bool DisableSelection { get; private set; } /// /// The sound that this alert level will play in-game once selected. /// [DataField("sound")] public SoundSpecifier? Sound { get; private set; } /// /// The color that this alert level will show in-game in chat. /// [DataField("color")] public Color Color { get; private set; } = Color.White; /// /// The color to turn emergency lights on this station when they are active. /// [DataField("emergencyLightColor")] public Color EmergencyLightColor { get; private set; } = Color.FromHex("#FF4020"); /// /// Will this alert level force emergency lights on for the station that's active? /// [DataField("forceEnableEmergencyLights")] public bool ForceEnableEmergencyLights { get; private set; } = false; /// /// How long it takes for the shuttle to arrive when called. /// [DataField("shuttleTime")] public TimeSpan ShuttleTime { get; private set; } = TimeSpan.FromMinutes(5); }