diff --git a/Content.Shared/_CorvaxNext/TurretControl/Components/TurretControllerComponent.cs b/Content.Shared/_CorvaxNext/TurretControl/Components/TurretControllerComponent.cs index e07787e83bb..8b4b54daad4 100644 --- a/Content.Shared/_CorvaxNext/TurretControl/Components/TurretControllerComponent.cs +++ b/Content.Shared/_CorvaxNext/TurretControl/Components/TurretControllerComponent.cs @@ -1,4 +1,10 @@ +using Robust.Shared.Prototypes; + namespace Content.Shared._CorvaxNext.TurretControl.Components; [RegisterComponent] -public sealed partial class TurretControllerComponent : Component; +public sealed partial class TurretControllerComponent : Component +{ + [DataField] + public ComponentRegistry RequiredComponents = []; +} diff --git a/Content.Shared/_CorvaxNext/TurretControl/TurretControlSystem.cs b/Content.Shared/_CorvaxNext/TurretControl/TurretControlSystem.cs index 489403817ad..72fbef4c6e7 100644 --- a/Content.Shared/_CorvaxNext/TurretControl/TurretControlSystem.cs +++ b/Content.Shared/_CorvaxNext/TurretControl/TurretControlSystem.cs @@ -26,9 +26,13 @@ public override void Initialize() private void OnGetVerbs(Entity entity, ref GetVerbsEvent e) { - if (!HasComp(e.User)) + if (!TryComp(e.User, out var controller)) return; + foreach (var component in controller.RequiredComponents) + if (!HasComp(e.User, component.Value.Component.GetType())) + return; + if (!TryComp(entity, out var factionMember)) return; diff --git a/Resources/Prototypes/Entities/Mobs/Player/silicon.yml b/Resources/Prototypes/Entities/Mobs/Player/silicon.yml index 013df39a5ab..5cd83f99a1d 100644 --- a/Resources/Prototypes/Entities/Mobs/Player/silicon.yml +++ b/Resources/Prototypes/Entities/Mobs/Player/silicon.yml @@ -439,6 +439,8 @@ speechVerb: Robotic speechSounds: Borg - type: TurretController # Corvax-Next-TurretControl + requiredComponents: + - type: StationAiHeld - type: Tag tags: - HideContextMenu