forked from space-syndicate/space-station-14
Портировано из space-wizards/space-station-14#41899 Изменения: - Добавлено подтверждение при изменении уровня угрозы (предотвращает случайные изменения) - Разделены кнопки вызова/отзыва шаттла в отдельные UI области - Созданы отдельные вкладки для объявлений и трансляции - Разбито монолитное меню на 3 виджета: AlertLevelControls, MessagingControls, ShuttleControls - Добавлен LCD-дисплей с таймером обратного отсчета - Обновлены текстуры и шрифты Локализация: - Полностью переведены новые строки на русский язык в стиле Corvax 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
84 lines
2.6 KiB
C#
84 lines
2.6 KiB
C#
using Robust.Shared.Serialization;
|
|
|
|
namespace Content.Shared.Communications
|
|
{
|
|
[Virtual]
|
|
public partial class SharedCommunicationsConsoleComponent : Component
|
|
{
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public sealed class CommunicationsConsoleInterfaceState : BoundUserInterfaceState
|
|
{
|
|
public readonly bool CanAnnounce;
|
|
public readonly bool CanBroadcast = true;
|
|
public readonly bool CanCall;
|
|
public readonly TimeSpan? ExpectedCountdownEnd;
|
|
public readonly bool CountdownStarted;
|
|
public List<string>? AlertLevels;
|
|
public string CurrentAlert;
|
|
public Color CurrentAlertColor;
|
|
public float CurrentAlertDelay;
|
|
|
|
public CommunicationsConsoleInterfaceState(bool canAnnounce, bool canCall, List<string>? alertLevels, string currentAlert, Color currentAlertColor, float currentAlertDelay, TimeSpan? expectedCountdownEnd = null)
|
|
{
|
|
CanAnnounce = canAnnounce;
|
|
CanCall = canCall;
|
|
ExpectedCountdownEnd = expectedCountdownEnd;
|
|
CountdownStarted = expectedCountdownEnd != null;
|
|
AlertLevels = alertLevels;
|
|
CurrentAlert = currentAlert;
|
|
CurrentAlertColor = currentAlertColor;
|
|
CurrentAlertDelay = currentAlertDelay;
|
|
}
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public sealed class CommunicationsConsoleSelectAlertLevelMessage : BoundUserInterfaceMessage
|
|
{
|
|
public readonly string Level;
|
|
|
|
public CommunicationsConsoleSelectAlertLevelMessage(string level)
|
|
{
|
|
Level = level;
|
|
}
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public sealed class CommunicationsConsoleAnnounceMessage : BoundUserInterfaceMessage
|
|
{
|
|
public readonly string Message;
|
|
|
|
public CommunicationsConsoleAnnounceMessage(string message)
|
|
{
|
|
Message = message;
|
|
}
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public sealed class CommunicationsConsoleBroadcastMessage : BoundUserInterfaceMessage
|
|
{
|
|
public readonly string Message;
|
|
public CommunicationsConsoleBroadcastMessage(string message)
|
|
{
|
|
Message = message;
|
|
}
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public sealed class CommunicationsConsoleCallEmergencyShuttleMessage : BoundUserInterfaceMessage
|
|
{
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public sealed class CommunicationsConsoleRecallEmergencyShuttleMessage : BoundUserInterfaceMessage
|
|
{
|
|
}
|
|
|
|
[Serializable, NetSerializable]
|
|
public enum CommunicationsConsoleUiKey
|
|
{
|
|
Key
|
|
}
|
|
}
|