Station alert levels (#8226)
This commit is contained in:
8
Content.Shared/AlertLevel/AlertLevelDisplayComponent.cs
Normal file
8
Content.Shared/AlertLevel/AlertLevelDisplayComponent.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
namespace Content.Shared.AlertLevel;
|
||||
|
||||
[RegisterComponent]
|
||||
public sealed class AlertLevelDisplayComponent : Component
|
||||
{
|
||||
[DataField("alertVisuals")]
|
||||
public readonly Dictionary<string, string> AlertVisuals = new();
|
||||
}
|
||||
10
Content.Shared/AlertLevel/SharedAlertLevelDisplay.cs
Normal file
10
Content.Shared/AlertLevel/SharedAlertLevelDisplay.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using Robust.Shared.Serialization;
|
||||
|
||||
namespace Content.Shared.AlertLevel;
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public enum AlertLevelDisplay
|
||||
{
|
||||
CurrentLevel,
|
||||
Layer
|
||||
}
|
||||
@@ -14,13 +14,30 @@ namespace Content.Shared.Communications
|
||||
public readonly bool CanCall;
|
||||
public readonly TimeSpan? ExpectedCountdownEnd;
|
||||
public readonly bool CountdownStarted;
|
||||
public List<string>? AlertLevels;
|
||||
public string CurrentAlert;
|
||||
public float CurrentAlertDelay;
|
||||
|
||||
public CommunicationsConsoleInterfaceState(bool canAnnounce, bool canCall, TimeSpan? expectedCountdownEnd = null)
|
||||
public CommunicationsConsoleInterfaceState(bool canAnnounce, bool canCall, List<string>? alertLevels, string currentAlert, float currentAlertDelay, TimeSpan? expectedCountdownEnd = null)
|
||||
{
|
||||
CanAnnounce = canAnnounce;
|
||||
CanCall = canCall;
|
||||
ExpectedCountdownEnd = expectedCountdownEnd;
|
||||
CountdownStarted = expectedCountdownEnd != null;
|
||||
AlertLevels = alertLevels;
|
||||
CurrentAlert = currentAlert;
|
||||
CurrentAlertDelay = currentAlertDelay;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public sealed class CommunicationsConsoleSelectAlertLevelMessage : BoundUserInterfaceMessage
|
||||
{
|
||||
public readonly string Level;
|
||||
|
||||
public CommunicationsConsoleSelectAlertLevelMessage(string level)
|
||||
{
|
||||
Level = level;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user