using Content.Shared.Movement.Pulling.Events;
using Content.Shared.Movement.Systems;
using Content.Shared.Pulling.Events;
+using Content.Shared.Standing;
using Content.Shared.Throwing;
using Content.Shared.Verbs;
using Robust.Shared.Containers;
SubscribeLocalEvent<PullerComponent, EntityUnpausedEvent>(OnPullerUnpaused);
SubscribeLocalEvent<PullerComponent, VirtualItemDeletedEvent>(OnVirtualItemDeleted);
SubscribeLocalEvent<PullerComponent, RefreshMovementSpeedModifiersEvent>(OnRefreshMovespeed);
+ SubscribeLocalEvent<PullerComponent, DropHandItemsEvent>(OnDropHandItems);
CommandBinds.Builder
.Bind(ContentKeyFunctions.MovePulledObject, new PointerInputCmdHandler(OnRequestMovePulledObject))
.Register<PullingSystem>();
}
+ private void OnDropHandItems(EntityUid uid, PullerComponent pullerComp, DropHandItemsEvent args)
+ {
+ if (pullerComp.Pulling == null || pullerComp.NeedsHands)
+ return;
+
+ if (!TryComp(pullerComp.Pulling, out PullableComponent? pullableComp))
+ return;
+
+ TryStopPull(pullerComp.Pulling.Value, pullableComp, uid);
+ }
+
private void OnPullerContainerInsert(Entity<PullerComponent> ent, ref EntGotInsertedIntoContainerMessage args)
{
if (ent.Comp.Pulling == null) return;