using Content.Shared.Chat;
namespace Content.Server.Chat;
public sealed class ChatUser
{
///
/// The unique key associated with this chat user, starting from 1 and incremented.
/// Used when the server sends .
/// Used on the client to delete messages sent by this user when receiving
/// .
///
public readonly int Key;
///
/// All entities that this chat user was attached to while sending chat messages.
/// Sent to the client to delete messages sent by those entities when receiving
/// .
///
public readonly HashSet Entities = new();
public ChatUser(int key)
{
Key = key;
}
public void AddEntity(NetEntity entity)
{
if (!entity.Valid)
return;
Entities.Add(entity);
}
}