CatStation/Content.Shared/Administration/QuickInfoShared.cs
Doru991 252b5f9b09
Make quick info links in the ahelp window more robust (#44373)
* Store last player whose mind was in container

* Send last player who controlled the entity's session ID along with other quick info

* No more spam

* Display last player info if there is no active player on entity

* Better looking separator

* Better looking separator but I didnt forget to ctrl s this time

* newline

* Address reviews

* cleaning

* Tiny tweaks

---------

Co-authored-by: ScarKy0 <scarky0@onet.eu>
Co-authored-by: Connor Huffine <chuffine@gmail.com>
2026-07-08 08:32:08 +00:00

32 lines
1,000 B
C#

using Robust.Shared.Network;
using Robust.Shared.Serialization;
namespace Content.Shared.Administration;
/// <summary>
/// Shared datatypes and constants for the administrative quick info system.
/// </summary>
/// <remarks>
/// "Quick Info" Allows admins to quickly get basic information & action links
/// about (player) entities in nice little popups.
/// </remarks>
public static class QuickInfoShared
{
public const AdminFlags RequiredFlag = AdminFlags.Adminhelp;
public const string CommandName = "_admin_quick_info";
[Serializable, NetSerializable]
public sealed class Request : EntityEventArgs
{
public required NetEntity[] Entities;
}
[Serializable, NetSerializable]
public sealed class Response : EntityEventArgs
{
public required SingleEntityInfo[] Entities;
}
[Serializable, NetSerializable]
public sealed record SingleEntityInfo(NetEntity Entity, bool Exists, string Name, string? Prototype, NetUserId? LastPlayer);
}