diff --git a/Content.Client/EntryPoint.cs b/Content.Client/EntryPoint.cs index 33597d77ac..c82ac92871 100644 --- a/Content.Client/EntryPoint.cs +++ b/Content.Client/EntryPoint.cs @@ -106,6 +106,7 @@ namespace Content.Client "IdCard", "Access", "AccessReader", + "IdCardConsole", }; foreach (var ignoreName in registerIgnore) diff --git a/Content.Client/GameObjects/Components/Access/IdCardConsoleBoundUserInterface.cs b/Content.Client/GameObjects/Components/Access/IdCardConsoleBoundUserInterface.cs new file mode 100644 index 0000000000..ebd658d479 --- /dev/null +++ b/Content.Client/GameObjects/Components/Access/IdCardConsoleBoundUserInterface.cs @@ -0,0 +1,52 @@ +using System.Collections.Generic; +using Robust.Client.GameObjects.Components.UserInterface; +using Robust.Shared.GameObjects.Components.UserInterface; +using Robust.Shared.IoC; +using Robust.Shared.Localization; +using static Content.Shared.GameObjects.Components.Access.SharedIdCardConsoleComponent; + +namespace Content.Client.GameObjects.Components.Access +{ + public class IdCardConsoleBoundUserInterface : BoundUserInterface + { +#pragma warning disable 649 + [Dependency] private readonly ILocalizationManager _localizationManager; +#pragma warning restore 649 + public IdCardConsoleBoundUserInterface(ClientUserInterfaceComponent owner, object uiKey) : base(owner, uiKey) + { + } + + private IdCardConsoleWindow _window; + + protected override void Open() + { + IoCManager.InjectDependencies(this); + base.Open(); + + _window = new IdCardConsoleWindow(this, _localizationManager); + _window.Title = Owner.Owner.Name; + _window.OnClose += Close; + _window.OpenCentered(); + } + + protected override void UpdateState(BoundUserInterfaceState state) + { + base.UpdateState(state); + var castState = (IdCardConsoleBoundUserInterfaceState) state; + _window.UpdateState(castState); + } + + public void ButtonPressed(UiButton button) + { + SendMessage(new IdButtonPressedMessage(button)); + } + + public void SubmitData(string newFullName, string newJobTitle, List newAccessList) + { + SendMessage(new WriteToTargetIdMessage( + newFullName, + newJobTitle, + newAccessList)); + } + } +} diff --git a/Content.Client/GameObjects/Components/Access/IdCardConsoleWindow.cs b/Content.Client/GameObjects/Components/Access/IdCardConsoleWindow.cs new file mode 100644 index 0000000000..abedc157d0 --- /dev/null +++ b/Content.Client/GameObjects/Components/Access/IdCardConsoleWindow.cs @@ -0,0 +1,143 @@ +using System.Collections.Generic; +using System.Linq; +using Content.Shared.Access; +using Robust.Client.UserInterface.Controls; +using Robust.Client.UserInterface.CustomControls; +using Robust.Shared.Localization; +using Robust.Shared.Maths; +using Robust.Shared.Utility; +using static Content.Shared.GameObjects.Components.Access.SharedIdCardConsoleComponent; + +namespace Content.Client.GameObjects.Components.Access +{ + public class IdCardConsoleWindow : SS14Window + { + private readonly Label _fullNameLabel; + private readonly LineEdit _fullNameLineEdit; + private readonly Label _jobTitleLabel; + private readonly LineEdit _jobTitleLineEdit; + private readonly IdCardConsoleBoundUserInterface _owner; + private readonly Button _privilegedIdButton; + private readonly Button _targetIdButton; + private readonly Button _submitButton; + private readonly ILocalizationManager _localizationManager; + + private Dictionary _accessButtons = new Dictionary(); + + public IdCardConsoleWindow(IdCardConsoleBoundUserInterface owner, ILocalizationManager localizationManager) + { + _localizationManager = localizationManager; + _owner = owner; + var vBox = new VBoxContainer(); + + { + var hBox = new HBoxContainer(); + vBox.AddChild(hBox); + + _privilegedIdButton = new Button(); + _privilegedIdButton.OnPressed += _ => _owner.ButtonPressed(UiButton.PrivilegedId); + hBox.AddChild(_privilegedIdButton); + + _targetIdButton = new Button(); + _targetIdButton.OnPressed += _ => _owner.ButtonPressed(UiButton.TargetId); + hBox.AddChild(_targetIdButton); + } + + { + var hBox = new HBoxContainer(); + vBox.AddChild(hBox); + hBox.AddChild(_fullNameLabel = new Label() + { + Text = localizationManager.GetString("Full name:") + }); + + _fullNameLineEdit = new LineEdit() + { + SizeFlagsHorizontal = SizeFlags.FillExpand, + }; + hBox.AddChild(_fullNameLineEdit); + } + + { + var hBox = new HBoxContainer(); + vBox.AddChild(hBox); + hBox.AddChild(_jobTitleLabel = new Label() + { + Text = localizationManager.GetString("Job title:") + }); + + _jobTitleLineEdit = new LineEdit() + { + SizeFlagsHorizontal = SizeFlags.FillExpand + }; + hBox.AddChild(_jobTitleLineEdit); + } + + { + var hBox = new HBoxContainer(); + vBox.AddChild(hBox); + + foreach (var accessName in SharedAccess.AllAccess) + { + var newButton = new Button() + { + Text = accessName, + ToggleMode = true, + }; + hBox.AddChild(newButton); + _accessButtons.Add(accessName, newButton); + } + } + + { + var hBox = new HBoxContainer(); + vBox.AddChild(hBox); + + _submitButton = new Button() + { + Text = localizationManager.GetString("Submit") + }; + _submitButton.OnPressed += _ => owner.SubmitData( + _fullNameLineEdit.Text, + _jobTitleLineEdit.Text, + // Iterate over the buttons dictionary, filter by `Pressed`, only get key from the key/value pair + _accessButtons.Where(x => x.Value.Pressed).Select(x => x.Key).ToList()); + hBox.AddChild(_submitButton); + } + + Contents.AddChild(vBox); + } + + public void UpdateState(IdCardConsoleBoundUserInterfaceState state) + { + _privilegedIdButton.Text = state.IsPrivilegedIdPresent + ? _localizationManager.GetString("Remove privileged ID card") + : _localizationManager.GetString("Insert privileged ID card"); + + _targetIdButton.Text = state.IsTargetIdPresent + ? _localizationManager.GetString("Remove target ID card") + : _localizationManager.GetString("Insert target ID card"); + + var interfaceEnabled = state.IsPrivilegedIdPresent && state.IsPrivilegedIdAuthorized && state.IsTargetIdPresent; + + _fullNameLabel.Modulate = interfaceEnabled ? Color.White : Color.Gray; + _fullNameLineEdit.Editable = interfaceEnabled; + _fullNameLineEdit.Text = state.TargetIdFullName; + + _jobTitleLabel.Modulate = interfaceEnabled ? Color.White : Color.Gray; + _jobTitleLineEdit.Editable = interfaceEnabled; + _jobTitleLineEdit.Text = state.TargetIdJobTitle; + + foreach (var (accessName, button) in _accessButtons) + { + button.Disabled = !interfaceEnabled; + if (interfaceEnabled) + { + button.Pressed = state.TargetIdAccessList.Contains(accessName); + } + } + + _submitButton.Disabled = !interfaceEnabled; + } + } +} diff --git a/Content.Server/GameObjects/Components/Access/AccessComponent.cs b/Content.Server/GameObjects/Components/Access/AccessComponent.cs index 4de9021f28..fa122346b7 100644 --- a/Content.Server/GameObjects/Components/Access/AccessComponent.cs +++ b/Content.Server/GameObjects/Components/Access/AccessComponent.cs @@ -9,14 +9,13 @@ namespace Content.Server.GameObjects.Components.Access public class AccessComponent : Component { public override string Name => "Access"; - private List _tags; [ViewVariables] - public List Tags => _tags; + public List Tags; public override void ExposeData(ObjectSerializer serializer) { base.ExposeData(serializer); - serializer.DataField(ref _tags, "tags", new List()); + serializer.DataField(ref Tags, "tags", new List()); } } } diff --git a/Content.Server/GameObjects/Components/Access/AccessReaderComponent.cs b/Content.Server/GameObjects/Components/Access/AccessReaderComponent.cs index ffa555006e..6eba78317f 100644 --- a/Content.Server/GameObjects/Components/Access/AccessReaderComponent.cs +++ b/Content.Server/GameObjects/Components/Access/AccessReaderComponent.cs @@ -13,9 +13,17 @@ namespace Content.Server.GameObjects.Components.Access public class AccessReader : Component { public override string Name => "AccessReader"; + [ViewVariables] private List _necessaryTags; + [ViewVariables] private List _sufficientTags; + /// + /// Searches an in the entity itself, in its active hand or in its ID slot. + /// Returns true if an is found and its tags list contains + /// at least one of or all of . + /// + /// The entity to be searched for access. public bool IsAllowed(IEntity entity) { var accessProvider = FindAccessProvider(entity); diff --git a/Content.Server/GameObjects/Components/Access/IdCardComponent.cs b/Content.Server/GameObjects/Components/Access/IdCardComponent.cs index 0449164baf..a870dc9438 100644 --- a/Content.Server/GameObjects/Components/Access/IdCardComponent.cs +++ b/Content.Server/GameObjects/Components/Access/IdCardComponent.cs @@ -1,4 +1,3 @@ -using System.Security.Cryptography; using Robust.Shared.GameObjects; using Robust.Shared.Serialization; using Robust.Shared.ViewVariables; @@ -9,10 +8,61 @@ namespace Content.Server.GameObjects.Components.Access public class IdCardComponent : Component { public override string Name => "IdCard"; - [ViewVariables(VVAccess.ReadWrite)] + + /// See . + private string _ownerOriginalName; + private string _fullName; [ViewVariables(VVAccess.ReadWrite)] + public string FullName + { + get => _fullName; + set + { + _fullName = value; + UpdateEntityName(); + } + } + private string _jobTitle; + [ViewVariables(VVAccess.ReadWrite)] + public string JobTitle + { + get => _jobTitle; + set + { + _jobTitle = value; + UpdateEntityName(); + } + } + + /// + /// Changes the of . + /// + /// + /// If either or is empty, it's replaced by placeholders. + /// If both are empty, the original entity's name is restored. + /// + private void UpdateEntityName() + { + if (string.IsNullOrWhiteSpace(FullName) && string.IsNullOrWhiteSpace(JobTitle)) + { + Owner.Name = _ownerOriginalName; + return; + } + + var tempFullName = string.IsNullOrWhiteSpace(FullName) ? "Unknown" : FullName; + var tempJobTitle = string.IsNullOrWhiteSpace(JobTitle) ? "N/A" : JobTitle; + + Owner.Name = $"{_ownerOriginalName} ({tempFullName}, {tempJobTitle})"; + } + + public override void Initialize() + { + base.Initialize(); + _ownerOriginalName = Owner.Name; + UpdateEntityName(); + } public override void ExposeData(ObjectSerializer serializer) { diff --git a/Content.Server/GameObjects/Components/Access/IdCardConsoleComponent.cs b/Content.Server/GameObjects/Components/Access/IdCardConsoleComponent.cs new file mode 100644 index 0000000000..4726bc95ce --- /dev/null +++ b/Content.Server/GameObjects/Components/Access/IdCardConsoleComponent.cs @@ -0,0 +1,192 @@ +using System.Collections.Generic; +using System.Linq; +using Content.Server.GameObjects.EntitySystems; +using Content.Server.Interfaces; +using Content.Server.Interfaces.GameObjects; +using Content.Shared.Access; +using Content.Shared.GameObjects.Components.Access; +using Robust.Server.GameObjects.Components.Container; +using Robust.Server.GameObjects.Components.UserInterface; +using Robust.Server.Interfaces.GameObjects; +using Robust.Shared.GameObjects; +using Robust.Shared.Interfaces.GameObjects; +using Robust.Shared.IoC; +using Robust.Shared.Localization; +using Robust.Shared.Log; + +namespace Content.Server.GameObjects.Components.Access +{ + [RegisterComponent] + [ComponentReference(typeof(IActivate))] + public class IdCardConsoleComponent : SharedIdCardConsoleComponent, IActivate + { +#pragma warning disable 649 + [Dependency] private readonly IServerNotifyManager _notifyManager; + [Dependency] private readonly ILocalizationManager _localizationManager; +#pragma warning restore 649 + + private BoundUserInterface _userInterface; + private ContainerSlot _privilegedIdContainer; + private ContainerSlot _targetIdContainer; + private AccessReader _accessReader; + + public override void Initialize() + { + base.Initialize(); + + _privilegedIdContainer = ContainerManagerComponent.Ensure($"{Name}-privilegedId", Owner); + _targetIdContainer = ContainerManagerComponent.Ensure($"{Name}-targetId", Owner); + + _accessReader = Owner.GetComponent(); + + _userInterface = Owner.GetComponent() + .GetBoundUserInterface(IdCardConsoleUiKey.Key); + _userInterface.OnReceiveMessage += OnUiReceiveMessage; + UpdateUserInterface(); + } + + private void OnUiReceiveMessage(ServerBoundUserInterfaceMessage obj) + { + switch (obj.Message) + { + case IdButtonPressedMessage msg: + switch (msg.Button) + { + case UiButton.PrivilegedId: + HandleId(obj.Session.AttachedEntity, _privilegedIdContainer); + break; + case UiButton.TargetId: + HandleId(obj.Session.AttachedEntity, _targetIdContainer); + break; + } + break; + case WriteToTargetIdMessage msg: + TryWriteToTargetId(msg.FullName, msg.JobTitle, msg.AccessList); + break; + } + } + + /// + /// Returns true if there is an ID in and said ID satisfies the requirements of . + /// + private bool PrivilegedIdIsAuthorized() + { + var privilegedIdEntity = _privilegedIdContainer.ContainedEntity; + return privilegedIdEntity != null && _accessReader.IsAllowed(privilegedIdEntity); + } + /// + /// Called when the "Submit" button in the UI gets pressed. + /// Writes data passed from the UI into the ID stored in , if present. + /// + private void TryWriteToTargetId(string newFullName, string newJobTitle, List newAccessList) + { + if (!PrivilegedIdIsAuthorized() || _targetIdContainer.ContainedEntity == null) + { + return; + } + + var targetIdEntity = _targetIdContainer.ContainedEntity; + + var targetIdComponent = targetIdEntity.GetComponent(); + targetIdComponent.FullName = newFullName; + targetIdComponent.JobTitle = newJobTitle; + + if (!newAccessList.TrueForAll(x => SharedAccess.AllAccess.Contains(x))) + { + Logger.Warning($"Tried to write unknown access tag."); + return; + } + var targetIdAccess = targetIdEntity.GetComponent(); + targetIdAccess.Tags = newAccessList; + } + + /// + /// Called when one of the insert/remove ID buttons gets pressed. + /// + private void HandleId(IEntity user, ContainerSlot container) + { + if (!user.TryGetComponent(out IHandsComponent hands)) + { + _notifyManager.PopupMessage(Owner.Transform.GridPosition, user, _localizationManager.GetString("You have no hands.")); + return; + } + + if (container.ContainedEntity == null) + { + InsertIdFromHand(user, container, hands); + } + else + { + PutIdInHand(container, hands); + } + } + + private void InsertIdFromHand(IEntity user, ContainerSlot container, IHandsComponent hands) + { + var isId = hands.GetActiveHand?.Owner.HasComponent(); + if (isId != true) + { + return; + } + if(!hands.Drop(hands.ActiveIndex, container)) + { + _notifyManager.PopupMessage(Owner.Transform.GridPosition, user, _localizationManager.GetString("You can't let go of the ID card!")); + return; + } + UpdateUserInterface(); + } + + private void PutIdInHand(ContainerSlot container, IHandsComponent hands) + { + var idEntity = container.ContainedEntity; + if (idEntity == null || !container.Remove(idEntity)) + { + return; + } + UpdateUserInterface(); + + hands.PutInHand(idEntity.GetComponent()); + } + + private void UpdateUserInterface() + { + var isPrivilegedIdPresent = _privilegedIdContainer.ContainedEntity != null; + var targetIdEntity = _targetIdContainer.ContainedEntity; + IdCardConsoleBoundUserInterfaceState newState; + // this could be prettier + if (targetIdEntity == null) + { + newState = new IdCardConsoleBoundUserInterfaceState( + isPrivilegedIdPresent, + PrivilegedIdIsAuthorized(), + false, + null, + null, + null); + } + else + { + var targetIdComponent = targetIdEntity.GetComponent(); + var targetAccessComponent = targetIdEntity.GetComponent(); + newState = new IdCardConsoleBoundUserInterfaceState( + isPrivilegedIdPresent, + PrivilegedIdIsAuthorized(), + true, + targetIdComponent.FullName, + targetIdComponent.JobTitle, + targetAccessComponent.Tags); + } + _userInterface.SetState(newState); + } + + public void Activate(ActivateEventArgs eventArgs) + { + if(!eventArgs.User.TryGetComponent(out IActorComponent actor)) + { + return; + } + + _userInterface.Open(actor.playerSession); + } + } +} diff --git a/Content.Shared/Access/SharedAccess.cs b/Content.Shared/Access/SharedAccess.cs new file mode 100644 index 0000000000..b705c26b19 --- /dev/null +++ b/Content.Shared/Access/SharedAccess.cs @@ -0,0 +1,16 @@ +namespace Content.Shared.Access +{ + public static class SharedAccess + { + public static readonly string[] AllAccess = { + "command", + "security", + "engineering", + "medical", + "cargo", + "research", + "service", + "maintenance", + }; + } +} diff --git a/Content.Shared/GameObjects/Components/Access/SharedIdCardConsoleComponent.cs b/Content.Shared/GameObjects/Components/Access/SharedIdCardConsoleComponent.cs new file mode 100644 index 0000000000..0d4627cf39 --- /dev/null +++ b/Content.Shared/GameObjects/Components/Access/SharedIdCardConsoleComponent.cs @@ -0,0 +1,77 @@ +using System; +using System.Collections.Generic; +using Robust.Shared.GameObjects; +using Robust.Shared.GameObjects.Components.UserInterface; +using Robust.Shared.Serialization; + +namespace Content.Shared.GameObjects.Components.Access +{ + public class SharedIdCardConsoleComponent : Component + { + public override string Name => "IdCardConsole"; + + public enum UiButton + { + PrivilegedId, + TargetId, + } + + [Serializable, NetSerializable] + public class IdButtonPressedMessage : BoundUserInterfaceMessage + { + public readonly UiButton Button; + + public IdButtonPressedMessage(UiButton button) + { + Button = button; + } + } + + [Serializable, NetSerializable] + public class WriteToTargetIdMessage : BoundUserInterfaceMessage + { + public readonly string FullName; + public readonly string JobTitle; + public readonly List AccessList; + + public WriteToTargetIdMessage(string fullName, string jobTitle, List accessList) + { + FullName = fullName; + JobTitle = jobTitle; + AccessList = accessList; + } + } + + [Serializable, NetSerializable] + public class IdCardConsoleBoundUserInterfaceState : BoundUserInterfaceState + { + public readonly bool IsPrivilegedIdPresent; + public readonly bool IsPrivilegedIdAuthorized; + public readonly bool IsTargetIdPresent; + public readonly string TargetIdFullName; + public readonly string TargetIdJobTitle; + public readonly List TargetIdAccessList; + + public IdCardConsoleBoundUserInterfaceState(bool isPrivilegedIdPresent, + bool isPrivilegedIdAuthorized, + bool isTargetIdPresent, + string targetIdFullName, + string targetIdJobTitle, + List targetIdAccessList) + { + IsPrivilegedIdPresent = isPrivilegedIdPresent; + IsPrivilegedIdAuthorized = isPrivilegedIdAuthorized; + IsTargetIdPresent = isTargetIdPresent; + TargetIdFullName = targetIdFullName; + TargetIdJobTitle = targetIdJobTitle; + TargetIdAccessList = targetIdAccessList; + } + } + + [Serializable, NetSerializable] + public enum IdCardConsoleUiKey + { + Key, + } + } +} diff --git a/Resources/Prototypes/Entities/buildings/computers.yml b/Resources/Prototypes/Entities/buildings/computers.yml index 9b7e604a1f..e61008a012 100644 --- a/Resources/Prototypes/Entities/buildings/computers.yml +++ b/Resources/Prototypes/Entities/buildings/computers.yml @@ -109,6 +109,13 @@ parent: computerBase name: ID Card Computer components: + - type: AccessReader + necessary: ["command"] + - type: IdCardConsole + - type: UserInterface + interfaces: + - key: enum.IdCardConsoleUiKey.Key + type: IdCardConsoleBoundUserInterface - type: Appearance visuals: - type: ComputerVisualizer2D diff --git a/Resources/Prototypes/Entities/items/clothing/IDs.yml b/Resources/Prototypes/Entities/items/clothing/IDs.yml index 85b2ba7dea..f8a930fd50 100644 --- a/Resources/Prototypes/Entities/items/clothing/IDs.yml +++ b/Resources/Prototypes/Entities/items/clothing/IDs.yml @@ -6,15 +6,121 @@ components: - type: Sprite sprite: Clothing/id_cards.rsi - state: assistant + state: civilian - type: Icon sprite: Clothing/id_cards.rsi - state: assistant + state: civilian - type: Clothing Slots: - idcard + sprite: Clothing/id_cards.rsi + HeldPrefix: civilian + - type: IdCard + - type: Access + +- type: entity + parent: IDCardStandard + id: CommandIDCard + name: Command Identification Card + components: + - type: Clothing + HeldPrefix: gold + - type: Sprite + state: gold + - type: Icon + state: gold + - type: IdCard + jobTitle: Captain + - type: Access + tags: ["command"] + +- type: entity + parent: IDCardStandard + id: SecurityIDCard + name: Security Identification Card + components: + - type: Sprite + state: security + - type: Icon + state: security + - type: IdCard + jobTitle: Security Officer + - type: Access + tags: ["security"] + +- type: entity + parent: IDCardStandard + id: EngineeringIDCard + name: Engineering Identification Card + components: + - type: Sprite + state: engineering + - type: Icon + state: engineering + - type: IdCard + jobTitle: Engineer + - type: Access + tags: ["engineering"] + +- type: entity + parent: IDCardStandard + id: MedicalIDCard + name: Medical Identification Card + components: + - type: Sprite + state: medical + - type: Icon + state: medical + - type: IdCard + jobTitle: Doctor + - type: Access + tags: ["medical"] + +- type: entity + parent: IDCardStandard + id: CargoIDCard + name: Cargo Identification Card + components: + - type: Sprite + state: cargo + - type: Icon + state: cargo + - type: IdCard + jobTitle: Cargo Technician + - type: Access + tags: ["cargo"] + +- type: entity + parent: IDCardStandard + id: ResearchIDCard + name: Research Identification Card + components: + - type: Sprite + state: research + - type: Icon + state: research + - type: IdCard + jobTitle: Scientist + - type: Access + tags: ["research"] + +- type: entity + parent: IDCardStandard + id: ServiceIDCard + name: Service Identification Card + components: + - type: IdCard + jobTitle: Bartender + - type: Access + tags: ["service"] + +- type: entity + parent: IDCardStandard + id: AssistantIDCard + name: Assistant Identification Card + components: - type: IdCard - fullName: John Doe jobTitle: Assistant - type: Access - tags: ["civilian", "maintenance", "engineering"] + tags: ["maintenance"] + diff --git a/Resources/Textures/Clothing/id_cards.rsi/CE.png b/Resources/Textures/Clothing/id_cards.rsi/CE.png new file mode 100644 index 0000000000..c9d389c3da Binary files /dev/null and b/Resources/Textures/Clothing/id_cards.rsi/CE.png differ diff --git a/Resources/Textures/Clothing/id_cards.rsi/CMO.png b/Resources/Textures/Clothing/id_cards.rsi/CMO.png new file mode 100644 index 0000000000..a7aab02e96 Binary files /dev/null and b/Resources/Textures/Clothing/id_cards.rsi/CMO.png differ diff --git a/Resources/Textures/Clothing/id_cards.rsi/ERT_empty.png b/Resources/Textures/Clothing/id_cards.rsi/ERT_empty.png new file mode 100644 index 0000000000..2050b3362c Binary files /dev/null and b/Resources/Textures/Clothing/id_cards.rsi/ERT_empty.png differ diff --git a/Resources/Textures/Clothing/id_cards.rsi/ERT_engineering.png b/Resources/Textures/Clothing/id_cards.rsi/ERT_engineering.png new file mode 100644 index 0000000000..76084e7211 Binary files /dev/null and b/Resources/Textures/Clothing/id_cards.rsi/ERT_engineering.png differ diff --git a/Resources/Textures/Clothing/id_cards.rsi/ERT_leader.png b/Resources/Textures/Clothing/id_cards.rsi/ERT_leader.png new file mode 100644 index 0000000000..1a58bb3594 Binary files /dev/null and b/Resources/Textures/Clothing/id_cards.rsi/ERT_leader.png differ diff --git a/Resources/Textures/Clothing/id_cards.rsi/ERT_medical.png b/Resources/Textures/Clothing/id_cards.rsi/ERT_medical.png new file mode 100644 index 0000000000..e3bc4f54b8 Binary files /dev/null and b/Resources/Textures/Clothing/id_cards.rsi/ERT_medical.png differ diff --git a/Resources/Textures/Clothing/id_cards.rsi/ERT_security.png b/Resources/Textures/Clothing/id_cards.rsi/ERT_security.png new file mode 100644 index 0000000000..088e96ee44 Binary files /dev/null and b/Resources/Textures/Clothing/id_cards.rsi/ERT_security.png differ diff --git a/Resources/Textures/Clothing/id_cards.rsi/HoS.png b/Resources/Textures/Clothing/id_cards.rsi/HoS.png new file mode 100644 index 0000000000..4c989986d6 Binary files /dev/null and b/Resources/Textures/Clothing/id_cards.rsi/HoS.png differ diff --git a/Resources/Textures/Clothing/id_cards.rsi/RD.png b/Resources/Textures/Clothing/id_cards.rsi/RD.png new file mode 100644 index 0000000000..a3be1be285 Binary files /dev/null and b/Resources/Textures/Clothing/id_cards.rsi/RD.png differ diff --git a/Resources/Textures/Clothing/id_cards.rsi/TDgreen.png b/Resources/Textures/Clothing/id_cards.rsi/TDgreen.png new file mode 100644 index 0000000000..7e68dd28d2 Binary files /dev/null and b/Resources/Textures/Clothing/id_cards.rsi/TDgreen.png differ diff --git a/Resources/Textures/Clothing/id_cards.rsi/TDred.png b/Resources/Textures/Clothing/id_cards.rsi/TDred.png new file mode 100644 index 0000000000..9ec714eaa0 Binary files /dev/null and b/Resources/Textures/Clothing/id_cards.rsi/TDred.png differ diff --git a/Resources/Textures/Clothing/id_cards.rsi/admin.png b/Resources/Textures/Clothing/id_cards.rsi/admin.png new file mode 100644 index 0000000000..1cbc2004a0 Binary files /dev/null and b/Resources/Textures/Clothing/id_cards.rsi/admin.png differ diff --git a/Resources/Textures/Clothing/id_cards.rsi/assistant.png b/Resources/Textures/Clothing/id_cards.rsi/assistant.png deleted file mode 100644 index e3ebb17277..0000000000 Binary files a/Resources/Textures/Clothing/id_cards.rsi/assistant.png and /dev/null differ diff --git a/Resources/Textures/Clothing/id_cards.rsi/cargo.png b/Resources/Textures/Clothing/id_cards.rsi/cargo.png new file mode 100644 index 0000000000..3a45ef68e5 Binary files /dev/null and b/Resources/Textures/Clothing/id_cards.rsi/cargo.png differ diff --git a/Resources/Textures/Clothing/id_cards.rsi/centcom.png b/Resources/Textures/Clothing/id_cards.rsi/centcom.png new file mode 100644 index 0000000000..945e60a4e7 Binary files /dev/null and b/Resources/Textures/Clothing/id_cards.rsi/centcom.png differ diff --git a/Resources/Textures/Clothing/id_cards.rsi/centcom_old.png b/Resources/Textures/Clothing/id_cards.rsi/centcom_old.png new file mode 100644 index 0000000000..e76784aab6 Binary files /dev/null and b/Resources/Textures/Clothing/id_cards.rsi/centcom_old.png differ diff --git a/Resources/Textures/Clothing/id_cards.rsi/civilian-inhand-left.png b/Resources/Textures/Clothing/id_cards.rsi/civilian-inhand-left.png new file mode 100644 index 0000000000..f7848f63f6 Binary files /dev/null and b/Resources/Textures/Clothing/id_cards.rsi/civilian-inhand-left.png differ diff --git a/Resources/Textures/Clothing/id_cards.rsi/civilian-inhand-right.png b/Resources/Textures/Clothing/id_cards.rsi/civilian-inhand-right.png new file mode 100644 index 0000000000..82b5598806 Binary files /dev/null and b/Resources/Textures/Clothing/id_cards.rsi/civilian-inhand-right.png differ diff --git a/Resources/Textures/Clothing/id_cards.rsi/civilian.png b/Resources/Textures/Clothing/id_cards.rsi/civilian.png new file mode 100644 index 0000000000..050139ae1f Binary files /dev/null and b/Resources/Textures/Clothing/id_cards.rsi/civilian.png differ diff --git a/Resources/Textures/Clothing/id_cards.rsi/clown.png b/Resources/Textures/Clothing/id_cards.rsi/clown.png new file mode 100644 index 0000000000..749b1a5471 Binary files /dev/null and b/Resources/Textures/Clothing/id_cards.rsi/clown.png differ diff --git a/Resources/Textures/Clothing/id_cards.rsi/creed.png b/Resources/Textures/Clothing/id_cards.rsi/creed.png new file mode 100644 index 0000000000..995b5ec12d Binary files /dev/null and b/Resources/Textures/Clothing/id_cards.rsi/creed.png differ diff --git a/Resources/Textures/Clothing/id_cards.rsi/deathsquad.png b/Resources/Textures/Clothing/id_cards.rsi/deathsquad.png new file mode 100644 index 0000000000..0458644c90 Binary files /dev/null and b/Resources/Textures/Clothing/id_cards.rsi/deathsquad.png differ diff --git a/Resources/Textures/Clothing/id_cards.rsi/debit-elite.png b/Resources/Textures/Clothing/id_cards.rsi/debit-elite.png new file mode 100644 index 0000000000..9d7c21fb16 Binary files /dev/null and b/Resources/Textures/Clothing/id_cards.rsi/debit-elite.png differ diff --git a/Resources/Textures/Clothing/id_cards.rsi/debit-preferred.png b/Resources/Textures/Clothing/id_cards.rsi/debit-preferred.png new file mode 100644 index 0000000000..f88c100c89 Binary files /dev/null and b/Resources/Textures/Clothing/id_cards.rsi/debit-preferred.png differ diff --git a/Resources/Textures/Clothing/id_cards.rsi/debit.png b/Resources/Textures/Clothing/id_cards.rsi/debit.png new file mode 100644 index 0000000000..4bf2e70ecf Binary files /dev/null and b/Resources/Textures/Clothing/id_cards.rsi/debit.png differ diff --git a/Resources/Textures/Clothing/id_cards.rsi/emag.png b/Resources/Textures/Clothing/id_cards.rsi/emag.png new file mode 100644 index 0000000000..6e9978a3ce Binary files /dev/null and b/Resources/Textures/Clothing/id_cards.rsi/emag.png differ diff --git a/Resources/Textures/Clothing/id_cards.rsi/engineering.png b/Resources/Textures/Clothing/id_cards.rsi/engineering.png new file mode 100644 index 0000000000..0fed7dcf80 Binary files /dev/null and b/Resources/Textures/Clothing/id_cards.rsi/engineering.png differ diff --git a/Resources/Textures/Clothing/id_cards.rsi/fingerprint0.png b/Resources/Textures/Clothing/id_cards.rsi/fingerprint0.png new file mode 100644 index 0000000000..f00072064b Binary files /dev/null and b/Resources/Textures/Clothing/id_cards.rsi/fingerprint0.png differ diff --git a/Resources/Textures/Clothing/id_cards.rsi/fingerprint1.png b/Resources/Textures/Clothing/id_cards.rsi/fingerprint1.png new file mode 100644 index 0000000000..6755d11237 Binary files /dev/null and b/Resources/Textures/Clothing/id_cards.rsi/fingerprint1.png differ diff --git a/Resources/Textures/Clothing/id_cards.rsi/gold-inhand-left.png b/Resources/Textures/Clothing/id_cards.rsi/gold-inhand-left.png new file mode 100644 index 0000000000..65957acdfb Binary files /dev/null and b/Resources/Textures/Clothing/id_cards.rsi/gold-inhand-left.png differ diff --git a/Resources/Textures/Clothing/id_cards.rsi/gold-inhand-right.png b/Resources/Textures/Clothing/id_cards.rsi/gold-inhand-right.png new file mode 100644 index 0000000000..96cdf6d425 Binary files /dev/null and b/Resources/Textures/Clothing/id_cards.rsi/gold-inhand-right.png differ diff --git a/Resources/Textures/Clothing/id_cards.rsi/gold.png b/Resources/Textures/Clothing/id_cards.rsi/gold.png new file mode 100644 index 0000000000..428c081ddb Binary files /dev/null and b/Resources/Textures/Clothing/id_cards.rsi/gold.png differ diff --git a/Resources/Textures/Clothing/id_cards.rsi/medical.png b/Resources/Textures/Clothing/id_cards.rsi/medical.png new file mode 100644 index 0000000000..0c3f1ac41b Binary files /dev/null and b/Resources/Textures/Clothing/id_cards.rsi/medical.png differ diff --git a/Resources/Textures/Clothing/id_cards.rsi/meta.json b/Resources/Textures/Clothing/id_cards.rsi/meta.json index 3480e885c2..ecbc01066f 100644 --- a/Resources/Textures/Clothing/id_cards.rsi/meta.json +++ b/Resources/Textures/Clothing/id_cards.rsi/meta.json @@ -1 +1 @@ -{"version": 1, "size": {"x": 32, "y": 32}, "states": [{"name": "assistant", "directions": 1, "delays": [[1.0]]}]} \ No newline at end of file +{"version": 1, "size": {"x": 32, "y": 32}, "states": [{"name": "CE", "directions": 1, "delays": [[1.0]]}, {"name": "CMO", "directions": 1, "delays": [[1.0]]}, {"name": "ERT_empty", "directions": 1, "delays": [[1.0]]}, {"name": "ERT_engineering", "directions": 1, "delays": [[1.0]]}, {"name": "ERT_leader", "directions": 1, "delays": [[1.0]]}, {"name": "ERT_medical", "directions": 1, "delays": [[1.0]]}, {"name": "ERT_security", "directions": 1, "delays": [[1.0]]}, {"name": "HoS", "directions": 1, "delays": [[1.0]]}, {"name": "RD", "directions": 1, "delays": [[1.0]]}, {"name": "TDgreen", "directions": 1, "delays": [[1.0]]}, {"name": "TDred", "directions": 1, "delays": [[1.0]]}, {"name": "admin", "directions": 1, "delays": [[1.0]]}, {"name": "cargo", "directions": 1, "delays": [[1.0]]}, {"name": "centcom", "directions": 1, "delays": [[1.0]]}, {"name": "centcom_old", "directions": 1, "delays": [[1.0]]}, {"name": "civilian", "directions": 1, "delays": [[1.0]]}, {"name": "civilian-inhand-left", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "civilian-inhand-right", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "clown", "directions": 1, "delays": [[1.0]]}, {"name": "creed", "directions": 1, "delays": [[1.0]]}, {"name": "deathsquad", "directions": 1, "delays": [[1.0]]}, {"name": "debit", "directions": 1, "delays": [[1.0]]}, {"name": "debit-elite", "directions": 1, "delays": [[1.0]]}, {"name": "debit-preferred", "directions": 1, "delays": [[1.0]]}, {"name": "emag", "directions": 1, "delays": [[1.0]]}, {"name": "engineering", "directions": 1, "delays": [[1.0]]}, {"name": "fingerprint0", "directions": 1, "delays": [[1.0]]}, {"name": "fingerprint1", "directions": 1, "delays": [[1.0]]}, {"name": "gold", "directions": 1, "delays": [[1.0]]}, {"name": "gold-inhand-left", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "gold-inhand-right", "directions": 4, "delays": [[1.0], [1.0], [1.0], [1.0]]}, {"name": "medical", "directions": 1, "delays": [[1.0]]}, {"name": "mime", "directions": 1, "delays": [[1.0]]}, {"name": "old", "directions": 1, "delays": [[1.0]]}, {"name": "research", "directions": 1, "delays": [[1.0]]}, {"name": "robot", "directions": 1, "delays": [[0.5, 0.5]]}, {"name": "security", "directions": 1, "delays": [[1.0]]}, {"name": "silver", "directions": 1, "delays": [[1.0]]}, {"name": "syndie", "directions": 1, "delays": [[1.0]]}, {"name": "trader", "directions": 1, "delays": [[1.0]]}]} \ No newline at end of file diff --git a/Resources/Textures/Clothing/id_cards.rsi/mime.png b/Resources/Textures/Clothing/id_cards.rsi/mime.png new file mode 100644 index 0000000000..cd5d879db5 Binary files /dev/null and b/Resources/Textures/Clothing/id_cards.rsi/mime.png differ diff --git a/Resources/Textures/Clothing/id_cards.rsi/old.png b/Resources/Textures/Clothing/id_cards.rsi/old.png new file mode 100644 index 0000000000..64e7fe8abe Binary files /dev/null and b/Resources/Textures/Clothing/id_cards.rsi/old.png differ diff --git a/Resources/Textures/Clothing/id_cards.rsi/research.png b/Resources/Textures/Clothing/id_cards.rsi/research.png new file mode 100644 index 0000000000..77f12ff8d6 Binary files /dev/null and b/Resources/Textures/Clothing/id_cards.rsi/research.png differ diff --git a/Resources/Textures/Clothing/id_cards.rsi/robot.png b/Resources/Textures/Clothing/id_cards.rsi/robot.png new file mode 100644 index 0000000000..9e87091adc Binary files /dev/null and b/Resources/Textures/Clothing/id_cards.rsi/robot.png differ diff --git a/Resources/Textures/Clothing/id_cards.rsi/security.png b/Resources/Textures/Clothing/id_cards.rsi/security.png new file mode 100644 index 0000000000..ade9673563 Binary files /dev/null and b/Resources/Textures/Clothing/id_cards.rsi/security.png differ diff --git a/Resources/Textures/Clothing/id_cards.rsi/silver.png b/Resources/Textures/Clothing/id_cards.rsi/silver.png new file mode 100644 index 0000000000..6d99f41d13 Binary files /dev/null and b/Resources/Textures/Clothing/id_cards.rsi/silver.png differ diff --git a/Resources/Textures/Clothing/id_cards.rsi/syndie.png b/Resources/Textures/Clothing/id_cards.rsi/syndie.png new file mode 100644 index 0000000000..fad21260d2 Binary files /dev/null and b/Resources/Textures/Clothing/id_cards.rsi/syndie.png differ diff --git a/Resources/Textures/Clothing/id_cards.rsi/trader.png b/Resources/Textures/Clothing/id_cards.rsi/trader.png new file mode 100644 index 0000000000..65a1e25c2b Binary files /dev/null and b/Resources/Textures/Clothing/id_cards.rsi/trader.png differ diff --git a/Resources/Textures/Clothing/idcard_standard.png b/Resources/Textures/Clothing/idcard_standard.png deleted file mode 100644 index 45e802a55a..0000000000 Binary files a/Resources/Textures/Clothing/idcard_standard.png and /dev/null differ