]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Editable "NeedsHands" for SharedPullerComponent using SharedPullingStateManagementSys...
authorPixelTK <85175107+PixelTheKermit@users.noreply.github.com>
Sat, 2 Dec 2023 21:34:37 +0000 (21:34 +0000)
committerGitHub <noreply@github.com>
Sat, 2 Dec 2023 21:34:37 +0000 (16:34 -0500)
* Editable "NeedsHands" for SharedPullerComponent

* is { get; set; } better?

* Waiter, waiter! There's a worm in my access!

They call me the worst clown there is.

* Get the comp to dirty.

Content.Shared/Pulling/Systems/SharedPullingStateManagementSystem.cs

index 974859a6209cace1e21bd756f85eb989539d9e25..f2c7518ae25ecee3c0e2890961870d544d93b2a7 100644 (file)
@@ -210,5 +210,18 @@ namespace Content.Shared.Pulling
                 RaiseLocalEvent(pullable.Owner, new PullableMoveMessage(), true);
             }
         }
+
+        /// <summary>
+        /// Changes if the entity needs a hand in order to be able to pull objects.
+        /// </summary>
+        public void ChangeHandRequirement(EntityUid uid, bool needsHands, SharedPullerComponent? comp)
+        {
+            if (!Resolve(uid, ref comp, false))
+                return;
+
+            comp.NeedsHands = needsHands;
+
+            Dirty(uid, comp);
+        }
     }
 }