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:
metalgearsloth
2024-03-19 14:30:56 +11:00
committed by GitHub
parent f8b54a06b7
commit c584f6444a
53 changed files with 797 additions and 1357 deletions

View File

@@ -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);
}
}

View File

@@ -15,6 +15,7 @@ using Robust.Shared.Network;
using Robust.Shared.Physics.Systems;
using Robust.Shared.Player;
using Robust.Shared.Timing;
using PullingSystem = Content.Shared.Movement.Pulling.Systems.PullingSystem;
namespace Content.Shared.Buckle;
@@ -35,7 +36,7 @@ public abstract partial class SharedBuckleSystem : EntitySystem
[Dependency] private readonly SharedInteractionSystem _interaction = default!;
[Dependency] private readonly SharedJointSystem _joints = default!;
[Dependency] private readonly SharedPopupSystem _popup = default!;
[Dependency] private readonly SharedPullingSystem _pulling = default!;
[Dependency] private readonly PullingSystem _pulling = default!;
[Dependency] private readonly SharedTransformSystem _transform = default!;
[Dependency] private readonly StandingStateSystem _standing = default!;
[Dependency] private readonly SharedPhysicsSystem _physics = default!;