Comms Console Announcements (#3629)
* Communications console announcements * title case for jobs * Helper * Prevent abuse * Cap message length * more abuse prevention * Validate clientside too to reduce bandwidth from unmodified clients
This commit is contained in:
@@ -13,18 +13,31 @@ namespace Content.Shared.GameObjects.Components.Command
|
||||
[Serializable, NetSerializable]
|
||||
public class CommunicationsConsoleInterfaceState : BoundUserInterfaceState
|
||||
{
|
||||
public readonly bool CanAnnounce;
|
||||
public readonly bool CanCall;
|
||||
public readonly TimeSpan? ExpectedCountdownEnd;
|
||||
public readonly bool CountdownStarted;
|
||||
|
||||
public CommunicationsConsoleInterfaceState(bool canCall, TimeSpan? expectedCountdownEnd = null)
|
||||
public CommunicationsConsoleInterfaceState(bool canAnnounce, bool canCall, TimeSpan? expectedCountdownEnd = null)
|
||||
{
|
||||
CanAnnounce = canAnnounce;
|
||||
CanCall = canCall;
|
||||
ExpectedCountdownEnd = expectedCountdownEnd;
|
||||
CountdownStarted = expectedCountdownEnd != null;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public class CommunicationsConsoleAnnounceMessage : BoundUserInterfaceMessage
|
||||
{
|
||||
public readonly string Message;
|
||||
|
||||
public CommunicationsConsoleAnnounceMessage(string message)
|
||||
{
|
||||
Message = message;
|
||||
}
|
||||
}
|
||||
|
||||
[Serializable, NetSerializable]
|
||||
public class CommunicationsConsoleCallEmergencyShuttleMessage : BoundUserInterfaceMessage
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user