From 5540f15296e906daaff3530dec7cdff89777a770 Mon Sep 17 00:00:00 2001 From: PixelTK <85175107+PixelTheKermit@users.noreply.github.com> Date: Sat, 2 Dec 2023 21:34:37 +0000 Subject: [PATCH] Editable "NeedsHands" for SharedPullerComponent using SharedPullingStateManagementSystem (#21960) * 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. --- .../Systems/SharedPullingStateManagementSystem.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Content.Shared/Pulling/Systems/SharedPullingStateManagementSystem.cs b/Content.Shared/Pulling/Systems/SharedPullingStateManagementSystem.cs index 974859a620..f2c7518ae2 100644 --- a/Content.Shared/Pulling/Systems/SharedPullingStateManagementSystem.cs +++ b/Content.Shared/Pulling/Systems/SharedPullingStateManagementSystem.cs @@ -210,5 +210,18 @@ namespace Content.Shared.Pulling RaiseLocalEvent(pullable.Owner, new PullableMoveMessage(), true); } } + + /// + /// Changes if the entity needs a hand in order to be able to pull objects. + /// + public void ChangeHandRequirement(EntityUid uid, bool needsHands, SharedPullerComponent? comp) + { + if (!Resolve(uid, ref comp, false)) + return; + + comp.NeedsHands = needsHands; + + Dirty(uid, comp); + } } } -- 2.51.2