]> git.smokeofanarchy.ru Git - space-station-14.git/commitdiff
Don't switch-unwield if mob has more than 2 hands (#28438)
authorErrant <35878406+Errant-4@users.noreply.github.com>
Tue, 4 Jun 2024 13:11:48 +0000 (15:11 +0200)
committerGitHub <noreply@github.com>
Tue, 4 Jun 2024 13:11:48 +0000 (09:11 -0400)
Content.Shared/Wieldable/WieldableSystem.cs

index c09044f84b43aab833e05421e6d5806b64169da4..cb95c1d7e780290390fc9afafaacf6a60229f104 100644 (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);