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.
This commit is contained in:
committed by
GitHub
parent
0c4dd9d1b9
commit
f9da25881d
@@ -31,7 +31,7 @@ public sealed class ContainmentFieldGeneratorSystem : EntitySystem
|
|||||||
|
|
||||||
SubscribeLocalEvent<ContainmentFieldGeneratorComponent, StartCollideEvent>(HandleGeneratorCollide);
|
SubscribeLocalEvent<ContainmentFieldGeneratorComponent, StartCollideEvent>(HandleGeneratorCollide);
|
||||||
SubscribeLocalEvent<ContainmentFieldGeneratorComponent, ExaminedEvent>(OnExamine);
|
SubscribeLocalEvent<ContainmentFieldGeneratorComponent, ExaminedEvent>(OnExamine);
|
||||||
SubscribeLocalEvent<ContainmentFieldGeneratorComponent, InteractHandEvent>(OnInteract);
|
SubscribeLocalEvent<ContainmentFieldGeneratorComponent, ActivateInWorldEvent>(OnActivate);
|
||||||
SubscribeLocalEvent<ContainmentFieldGeneratorComponent, AnchorStateChangedEvent>(OnAnchorChanged);
|
SubscribeLocalEvent<ContainmentFieldGeneratorComponent, AnchorStateChangedEvent>(OnAnchorChanged);
|
||||||
SubscribeLocalEvent<ContainmentFieldGeneratorComponent, ReAnchorEvent>(OnReanchorEvent);
|
SubscribeLocalEvent<ContainmentFieldGeneratorComponent, ReAnchorEvent>(OnReanchorEvent);
|
||||||
SubscribeLocalEvent<ContainmentFieldGeneratorComponent, UnanchorAttemptEvent>(OnUnanchorAttempt);
|
SubscribeLocalEvent<ContainmentFieldGeneratorComponent, UnanchorAttemptEvent>(OnUnanchorAttempt);
|
||||||
@@ -90,7 +90,7 @@ public sealed class ContainmentFieldGeneratorSystem : EntitySystem
|
|||||||
args.PushMarkup(Loc.GetString("comp-containment-off"));
|
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)
|
if (args.Handled)
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -45,7 +45,7 @@ namespace Content.Server.Singularity.EntitySystems
|
|||||||
|
|
||||||
SubscribeLocalEvent<EmitterComponent, PowerConsumerReceivedChanged>(ReceivedChanged);
|
SubscribeLocalEvent<EmitterComponent, PowerConsumerReceivedChanged>(ReceivedChanged);
|
||||||
SubscribeLocalEvent<EmitterComponent, PowerChangedEvent>(OnApcChanged);
|
SubscribeLocalEvent<EmitterComponent, PowerChangedEvent>(OnApcChanged);
|
||||||
SubscribeLocalEvent<EmitterComponent, InteractHandEvent>(OnInteractHand);
|
SubscribeLocalEvent<EmitterComponent, ActivateInWorldEvent>(OnActivate);
|
||||||
SubscribeLocalEvent<EmitterComponent, GetVerbsEvent<Verb>>(OnGetVerb);
|
SubscribeLocalEvent<EmitterComponent, GetVerbsEvent<Verb>>(OnGetVerb);
|
||||||
SubscribeLocalEvent<EmitterComponent, ExaminedEvent>(OnExamined);
|
SubscribeLocalEvent<EmitterComponent, ExaminedEvent>(OnExamined);
|
||||||
SubscribeLocalEvent<EmitterComponent, AnchorStateChangedEvent>(OnAnchorStateChanged);
|
SubscribeLocalEvent<EmitterComponent, AnchorStateChangedEvent>(OnAnchorStateChanged);
|
||||||
@@ -60,7 +60,7 @@ namespace Content.Server.Singularity.EntitySystems
|
|||||||
SwitchOff(uid, component);
|
SwitchOff(uid, component);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void OnInteractHand(EntityUid uid, EmitterComponent component, InteractHandEvent args)
|
private void OnActivate(EntityUid uid, EmitterComponent component, ActivateInWorldEvent args)
|
||||||
{
|
{
|
||||||
if (args.Handled)
|
if (args.Handled)
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -30,7 +30,7 @@ public sealed class RadiationCollectorSystem : EntitySystem
|
|||||||
public override void Initialize()
|
public override void Initialize()
|
||||||
{
|
{
|
||||||
base.Initialize();
|
base.Initialize();
|
||||||
SubscribeLocalEvent<RadiationCollectorComponent, InteractHandEvent>(OnInteractHand);
|
SubscribeLocalEvent<RadiationCollectorComponent, ActivateInWorldEvent>(OnActivate);
|
||||||
SubscribeLocalEvent<RadiationCollectorComponent, OnIrradiatedEvent>(OnRadiation);
|
SubscribeLocalEvent<RadiationCollectorComponent, OnIrradiatedEvent>(OnRadiation);
|
||||||
SubscribeLocalEvent<RadiationCollectorComponent, ExaminedEvent>(OnExamined);
|
SubscribeLocalEvent<RadiationCollectorComponent, ExaminedEvent>(OnExamined);
|
||||||
SubscribeLocalEvent<RadiationCollectorComponent, GasAnalyzerScanEvent>(OnAnalyzed);
|
SubscribeLocalEvent<RadiationCollectorComponent, GasAnalyzerScanEvent>(OnAnalyzed);
|
||||||
@@ -65,7 +65,7 @@ public sealed class RadiationCollectorSystem : EntitySystem
|
|||||||
UpdateTankAppearance(uid, component, gasTank);
|
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))
|
if (TryComp(uid, out UseDelayComponent? useDelay) && !_useDelay.TryResetDelay((uid, useDelay), true))
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user