From d927a6ff37cb8a50efc0c52713df1afb997fa573 Mon Sep 17 00:00:00 2001 From: ScarKy0 Date: Thu, 19 Sep 2024 18:56:23 +0200 Subject: [PATCH] Init --- .../Components/CriminalRecordsConsoleComponent.cs | 11 ++++++----- Resources/Prototypes/Actions/station_ai.yml | 13 +++++++++++++ .../Prototypes/Entities/Mobs/Player/silicon.yml | 10 +++++----- 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/Content.Shared/CriminalRecords/Components/CriminalRecordsConsoleComponent.cs b/Content.Shared/CriminalRecords/Components/CriminalRecordsConsoleComponent.cs index 70e927e3cb8492..186182fee3d585 100644 --- a/Content.Shared/CriminalRecords/Components/CriminalRecordsConsoleComponent.cs +++ b/Content.Shared/CriminalRecords/Components/CriminalRecordsConsoleComponent.cs @@ -1,6 +1,7 @@ using Content.Shared.CriminalRecords.Systems; using Content.Shared.Radio; using Content.Shared.StationRecords; +using Robust.Shared.GameStates; using Robust.Shared.Prototypes; namespace Content.Shared.CriminalRecords.Components; @@ -8,7 +9,7 @@ namespace Content.Shared.CriminalRecords.Components; /// /// A component for Criminal Record Console storing an active station record key and a currently applied filter /// -[RegisterComponent] +[RegisterComponent, NetworkedComponent, AutoGenerateComponentState] [Access(typeof(SharedCriminalRecordsConsoleSystem))] public sealed partial class CriminalRecordsConsoleComponent : Component { @@ -22,24 +23,24 @@ public sealed partial class CriminalRecordsConsoleComponent : Component /// Server then sends a state with just the records, not the listing or filter, and the client updates just that. /// I don't know if it's possible to have multiple bui states right now. /// - [DataField] + [DataField, AutoNetworkedField] public uint? ActiveKey; /// /// Currently applied filter. /// - [DataField] + [DataField, AutoNetworkedField] public StationRecordsFilter? Filter; /// /// Channel to send messages to when someone's status gets changed. /// - [DataField] + [DataField, AutoNetworkedField] public ProtoId SecurityChannel = "Security"; /// /// Max length of arrest and crime history strings. /// - [DataField] + [DataField, AutoNetworkedField] public uint MaxStringLength = 256; } diff --git a/Resources/Prototypes/Actions/station_ai.yml b/Resources/Prototypes/Actions/station_ai.yml index 58513d7db162c4..c67c5ef45f653c 100644 --- a/Resources/Prototypes/Actions/station_ai.yml +++ b/Resources/Prototypes/Actions/station_ai.yml @@ -66,3 +66,16 @@ state: state_laws event: !type:ToggleLawsScreenEvent useDelay: 0.5 + +- type: entity + id: ActionAIShowCriminalRecords + name: Criminal Records Interface + description: View a criminal records Interface. + components: + - type: InstantAction + icon: { sprite: Interface/Actions/actions_ai.rsi, state: station_records } + iconOn: Interface/Actions/actions_ai.rsi/station_records.png + keywords: [ "AI", "console", "interface" ] + priority: -8 + event: !type:ToggleIntrinsicUIEvent { key: enum.CriminalRecordsConsoleKey.Key } + \ No newline at end of file diff --git a/Resources/Prototypes/Entities/Mobs/Player/silicon.yml b/Resources/Prototypes/Entities/Mobs/Player/silicon.yml index 15878a4017d00c..e45f61f3c5c8cb 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/silicon.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/silicon.yml @@ -42,8 +42,8 @@ type: RadarConsoleBoundUserInterface enum.CrewMonitoringUIKey.Key: type: CrewMonitoringBoundUserInterface - enum.GeneralStationRecordConsoleKey.Key: - type: GeneralStationRecordConsoleBoundUserInterface + enum.CriminalRecordsConsoleKey.Key: + type: CriminalRecordsConsoleBoundUserInterface enum.SiliconLawsUiKey.Key: type: SiliconLawBoundUserInterface enum.CommunicationsConsoleUiKey.Key: @@ -54,12 +54,12 @@ toggleAction: ActionAGhostShowRadar enum.CrewMonitoringUIKey.Key: toggleAction: ActionAGhostShowCrewMonitoring - enum.GeneralStationRecordConsoleKey.Key: - toggleAction: ActionAGhostShowStationRecords + enum.CriminalRecordsConsoleKey.Key: + toggleAction: ActionAIShowCriminalRecords enum.CommunicationsConsoleUiKey.Key: toggleAction: ActionAGhostShowCommunications - type: CrewMonitoringConsole - - type: GeneralStationRecordConsole + - type: CriminalRecordsConsole - type: DeviceNetwork deviceNetId: Wireless receiveFrequencyId: CrewMonitor