From 2145124aa4cce786847f6426f6266ce58582e90e Mon Sep 17 00:00:00 2001 From: metalgearsloth <31366439+metalgearsloth@users.noreply.github.com> Date: Fri, 24 Sep 2021 08:44:25 +1000 Subject: [PATCH] Disabler locker throwing (#4683) --- Content.Server/Hands/Systems/HandsSystem.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Content.Server/Hands/Systems/HandsSystem.cs b/Content.Server/Hands/Systems/HandsSystem.cs index 3b51c70af2..e2d420f21b 100644 --- a/Content.Server/Hands/Systems/HandsSystem.cs +++ b/Content.Server/Hands/Systems/HandsSystem.cs @@ -17,6 +17,7 @@ using Content.Shared.Notification.Managers; using Content.Shared.Physics.Pull; using JetBrains.Annotations; using Robust.Server.Player; +using Robust.Shared.Containers; using Robust.Shared.GameObjects; using Robust.Shared.Input.Binding; using Robust.Shared.IoC; @@ -227,13 +228,12 @@ namespace Content.Server.Hands.Systems var playerEnt = playerSession.AttachedEntity; - if (playerEnt == null || !playerEnt.IsValid() || !playerEnt.TryGetComponent(out SharedHandsComponent? hands)) - return false; - - if (!hands.TryGetActiveHeldEntity(out var throwEnt)) - return false; - - if (!_interactionSystem.TryThrowInteraction(hands.Owner, throwEnt)) + if (playerEnt == null || + !playerEnt.IsValid() || + playerEnt.IsInContainer() || + !playerEnt.TryGetComponent(out SharedHandsComponent? hands) || + !hands.TryGetActiveHeldEntity(out var throwEnt) || + !_interactionSystem.TryThrowInteraction(hands.Owner, throwEnt)) return false; if (throwEnt.TryGetComponent(out StackComponent? stack) && stack.Count > 1 && stack.ThrowIndividually)