# Conflicts: # Content.Client/Administration/UI/Tabs/PlayerTab/PlayerTab.xaml.cs # Content.Client/Chat/Managers/ChatManager.cs # Content.Server/Administration/Systems/AdminSystem.cs # Content.Server/Chat/Managers/ChatManager.cs # Content.Server/Ghost/Roles/GhostRoleSystem.cs # Content.Server/Zombies/ZombieSystem.Transform.cs # Content.Shared/Administration/PlayerInfo.cs
37 lines
923 B
C#
37 lines
923 B
C#
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,
|
|
NetEntity? NetEntity,
|
|
NetUserId SessionId,
|
|
bool Connected,
|
|
bool ActiveThisRound,
|
|
TimeSpan? OverallPlaytime,
|
|
bool IsSponsor, // Sunrise-Sponsors
|
|
string? SponsorTitle) // Sunrise-Sponsors)
|
|
{
|
|
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();
|
|
}
|
|
}
|