Don't switch-unwield if mob has more than 2 hands (#28438)

This commit is contained in:
Errant
2024-06-04 15:11:48 +02:00
committed by GitHub
parent 87fe804831
commit 58647e7036

View File

@@ -1,3 +1,4 @@
using System.Linq;
using Content.Shared.Examine;
using Content.Shared.Hands;
using Content.Shared.Hands.Components;
@@ -94,7 +95,8 @@ public sealed class WieldableSystem : EntitySystem
private void OnDeselectWieldable(EntityUid uid, WieldableComponent component, HandDeselectedEvent args)
{
if (!component.Wielded)
if (!component.Wielded ||
_handsSystem.EnumerateHands(args.User).Count() > 2)
return;
TryUnwield(uid, component, args.User);