mirror of
https://github.com/DeltaV-Station/Delta-v.git
synced 2026-09-30 08:07:28 +00:00
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
(cherry picked from commit c584f6444a)
This commit is contained in:
@@ -19,7 +19,6 @@ using Content.Shared.Jittering;
|
||||
using Content.Shared.Maps;
|
||||
using Content.Shared.Mobs;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Pulling.Components;
|
||||
using Content.Shared.Speech.EntitySystems;
|
||||
using Content.Shared.StatusEffect;
|
||||
using Content.Shared.Stunnable;
|
||||
@@ -32,6 +31,8 @@ using Robust.Shared.Physics.Events;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Prototypes;
|
||||
using Robust.Shared.Random;
|
||||
using PullableComponent = Content.Shared.Movement.Pulling.Components.PullableComponent;
|
||||
using PullerComponent = Content.Shared.Movement.Pulling.Components.PullerComponent;
|
||||
|
||||
namespace Content.Server.Electrocution;
|
||||
|
||||
@@ -475,14 +476,14 @@ public sealed class ElectrocutionSystem : SharedElectrocutionSystem
|
||||
all.Add((entity, depth));
|
||||
visited.Add(entity);
|
||||
|
||||
if (TryComp<SharedPullableComponent>(entity, out var pullable) &&
|
||||
if (TryComp<PullableComponent>(entity, out var pullable) &&
|
||||
pullable.Puller is { Valid: true } pullerId &&
|
||||
!visited.Contains(pullerId))
|
||||
{
|
||||
GetChainedElectrocutionTargetsRecurse(pullerId, depth + 1, visited, all);
|
||||
}
|
||||
|
||||
if (TryComp<SharedPullerComponent>(entity, out var puller) &&
|
||||
if (TryComp<PullerComponent>(entity, out var puller) &&
|
||||
puller.Pulling is { Valid: true } pullingId &&
|
||||
!visited.Contains(pullingId))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user