Add admin Erase verb, add checkbox to erase from the ban panel (#20985)

This commit is contained in:
DrSmugleaf
2023-10-14 02:02:56 -07:00
committed by GitHub
parent 3a2482420f
commit 5be0df32ad
22 changed files with 297 additions and 57 deletions

View File

@@ -1,5 +1,3 @@
using Content.Client.Chat;
using Content.Client.Chat.TypingIndicator;
using Content.Client.UserInterface.Systems.Chat.Controls;
using Content.Shared.Chat;
using Content.Shared.Input;
@@ -54,14 +52,12 @@ public partial class ChatBox : UIWidget
return;
}
if (msg is { Read: false, AudioPath: { } })
if (msg is { Read: false, AudioPath: not null })
SoundSystem.Play(msg.AudioPath, Filter.Local(), new AudioParams().WithVolume(msg.AudioVolume));
msg.Read = true;
var color = msg.MessageColorOverride != null
? msg.MessageColorOverride.Value
: msg.Channel.TextColor();
var color = msg.MessageColorOverride ?? msg.Channel.TextColor();
AddLine(msg.WrappedMessage, color);
}