From 321c1ed719aea5b192c7d938244a6bfcaea4cecb Mon Sep 17 00:00:00 2001 From: Alina Shumann Date: Mon, 29 Sep 2025 21:45:33 -0500 Subject: [PATCH] Port Goobstation AI enhancements Ports the following features from Goob-Station: - ClothingGrantComponent system for granting components when clothing is equipped - Security bodycams with AI vision support - AI camera warping/jumping system with searchable UI - pAI vision integration allowing AI to see through pAIs All code placed in _Goobstation directories following QB naming conventions. --- .../AiCameraWarping/StationAiWarpSystem.cs | 10 ++ .../Ui/AiCameraWarpBoundUserInterface.cs | 45 +++++++ .../AiCameraWarping/Ui/AiCameraWarpMenu.xaml | 29 +++++ .../Ui/AiCameraWarpMenu.xaml.cs | 80 +++++++++++++ .../AiCameraWarping/StationAiWarpSystem.cs | 88 ++++++++++++++ .../Components/ClothingGrantComponent.cs | 26 ++++ .../Components/ClothingGrantTagComponent.cs | 21 ++++ .../Systems/ClothingGrantingSystem.cs | 113 ++++++++++++++++++ .../SharedStationAiWarpSystem.cs | 60 ++++++++++ .../en-US/_Goobstation/silicons/ai-jump.ftl | 7 ++ .../VendingMachines/Inventories/secdrobe.yml | 1 + .../Entities/Mobs/Player/silicon.yml | 4 + .../Prototypes/Entities/Objects/Fun/pai.yml | 4 + .../Prototypes/Loadouts/loadout_groups.yml | 2 + .../_Goobstation/Actions/station_ai.yml | 19 +++ .../Entities/Clothing/Neck/specific.yml | 39 ++++++ .../Clothing/OuterClothing/specific.yml | 41 +++++++ .../_Goobstation/Loadouts/Jobs/misc.yml | 11 ++ .../Actions/actions_ai.rsi/camera_jump.png | Bin 0 -> 717 bytes .../Actions/actions_ai.rsi/meta.json | 3 + .../Neck/Misc/nopro.rsi/equipped-NECK-vox.png | Bin 0 -> 892 bytes .../Neck/Misc/nopro.rsi/equipped-NECK.png | Bin 0 -> 929 bytes .../Clothing/Neck/Misc/nopro.rsi/icon.png | Bin 0 -> 702 bytes .../Neck/Misc/nopro.rsi/inhand-left.png | Bin 0 -> 738 bytes .../Neck/Misc/nopro.rsi/inhand-right.png | Bin 0 -> 739 bytes .../Clothing/Neck/Misc/nopro.rsi/meta.json | 30 +++++ .../nopro.rsi/equipped-OUTERCLOTHING-vox.png | Bin 0 -> 892 bytes .../Misc/nopro.rsi/equipped-OUTERCLOTHING.png | Bin 0 -> 929 bytes .../OuterClothing/Misc/nopro.rsi/icon.png | Bin 0 -> 702 bytes .../Misc/nopro.rsi/inhand-left.png | Bin 0 -> 738 bytes .../Misc/nopro.rsi/inhand-right.png | Bin 0 -> 739 bytes .../OuterClothing/Misc/nopro.rsi/meta.json | 30 +++++ 32 files changed, 663 insertions(+) create mode 100644 Content.Client/_Goobstation/Silicon/AiCameraWarping/StationAiWarpSystem.cs create mode 100644 Content.Client/_Goobstation/Silicon/AiCameraWarping/Ui/AiCameraWarpBoundUserInterface.cs create mode 100644 Content.Client/_Goobstation/Silicon/AiCameraWarping/Ui/AiCameraWarpMenu.xaml create mode 100644 Content.Client/_Goobstation/Silicon/AiCameraWarping/Ui/AiCameraWarpMenu.xaml.cs create mode 100644 Content.Server/_Goobstation/Silicon/AiCameraWarping/StationAiWarpSystem.cs create mode 100644 Content.Shared/_Goobstation/Clothing/Components/ClothingGrantComponent.cs create mode 100644 Content.Shared/_Goobstation/Clothing/Components/ClothingGrantTagComponent.cs create mode 100644 Content.Shared/_Goobstation/Clothing/Systems/ClothingGrantingSystem.cs create mode 100644 Content.Shared/_Goobstation/Silicon/AiCameraWarping/SharedStationAiWarpSystem.cs create mode 100644 Resources/Locale/en-US/_Goobstation/silicons/ai-jump.ftl create mode 100644 Resources/Prototypes/_Goobstation/Actions/station_ai.yml create mode 100644 Resources/Prototypes/_Goobstation/Entities/Clothing/Neck/specific.yml create mode 100644 Resources/Prototypes/_Goobstation/Entities/Clothing/OuterClothing/specific.yml create mode 100644 Resources/Prototypes/_Goobstation/Loadouts/Jobs/misc.yml create mode 100644 Resources/Textures/Interface/Actions/actions_ai.rsi/camera_jump.png create mode 100644 Resources/Textures/_Goobstation/Clothing/Neck/Misc/nopro.rsi/equipped-NECK-vox.png create mode 100644 Resources/Textures/_Goobstation/Clothing/Neck/Misc/nopro.rsi/equipped-NECK.png create mode 100644 Resources/Textures/_Goobstation/Clothing/Neck/Misc/nopro.rsi/icon.png create mode 100644 Resources/Textures/_Goobstation/Clothing/Neck/Misc/nopro.rsi/inhand-left.png create mode 100644 Resources/Textures/_Goobstation/Clothing/Neck/Misc/nopro.rsi/inhand-right.png create mode 100644 Resources/Textures/_Goobstation/Clothing/Neck/Misc/nopro.rsi/meta.json create mode 100644 Resources/Textures/_Goobstation/Clothing/OuterClothing/Misc/nopro.rsi/equipped-OUTERCLOTHING-vox.png create mode 100644 Resources/Textures/_Goobstation/Clothing/OuterClothing/Misc/nopro.rsi/equipped-OUTERCLOTHING.png create mode 100644 Resources/Textures/_Goobstation/Clothing/OuterClothing/Misc/nopro.rsi/icon.png create mode 100644 Resources/Textures/_Goobstation/Clothing/OuterClothing/Misc/nopro.rsi/inhand-left.png create mode 100644 Resources/Textures/_Goobstation/Clothing/OuterClothing/Misc/nopro.rsi/inhand-right.png create mode 100644 Resources/Textures/_Goobstation/Clothing/OuterClothing/Misc/nopro.rsi/meta.json diff --git a/Content.Client/_Goobstation/Silicon/AiCameraWarping/StationAiWarpSystem.cs b/Content.Client/_Goobstation/Silicon/AiCameraWarping/StationAiWarpSystem.cs new file mode 100644 index 00000000000..756b8392125 --- /dev/null +++ b/Content.Client/_Goobstation/Silicon/AiCameraWarping/StationAiWarpSystem.cs @@ -0,0 +1,10 @@ +// SPDX-FileCopyrightText: 2025 GoobBot +// SPDX-FileCopyrightText: 2025 ThunderBear2006 +// +// SPDX-License-Identifier: AGPL-3.0-or-later + +using Content.Shared._Goobstation.Silicon.AiCameraWarping; // Goobstation + +namespace Content.Client._Goobstation.Silicon.AiCameraWarping; // Goobstation + +public sealed class StationAiWarpSystem : SharedStationAiWarpSystem { } \ No newline at end of file diff --git a/Content.Client/_Goobstation/Silicon/AiCameraWarping/Ui/AiCameraWarpBoundUserInterface.cs b/Content.Client/_Goobstation/Silicon/AiCameraWarping/Ui/AiCameraWarpBoundUserInterface.cs new file mode 100644 index 00000000000..ae93dd46a80 --- /dev/null +++ b/Content.Client/_Goobstation/Silicon/AiCameraWarping/Ui/AiCameraWarpBoundUserInterface.cs @@ -0,0 +1,45 @@ +// SPDX-FileCopyrightText: 2025 GoobBot +// SPDX-FileCopyrightText: 2025 ThunderBear2006 +// +// SPDX-License-Identifier: AGPL-3.0-or-later + + +using Content.Shared._Goobstation.Silicon.AiCameraWarping; // Goobstation +using Robust.Client.UserInterface; +using Serilog; + +namespace Content.Client._Goobstation.Silicon.AiCameraWarping.Ui; // Goobstation + +public sealed class AiCameraWarpBoundUserInterface(EntityUid owner, Enum uiKey) : BoundUserInterface(owner, uiKey) +{ + private AiCameraWarpMenu? _menu; + + protected override void Open() + { + base.Open(); + + _menu = this.CreateWindow(); + _menu.OnCamWarpAction += SendAction; + _menu.OnRefresh += SendRefresh; + } + + protected override void UpdateState(BoundUserInterfaceState state) + { + base.UpdateState(state); + + if (state is not CameraWarpBuiState msg) + return; + + _menu?.Update(msg); + } + + public void SendAction(CameraWarpActionEvent action) + { + SendMessage(new CameraWarpActionMessage(action)); + } + + public void SendRefresh() + { + SendMessage(new CameraWarpRefreshActionMessage()); + } +} \ No newline at end of file diff --git a/Content.Client/_Goobstation/Silicon/AiCameraWarping/Ui/AiCameraWarpMenu.xaml b/Content.Client/_Goobstation/Silicon/AiCameraWarping/Ui/AiCameraWarpMenu.xaml new file mode 100644 index 00000000000..35c420f2d55 --- /dev/null +++ b/Content.Client/_Goobstation/Silicon/AiCameraWarping/Ui/AiCameraWarpMenu.xaml @@ -0,0 +1,29 @@ + + +