Pulling rework v2 (#24936)
* Pulling rework Fixing up the FOUR systems managing pulling, all the shitcode, and also making it nicer ingame. * More pulling cleanup * stats * More cleanup * First draft * More pulling * weh * Fix puller * Pulling working * Fix merge * Dunked * Self-merge time * Fix hotkey * Fix container changes * oop * Fix multi-pulling * Move alerts cleanup. * pulling fixes
This commit is contained in:
@@ -10,7 +10,6 @@ using Content.Shared.Interaction;
|
||||
using Content.Shared.Mobs.Components;
|
||||
using Content.Shared.Movement.Events;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Pulling.Components;
|
||||
using Content.Shared.Standing;
|
||||
using Content.Shared.Storage.Components;
|
||||
using Content.Shared.Stunnable;
|
||||
@@ -19,6 +18,7 @@ using Content.Shared.Verbs;
|
||||
using Robust.Shared.Physics.Components;
|
||||
using Robust.Shared.Physics.Events;
|
||||
using Robust.Shared.Utility;
|
||||
using PullableComponent = Content.Shared.Movement.Pulling.Components.PullableComponent;
|
||||
|
||||
namespace Content.Shared.Buckle;
|
||||
|
||||
@@ -348,11 +348,11 @@ public abstract partial class SharedBuckleSystem
|
||||
RaiseLocalEvent(ev.BuckledEntity, ref ev);
|
||||
RaiseLocalEvent(ev.StrapEntity, ref ev);
|
||||
|
||||
if (TryComp<SharedPullableComponent>(buckleUid, out var ownerPullable))
|
||||
if (TryComp<PullableComponent>(buckleUid, out var ownerPullable))
|
||||
{
|
||||
if (ownerPullable.Puller != null)
|
||||
{
|
||||
_pulling.TryStopPull(ownerPullable);
|
||||
_pulling.TryStopPull(buckleUid, ownerPullable);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -361,12 +361,12 @@ public abstract partial class SharedBuckleSystem
|
||||
_physics.ResetDynamics(physics);
|
||||
}
|
||||
|
||||
if (!buckleComp.PullStrap && TryComp<SharedPullableComponent>(strapUid, out var toPullable))
|
||||
if (!buckleComp.PullStrap && TryComp<PullableComponent>(strapUid, out var toPullable))
|
||||
{
|
||||
if (toPullable.Puller == buckleUid)
|
||||
{
|
||||
// can't pull it and buckle to it at the same time
|
||||
_pulling.TryStopPull(toPullable);
|
||||
_pulling.TryStopPull(strapUid, toPullable);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user