Remove InteractedWithEvent and friends. (#11939)

This commit is contained in:
Leon Friedrich
2022-10-26 14:15:48 +13:00
committed by GitHub
parent b03f17bda2
commit c0b657ca18
21 changed files with 133 additions and 101 deletions

View File

@@ -1,6 +1,7 @@
using Content.Shared.ActionBlocker;
using Content.Shared.Buckle.Components;
using Content.Shared.Hands.EntitySystems;
using Content.Shared.Interaction;
using Content.Shared.Physics.Pull;
using Content.Shared.Pulling.Components;
using Content.Shared.Pulling.Events;
@@ -16,6 +17,7 @@ namespace Content.Shared.Pulling
[Dependency] private readonly ActionBlockerSystem _blocker = default!;
[Dependency] private readonly SharedContainerSystem _containerSystem = default!;
[Dependency] private readonly SharedHandsSystem _handsSystem = default!;
[Dependency] private readonly SharedInteractionSystem _interaction = default!;
public bool CanPull(EntityUid puller, EntityUid pulled)
{
@@ -189,6 +191,8 @@ namespace Content.Shared.Pulling
if (pullAttempt.Cancelled)
return false;
_interaction.DoContactInteraction(pullable.Owner, puller.Owner);
_pullSm.ForceRelationship(puller, pullable);
pullable.PrevFixedRotation = pullablePhysics.FixedRotation;
pullablePhysics.FixedRotation = pullable.FixedRotationOnPull;

View File

@@ -93,6 +93,7 @@ namespace Content.Shared.Pulling
Verb verb = new();
verb.Text = Loc.GetString("pulling-verb-get-data-text-stop-pulling");
verb.Act = () => TryStopPull(component, args.User);
verb.DoContactInteraction = false; // pulling handle its own contact interaction.
args.Verbs.Add(verb);
}
else if (CanPull(args.User, args.Target))
@@ -100,6 +101,7 @@ namespace Content.Shared.Pulling
Verb verb = new();
verb.Text = Loc.GetString("pulling-verb-get-data-text");
verb.Act = () => TryStartPull(args.User, args.Target);
verb.DoContactInteraction = false; // pulling handle its own contact interaction.
args.Verbs.Add(verb);
}
}