Files
crystall-punk-14/Content.Shared/Access/SharedAgentIDCardSystem.cs

73 lines
2.1 KiB
C#
Raw Normal View History

2022-04-15 17:15:25 -04:00
using Robust.Shared.Serialization;
namespace Content.Shared.Access.Systems
{
public abstract class SharedAgentIdCardSystem : EntitySystem
2022-04-15 17:15:25 -04:00
{
// Just for friending for now
2022-04-15 17:15:25 -04:00
}
2022-04-15 17:15:25 -04:00
/// <summary>
2023-09-11 21:20:46 +10:00
/// Key representing which <see cref="PlayerBoundUserInterface"/> is currently open.
2022-04-15 17:15:25 -04:00
/// Useful when there are multiple UI for an object. Here it's future-proofing only.
/// </summary>
[Serializable, NetSerializable]
public enum AgentIDCardUiKey : byte
2022-04-15 17:15:25 -04:00
{
Key,
}
/// <summary>
/// Represents an <see cref="AgentIDCardComponent"/> state that can be sent to the client
/// </summary>
[Serializable, NetSerializable]
public sealed class AgentIDCardBoundUserInterfaceState : BoundUserInterfaceState
{
public readonly HashSet<string> Icons;
2022-04-15 17:15:25 -04:00
public string CurrentName { get; }
public string CurrentJob { get; }
public string CurrentJobIconId { get; }
2022-04-15 17:15:25 -04:00
public AgentIDCardBoundUserInterfaceState(string currentName, string currentJob, string currentJobIconId, HashSet<string> icons)
2022-04-15 17:15:25 -04:00
{
Icons = icons;
2022-04-15 17:15:25 -04:00
CurrentName = currentName;
CurrentJob = currentJob;
CurrentJobIconId = currentJobIconId;
2022-04-15 17:15:25 -04:00
}
}
[Serializable, NetSerializable]
public sealed class AgentIDCardNameChangedMessage : BoundUserInterfaceMessage
{
public string Name { get; }
public AgentIDCardNameChangedMessage(string name)
{
Name = name;
}
}
[Serializable, NetSerializable]
public sealed class AgentIDCardJobChangedMessage : BoundUserInterfaceMessage
{
public string Job { get; }
2022-04-15 17:15:25 -04:00
public AgentIDCardJobChangedMessage(string job)
{
Job = job;
}
}
[Serializable, NetSerializable]
public sealed class AgentIDCardJobIconChangedMessage : BoundUserInterfaceMessage
{
public string JobIconId { get; }
public AgentIDCardJobIconChangedMessage(string jobIconId)
{
JobIconId = jobIconId;
}
}
2022-04-15 17:15:25 -04:00
}