using Content.Shared.Access.Systems; using Content.Shared.Containers.ItemSlots; using Robust.Shared.GameStates; using Robust.Shared.Prototypes; using Robust.Shared.Serialization; using Content.Shared.Roles; // Frontier namespace Content.Shared.Access.Components; [RegisterComponent, NetworkedComponent, AutoGenerateComponentState] [Access(typeof(SharedIdCardConsoleSystem))] public sealed partial class IdCardConsoleComponent : Component { public const int MaxFullNameLength = 30; public const int MaxJobTitleLength = 30; public static string PrivilegedIdCardSlotId = "IdCardConsole-privilegedId"; public static string TargetIdCardSlotId = "IdCardConsole-targetId"; [DataField] public ItemSlot PrivilegedIdSlot = new(); [DataField] public ItemSlot TargetIdSlot = new(); [Serializable, NetSerializable] public sealed class WriteToTargetIdMessage : BoundUserInterfaceMessage { public readonly string FullName; public readonly string JobTitle; public readonly List> AccessList; public readonly ProtoId JobPrototype; // Frontier: AccessPrototype> accessList, ProtoId jobPrototype) // Frontier: jobProtoype - AccessPrototype> AccessLevels = new() { "Armory", //"Atmospherics", "Bailiff", // Frontier //"Bar", "Brig", "Brigmedic", // Frontier "Captain", //"Cargo", //"Chapel", //"Chemistry", //"ChiefMedicalOfficer", "Command", //"Cryogenics", "Detective", // Frontier: moved into alphabetical order "Engineering", "External", "Frontier", // Frontier //"Hydroponics", "Janitor", //"Kitchen", //"Lawyer", "Mail", // Frontier "Maintenance", "Medical", "Mercenary", // Frontier "ChiefEngineer", // Frontier: moved down, alphabetic w.r.t. "Plant Manager" //"Quartermaster", //"Research", //"ResearchDirector", //"Salvage", "Security", "Sergeant", // Frontier "Service", "HeadOfSecurity", // Frontier: moved down, alphabetic w.r.t. "Sheriff" "HeadOfPersonnel", // Frontier: moved down, alphabetic w.r.t. "Station Representative" "StationTrafficController", // Frontier //"Theatre", }; [Serializable, NetSerializable] public sealed class IdCardConsoleBoundUserInterfaceState : BoundUserInterfaceState { public readonly string PrivilegedIdName; public readonly bool IsPrivilegedIdPresent; public readonly bool IsPrivilegedIdAuthorized; public readonly bool IsTargetIdPresent; public readonly string TargetIdName; public readonly string? TargetIdFullName; public readonly string? TargetIdJobTitle; public readonly bool HasOwnedShuttle; // Frontier public readonly string?[]? TargetShuttleNameParts; // Frontier public readonly List>? TargetIdAccessList; public readonly List>? AllowedModifyAccessList; public readonly ProtoId TargetIdJobPrototype; // Frontier: AccessLevelPrototype>? targetIdAccessList, List>? allowedModifyAccessList, ProtoId targetIdJobPrototype, // Frontier: AccessLevelPrototype