From: PixelTK <85175107+PixelTheKermit@users.noreply.github.com> Date: Sat, 2 Dec 2023 21:34:37 +0000 (+0000) Subject: Editable "NeedsHands" for SharedPullerComponent using SharedPullingStateManagementSys... X-Git-Url: https://git.smokeofanarchy.ru/gitweb.cgi?a=commitdiff_plain;h=5540f15296e906daaff3530dec7cdff89777a770;p=space-station-14.git 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. --- 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); + } } }