mirror of
https://github.com/space-syndicate/space-station-14.git
synced 2026-10-09 10:21:18 +03:00
Fix pull not stopping when character is downed (#27796)
This commit is contained in:
parent
1a09374b01
commit
83099640e6
1 changed files with 13 additions and 0 deletions
|
|
@ -13,6 +13,7 @@ using Content.Shared.Movement.Pulling.Components;
|
|||
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;
|
||||
|
|
@ -62,6 +63,7 @@ public sealed class PullingSystem : EntitySystem
|
|||
SubscribeLocalEvent<PullerComponent, EntityUnpausedEvent>(OnPullerUnpaused);
|
||||
SubscribeLocalEvent<PullerComponent, VirtualItemDeletedEvent>(OnVirtualItemDeleted);
|
||||
SubscribeLocalEvent<PullerComponent, RefreshMovementSpeedModifiersEvent>(OnRefreshMovespeed);
|
||||
SubscribeLocalEvent<PullerComponent, DropHandItemsEvent>(OnDropHandItems);
|
||||
|
||||
CommandBinds.Builder
|
||||
.Bind(ContentKeyFunctions.MovePulledObject, new PointerInputCmdHandler(OnRequestMovePulledObject))
|
||||
|
|
@ -69,6 +71,17 @@ public sealed class PullingSystem : EntitySystem
|
|||
.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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue