From 1e5639ef1b40d47077f5f28211d24b25185224c3 Mon Sep 17 00:00:00 2001 From: Kara Date: Thu, 16 Jun 2022 03:59:13 -0700 Subject: [PATCH] Fix wide attacking in containers (#8886) --- Content.Server/Interaction/InteractionSystem.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Content.Server/Interaction/InteractionSystem.cs b/Content.Server/Interaction/InteractionSystem.cs index 4cbd608afa..591ef3b1a9 100644 --- a/Content.Server/Interaction/InteractionSystem.cs +++ b/Content.Server/Interaction/InteractionSystem.cs @@ -197,6 +197,12 @@ namespace Content.Server.Interaction if (!unobstructed) return; } + else if (ContainerSystem.IsEntityInContainer(user)) + { + // No wide attacking while in containers (holos, lockers, etc). + // Can't think of a valid case where you would want this. + return; + } // Verify user has a hand, and find what object they are currently holding in their active hand if (TryComp(user, out HandsComponent? hands))