mirror of
https://github.com/WWhiteDreamProject/wwdpublic.git
synced 2026-04-18 05:59:03 +03:00
* namespaces * Comment does not need a semicolon --------- Co-authored-by: Vasilis <vascreeper@yahoo.com> (cherry picked from commit 40b9fd4ea3b1e06558d8e510c527169965193ccc)
38 lines
895 B
C#
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();
|
|
}
|
|
}
|