Skip to content

Commit

Permalink
Singularity equipment can now be activated with E interact (space-wiz…
Browse files Browse the repository at this point in the history
…ards#33762)

These were coded to only listen to InteractHand, which doesn't follow our interaction model properly.
  • Loading branch information
PJB3005 authored Dec 8, 2024
1 parent 0c4dd9d commit f9da258
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public override void Initialize()

SubscribeLocalEvent<ContainmentFieldGeneratorComponent, StartCollideEvent>(HandleGeneratorCollide);
SubscribeLocalEvent<ContainmentFieldGeneratorComponent, ExaminedEvent>(OnExamine);
SubscribeLocalEvent<ContainmentFieldGeneratorComponent, InteractHandEvent>(OnInteract);
SubscribeLocalEvent<ContainmentFieldGeneratorComponent, ActivateInWorldEvent>(OnActivate);
SubscribeLocalEvent<ContainmentFieldGeneratorComponent, AnchorStateChangedEvent>(OnAnchorChanged);
SubscribeLocalEvent<ContainmentFieldGeneratorComponent, ReAnchorEvent>(OnReanchorEvent);
SubscribeLocalEvent<ContainmentFieldGeneratorComponent, UnanchorAttemptEvent>(OnUnanchorAttempt);
Expand Down Expand Up @@ -90,7 +90,7 @@ private void OnExamine(EntityUid uid, ContainmentFieldGeneratorComponent compone
args.PushMarkup(Loc.GetString("comp-containment-off"));
}

private void OnInteract(Entity<ContainmentFieldGeneratorComponent> generator, ref InteractHandEvent args)
private void OnActivate(Entity<ContainmentFieldGeneratorComponent> generator, ref ActivateInWorldEvent args)
{
if (args.Handled)
return;
Expand Down
4 changes: 2 additions & 2 deletions Content.Server/Singularity/EntitySystems/EmitterSystem.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ public override void Initialize()

SubscribeLocalEvent<EmitterComponent, PowerConsumerReceivedChanged>(ReceivedChanged);
SubscribeLocalEvent<EmitterComponent, PowerChangedEvent>(OnApcChanged);
SubscribeLocalEvent<EmitterComponent, InteractHandEvent>(OnInteractHand);
SubscribeLocalEvent<EmitterComponent, ActivateInWorldEvent>(OnActivate);
SubscribeLocalEvent<EmitterComponent, GetVerbsEvent<Verb>>(OnGetVerb);
SubscribeLocalEvent<EmitterComponent, ExaminedEvent>(OnExamined);
SubscribeLocalEvent<EmitterComponent, AnchorStateChangedEvent>(OnAnchorStateChanged);
Expand All @@ -60,7 +60,7 @@ private void OnAnchorStateChanged(EntityUid uid, EmitterComponent component, ref
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;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public sealed class RadiationCollectorSystem : EntitySystem
public override void Initialize()
{
base.Initialize();
SubscribeLocalEvent<RadiationCollectorComponent, InteractHandEvent>(OnInteractHand);
SubscribeLocalEvent<RadiationCollectorComponent, ActivateInWorldEvent>(OnActivate);
SubscribeLocalEvent<RadiationCollectorComponent, OnIrradiatedEvent>(OnRadiation);
SubscribeLocalEvent<RadiationCollectorComponent, ExaminedEvent>(OnExamined);
SubscribeLocalEvent<RadiationCollectorComponent, GasAnalyzerScanEvent>(OnAnalyzed);
Expand Down Expand Up @@ -65,7 +65,7 @@ private void OnTankChanged(EntityUid uid, RadiationCollectorComponent component,
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;
Expand Down

0 comments on commit f9da258

Please sign in to comment.