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,9 +1,9 @@
using System.IO;
using JetBrains.Annotations;
using Lidgren.Network;
using Robust.Shared.Network;
using Robust.Shared.Serialization;
using Robust.Shared.Utility;
using System.IO;
namespace Content.Shared.Chat
{
@@ -14,6 +14,14 @@ namespace Content.Shared.Chat
public string Message;
public string WrappedMessage;
public NetEntity SenderEntity;
/// <summary>
/// Identifier sent when <see cref="SenderEntity"/> is <see cref="NetEntity.Invalid"/>
/// if this was sent by a player to assign a key to the sender of this message.
/// This is unique per sender.
/// </summary>
public int? SenderKey;
public bool HideChat;
public Color? MessageColorOverride;
public string? AudioPath;
@@ -22,12 +30,13 @@ namespace Content.Shared.Chat
[NonSerialized]
public bool Read;
public ChatMessage(ChatChannel channel, string message, string wrappedMessage, NetEntity source, bool hideChat = false, Color? colorOverride = null, string? audioPath = null, float audioVolume = 0)
public ChatMessage(ChatChannel channel, string message, string wrappedMessage, NetEntity source, int? senderKey, bool hideChat = false, Color? colorOverride = null, string? audioPath = null, float audioVolume = 0)
{
Channel = channel;
Message = message;
WrappedMessage = wrappedMessage;
SenderEntity = source;
SenderKey = senderKey;
HideChat = hideChat;
MessageColorOverride = colorOverride;
AudioPath = audioPath;