CatStation/Content.Shared/Administration/PlayerPanelEuiState.cs
Axionyx bad5a2bda6
Add trust score and account creation date to the player panel (#44317)
* Track account creation date and trust score in ContentPlayerData

* Fix local connection check

I feel like I'm overlooking an obvious way to more easily determine this but whatever

* Add trust score & creation date to the player panel

* Adress reviews

* Use IsLocal instead of magic string

Requires engige update

* Change trust thing to be not silly

Maybe a bit more complicated though? I dunno, I personally think this is more sane

* Revert "Track account creation date and trust score in ContentPlayerData"

This reverts commit 26b8df56

I am incredibly stupid and apparently did not look hard enough
2026-06-21 20:04:24 +00:00

61 lines
1.8 KiB
C#

using Content.Shared.Eui;
using Robust.Shared.Network;
using Robust.Shared.Serialization;
namespace Content.Shared.Administration;
[Serializable, NetSerializable]
public sealed class PlayerPanelEuiState(
NetUserId guid,
string username,
TimeSpan playtime,
int? totalNotes,
int? totalBans,
int? totalRoleBans,
int sharedConnections,
bool? whitelisted,
bool canFreeze,
bool frozen,
bool canAhelp,
float trustScore,
DateTime? accountCreationDate)
: EuiStateBase
{
public readonly NetUserId Guid = guid;
public readonly string Username = username;
public readonly TimeSpan Playtime = playtime;
public readonly int? TotalNotes = totalNotes;
public readonly int? TotalBans = totalBans;
public readonly int? TotalRoleBans = totalRoleBans;
public readonly int SharedConnections = sharedConnections;
public readonly bool? Whitelisted = whitelisted;
public readonly bool CanFreeze = canFreeze;
public readonly bool Frozen = frozen;
public readonly bool CanAhelp = canAhelp;
public readonly float TrustScore = trustScore;
public readonly DateTime? AccountCreationDate = accountCreationDate;
}
[Serializable, NetSerializable]
public sealed class PlayerPanelFreezeMessage : EuiMessageBase
{
public readonly bool Mute;
public PlayerPanelFreezeMessage(bool mute = false)
{
Mute = mute;
}
}
[Serializable, NetSerializable]
public sealed class PlayerPanelLogsMessage : EuiMessageBase;
[Serializable, NetSerializable]
public sealed class PlayerPanelDeleteMessage : EuiMessageBase;
[Serializable, NetSerializable]
public sealed class PlayerPanelRejuvenationMessage: EuiMessageBase;
[Serializable, NetSerializable]
public sealed class PlayerPanelFollowMessage: EuiMessageBase;