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.
This commit is contained in:
PixelTK
2023-12-02 21:34:37 +00:00
committed by GitHub
parent 5c10bcafb9
commit 5540f15296

View File

@@ -210,5 +210,18 @@ namespace Content.Shared.Pulling
RaiseLocalEvent(pullable.Owner, new PullableMoveMessage(), true); 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);
}
} }
} }