Pulling rework (#20906)

* 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
This commit is contained in:
metalgearsloth
2024-02-03 14:36:09 +11:00
committed by GitHub
parent 79e3a6630d
commit 0d8254b2a2
53 changed files with 764 additions and 1359 deletions

View File

@@ -11,7 +11,6 @@ using Content.Shared.Interaction.Events;
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;
@@ -20,6 +19,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;
@@ -356,11 +356,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);
}
}
@@ -369,12 +369,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);
}
}