Modify admin chat (#13050)

* split admin chat into new channel

* add ability to play audio when a chat message is received and add audio to admin chat

* give client control of AdminChat sound and volume + suppress sound for senders
This commit is contained in:
Chief-Engineer
2022-12-19 21:39:01 -06:00
committed by GitHub
parent 8b347dd70f
commit 5ece9bd9e8
12 changed files with 55 additions and 21 deletions

View File

@@ -16,11 +16,13 @@ namespace Content.Shared.Chat
public EntityUid SenderEntity;
public bool HideChat;
public Color? MessageColorOverride;
public string? AudioPath;
public float AudioVolume;
[NonSerialized]
public bool Read;
public ChatMessage(ChatChannel channel, string message, string wrappedMessage, EntityUid source, bool hideChat = false, Color? colorOverride = null)
public ChatMessage(ChatChannel channel, string message, string wrappedMessage, EntityUid source, bool hideChat = false, Color? colorOverride = null, string? audioPath = null, float audioVolume = 0)
{
Channel = channel;
Message = message;
@@ -28,6 +30,8 @@ namespace Content.Shared.Chat
SenderEntity = source;
HideChat = hideChat;
MessageColorOverride = colorOverride;
AudioPath = audioPath;
AudioVolume = audioVolume;
}
}