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:
@@ -6,16 +6,15 @@ using Content.Shared.Coordinates.Helpers;
|
||||
using Content.Shared.Database;
|
||||
using Content.Shared.DoAfter;
|
||||
using Content.Shared.Interaction;
|
||||
using Content.Shared.Movement.Pulling.Components;
|
||||
using Content.Shared.Movement.Pulling.Systems;
|
||||
using Content.Shared.Popups;
|
||||
using Content.Shared.Pulling;
|
||||
using Content.Shared.Pulling.Components;
|
||||
using Content.Shared.Tools;
|
||||
using Content.Shared.Tools.Components;
|
||||
using Robust.Shared.Map;
|
||||
using Robust.Shared.Map.Components;
|
||||
using Robust.Shared.Physics.Components;
|
||||
using Content.Shared.Tag;
|
||||
using Robust.Shared.Player;
|
||||
using Robust.Shared.Serialization;
|
||||
using Robust.Shared.Utility;
|
||||
using SharedToolSystem = Content.Shared.Tools.Systems.SharedToolSystem;
|
||||
@@ -27,7 +26,7 @@ public sealed partial class AnchorableSystem : EntitySystem
|
||||
[Dependency] private readonly IMapManager _mapManager = default!;
|
||||
[Dependency] private readonly ISharedAdminLogManager _adminLogger = default!;
|
||||
[Dependency] private readonly SharedPopupSystem _popup = default!;
|
||||
[Dependency] private readonly SharedPullingSystem _pulling = default!;
|
||||
[Dependency] private readonly PullingSystem _pulling = default!;
|
||||
[Dependency] private readonly SharedToolSystem _tool = default!;
|
||||
[Dependency] private readonly SharedTransformSystem _transformSystem = default!;
|
||||
[Dependency] private readonly TagSystem _tagSystem = default!;
|
||||
@@ -132,9 +131,9 @@ public sealed partial class AnchorableSystem : EntitySystem
|
||||
var rot = xform.LocalRotation;
|
||||
xform.LocalRotation = Math.Round(rot / (Math.PI / 2)) * (Math.PI / 2);
|
||||
|
||||
if (TryComp<SharedPullableComponent>(uid, out var pullable) && pullable.Puller != null)
|
||||
if (TryComp<PullableComponent>(uid, out var pullable) && pullable.Puller != null)
|
||||
{
|
||||
_pulling.TryStopPull(pullable);
|
||||
_pulling.TryStopPull(uid, pullable);
|
||||
}
|
||||
|
||||
// TODO: Anchoring snaps rn anyway!
|
||||
@@ -175,7 +174,7 @@ public sealed partial class AnchorableSystem : EntitySystem
|
||||
public void TryToggleAnchor(EntityUid uid, EntityUid userUid, EntityUid usingUid,
|
||||
AnchorableComponent? anchorable = null,
|
||||
TransformComponent? transform = null,
|
||||
SharedPullableComponent? pullable = null,
|
||||
PullableComponent? pullable = null,
|
||||
ToolComponent? usingTool = null)
|
||||
{
|
||||
if (!Resolve(uid, ref transform))
|
||||
@@ -198,7 +197,7 @@ public sealed partial class AnchorableSystem : EntitySystem
|
||||
private void TryAnchor(EntityUid uid, EntityUid userUid, EntityUid usingUid,
|
||||
AnchorableComponent? anchorable = null,
|
||||
TransformComponent? transform = null,
|
||||
SharedPullableComponent? pullable = null,
|
||||
PullableComponent? pullable = null,
|
||||
ToolComponent? usingTool = null)
|
||||
{
|
||||
if (!Resolve(uid, ref anchorable, ref transform))
|
||||
|
||||
Reference in New Issue
Block a user