Namespace cleanup around Mind Roles (#30965)

* namespaces

* Comment does not need a semicolon

---------

Co-authored-by: Vasilis <vascreeper@yahoo.com>
This commit is contained in:
Errant
2024-08-15 20:26:57 +02:00
committed by GitHub
parent f523df821a
commit 40b9fd4ea3
14 changed files with 2356 additions and 2370 deletions

View File

@@ -1,36 +1,35 @@
using Robust.Shared.Network;
using Robust.Shared.Serialization;
namespace Content.Shared.Administration
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)
{
[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)
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)
{
private string? _playtimeString;
return other?.SessionId == SessionId;
}
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();
}
public override int GetHashCode()
{
return SessionId.GetHashCode();
}
}