From 40dfc1f5ced657bbe8af18f1d4918f46d7496193 Mon Sep 17 00:00:00 2001 From: Leon Friedrich <60421075+ElectroJr@users.noreply.github.com> Date: Mon, 13 Dec 2021 18:46:09 +1300 Subject: [PATCH] Allow pulling entities with full hands. (#5758) --- Content.Server/Hands/Systems/HandsSystem.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Content.Server/Hands/Systems/HandsSystem.cs b/Content.Server/Hands/Systems/HandsSystem.cs index e5854da71f..8b216ed1b4 100644 --- a/Content.Server/Hands/Systems/HandsSystem.cs +++ b/Content.Server/Hands/Systems/HandsSystem.cs @@ -65,6 +65,9 @@ namespace Content.Server.Hands.Systems private static void HandlePullAttempt(EntityUid uid, HandsComponent component, PullAttemptMessage args) { + if (args.Puller.Owner != uid) + return; + // Cancel pull if all hands full. if (component.Hands.All(hand => !hand.IsEmpty)) args.Cancelled = true; @@ -72,6 +75,9 @@ namespace Content.Server.Hands.Systems private void HandlePullStarted(EntityUid uid, HandsComponent component, PullStartedMessage args) { + if (args.Puller.Owner != uid) + return; + if (!_virtualItemSystem.TrySpawnVirtualItemInHand(args.Pulled.Owner, uid)) { DebugTools.Assert("Unable to find available hand when starting pulling??"); @@ -80,6 +86,9 @@ namespace Content.Server.Hands.Systems private void HandlePullStopped(EntityUid uid, HandsComponent component, PullStoppedMessage args) { + if (args.Puller.Owner != uid) + return; + // Try find hand that is doing this pull. // and clear it. foreach (var hand in component.Hands)