fish-station/Content.Shared/Administration/PlayerInfo.cs
Vigers Ray 6020a6fd5b Merge remote-tracking branch 'space-wizards/master'
# Conflicts:
#	Content.Client/Administration/UI/Tabs/PlayerTab/PlayerTab.xaml.cs
#	Content.Client/Administration/UI/Tabs/PlayerTab/PlayerTabEntry.xaml.cs
#	Content.Server/Weapons/Ranged/Systems/GunSystem.cs
#	Content.Server/Zombies/ZombieSystem.cs
#	Content.Shared/Inventory/InventorySystem.Relay.cs
#	Content.Shared/Zombies/SharedZombieSystem.cs
#	Content.Shared/Zombies/ZombieComponent.cs
#	Resources/Locale/en-US/_strings/research/technologies.ftl
#	Resources/Prototypes/Entities/Clothing/OuterClothing/bio.yml
#	Resources/Prototypes/Polymorphs/polymorph.yml
#	Resources/Prototypes/Recipes/Lathes/security.yml
#	Resources/Prototypes/Research/arsenal.yml
#	Resources/Prototypes/Research/experimental.yml
2025-04-17 00:07:59 +03:00

41 lines
1,023 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,
LocId? Subtype,
int SortWeight,
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();
}
}