Files
wwdpublic/Content.Shared/Administration/PlayerInfo.cs
Errant c435260ac0 Namespace cleanup around Mind Roles (#30965)
* namespaces

* Comment does not need a semicolon

---------

Co-authored-by: Vasilis <vascreeper@yahoo.com>

(cherry picked from commit 40b9fd4ea3b1e06558d8e510c527169965193ccc)
2025-07-20 14:08:40 +10:00

38 lines
895 B
C#

using Content.Shared.Mind;
using Robust.Shared.Network;
using Robust.Shared.Serialization;
namespace Content.Shared.Administration;
[Serializable, NetSerializable]
public sealed record PlayerInfo(
string Username,
string CharacterName,
string IdentityName,
string StartingJob,
bool Antag,
RoleTypePrototype RoleProto,
NetEntity? NetEntity,
NetUserId SessionId,
bool Connected,
bool ActiveThisRound,
TimeSpan? OverallPlaytime)
{
private string? _playtimeString;
public bool IsPinned { get; set; }
public string PlaytimeString => _playtimeString ??=
OverallPlaytime?.ToString("%d':'hh':'mm") ?? Loc.GetString("generic-unknown-title");
public bool Equals(PlayerInfo? other)
{
return other?.SessionId == SessionId;
}
public override int GetHashCode()
{
return SessionId.GetHashCode();
}
}