Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AI now uses the criminal console instead of the station console to view records. #32307

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
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;

/// <summary>
/// A component for Criminal Record Console storing an active station record key and a currently applied filter
/// </summary>
[RegisterComponent]
[RegisterComponent, NetworkedComponent, AutoGenerateComponentState]
[Access(typeof(SharedCriminalRecordsConsoleSystem))]
public sealed partial class CriminalRecordsConsoleComponent : Component
{
Expand All @@ -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.
/// </remarks>
[DataField]
[DataField, AutoNetworkedField]
public uint? ActiveKey;

/// <summary>
/// Currently applied filter.
/// </summary>
[DataField]
[DataField, AutoNetworkedField]
public StationRecordsFilter? Filter;

/// <summary>
/// Channel to send messages to when someone's status gets changed.
/// </summary>
[DataField]
[DataField, AutoNetworkedField]
public ProtoId<RadioChannelPrototype> SecurityChannel = "Security";

/// <summary>
/// Max length of arrest and crime history strings.
/// </summary>
[DataField]
[DataField, AutoNetworkedField]
public uint MaxStringLength = 256;
}
13 changes: 13 additions & 0 deletions Resources/Prototypes/Actions/station_ai.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }

10 changes: 5 additions & 5 deletions Resources/Prototypes/Entities/Mobs/Player/silicon.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand All @@ -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
Expand Down
Loading