mirror of
https://github.com/space-wizards/RobustToolbox.git
synced 2026-09-06 17:58:05 +02:00
* Remove IP address from ViewVariables * Remove HWId from ViewVariables
43 lines
1.1 KiB
C#
43 lines
1.1 KiB
C#
using System.Collections.Immutable;
|
|
using System.Text;
|
|
using Robust.Shared.ViewVariables;
|
|
|
|
namespace Robust.Shared.Network
|
|
{
|
|
/// <summary>
|
|
/// Contains data about players returned from auth server.
|
|
/// </summary>
|
|
public sealed record NetUserData
|
|
{
|
|
[ViewVariables]
|
|
public NetUserId UserId { get; }
|
|
|
|
[ViewVariables]
|
|
public string UserName { get; }
|
|
|
|
[ViewVariables]
|
|
public string? PatronTier { get; init; }
|
|
|
|
public ImmutableArray<byte> HWId { get; init; }
|
|
|
|
public NetUserData(NetUserId userId, string userName)
|
|
{
|
|
UserId = userId;
|
|
UserName = userName;
|
|
}
|
|
|
|
public sealed override string ToString()
|
|
{
|
|
var stringBuilder = new StringBuilder();
|
|
stringBuilder.Append("NetUserData"); // type name
|
|
stringBuilder.Append(" { ");
|
|
if ((this with { HWId = default }).PrintMembers(stringBuilder))
|
|
{
|
|
stringBuilder.Append(' ');
|
|
}
|
|
stringBuilder.Append('}');
|
|
return stringBuilder.ToString();
|
|
}
|
|
}
|
|
}
|