From f9da25881de8eea6c81728a10c3e3f8e9e23aff7 Mon Sep 17 00:00:00 2001 From: Pieter-Jan Briers Date: Sun, 8 Dec 2024 23:37:32 +0100 Subject: [PATCH] Singularity equipment can now be activated with E interact (#33762) These were coded to only listen to InteractHand, which doesn't follow our interaction model properly. --- .../EntitySystems/ContainmentFieldGeneratorSystem.cs | 4 ++-- Content.Server/Singularity/EntitySystems/EmitterSystem.cs | 4 ++-- .../Singularity/EntitySystems/RadiationCollectorSystem.cs | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/Content.Server/Singularity/EntitySystems/ContainmentFieldGeneratorSystem.cs b/Content.Server/Singularity/EntitySystems/ContainmentFieldGeneratorSystem.cs index 6d97c8ccb3..bda7d20a8e 100644 --- a/Content.Server/Singularity/EntitySystems/ContainmentFieldGeneratorSystem.cs +++ b/Content.Server/Singularity/EntitySystems/ContainmentFieldGeneratorSystem.cs @@ -31,7 +31,7 @@ public sealed class ContainmentFieldGeneratorSystem : EntitySystem SubscribeLocalEvent(HandleGeneratorCollide); SubscribeLocalEvent(OnExamine); - SubscribeLocalEvent(OnInteract); + SubscribeLocalEvent(OnActivate); SubscribeLocalEvent(OnAnchorChanged); SubscribeLocalEvent(OnReanchorEvent); SubscribeLocalEvent(OnUnanchorAttempt); @@ -90,7 +90,7 @@ public sealed class ContainmentFieldGeneratorSystem : EntitySystem args.PushMarkup(Loc.GetString("comp-containment-off")); } - private void OnInteract(Entity generator, ref InteractHandEvent args) + private void OnActivate(Entity generator, ref ActivateInWorldEvent args) { if (args.Handled) return; diff --git a/Content.Server/Singularity/EntitySystems/EmitterSystem.cs b/Content.Server/Singularity/EntitySystems/EmitterSystem.cs index f828139ed6..d3c5f8bb9c 100644 --- a/Content.Server/Singularity/EntitySystems/EmitterSystem.cs +++ b/Content.Server/Singularity/EntitySystems/EmitterSystem.cs @@ -45,7 +45,7 @@ namespace Content.Server.Singularity.EntitySystems SubscribeLocalEvent(ReceivedChanged); SubscribeLocalEvent(OnApcChanged); - SubscribeLocalEvent(OnInteractHand); + SubscribeLocalEvent(OnActivate); SubscribeLocalEvent>(OnGetVerb); SubscribeLocalEvent(OnExamined); SubscribeLocalEvent(OnAnchorStateChanged); @@ -60,7 +60,7 @@ namespace Content.Server.Singularity.EntitySystems SwitchOff(uid, component); } - private void OnInteractHand(EntityUid uid, EmitterComponent component, InteractHandEvent args) + private void OnActivate(EntityUid uid, EmitterComponent component, ActivateInWorldEvent args) { if (args.Handled) return; diff --git a/Content.Server/Singularity/EntitySystems/RadiationCollectorSystem.cs b/Content.Server/Singularity/EntitySystems/RadiationCollectorSystem.cs index 797e1bda00..bdd775c792 100644 --- a/Content.Server/Singularity/EntitySystems/RadiationCollectorSystem.cs +++ b/Content.Server/Singularity/EntitySystems/RadiationCollectorSystem.cs @@ -30,7 +30,7 @@ public sealed class RadiationCollectorSystem : EntitySystem public override void Initialize() { base.Initialize(); - SubscribeLocalEvent(OnInteractHand); + SubscribeLocalEvent(OnActivate); SubscribeLocalEvent(OnRadiation); SubscribeLocalEvent(OnExamined); SubscribeLocalEvent(OnAnalyzed); @@ -65,7 +65,7 @@ public sealed class RadiationCollectorSystem : EntitySystem UpdateTankAppearance(uid, component, gasTank); } - private void OnInteractHand(EntityUid uid, RadiationCollectorComponent component, InteractHandEvent args) + private void OnActivate(EntityUid uid, RadiationCollectorComponent component, ActivateInWorldEvent args) { if (TryComp(uid, out UseDelayComponent? useDelay) && !_useDelay.TryResetDelay((uid, useDelay), true)) return;