From b71f39cfb4630053f7c1d71c2ec8a13e332af47d Mon Sep 17 00:00:00 2001 From: ShadowCommander <10494922+ShadowCommander@users.noreply.github.com> Date: Sun, 26 Jan 2020 05:00:59 -0800 Subject: [PATCH] Fix PickUp verb showing up for entities in containers (#567) --- .../GameObjects/Components/Items/Storage/ItemComponent.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Content.Server/GameObjects/Components/Items/Storage/ItemComponent.cs b/Content.Server/GameObjects/Components/Items/Storage/ItemComponent.cs index e9d6d03ad2..1035ec5949 100644 --- a/Content.Server/GameObjects/Components/Items/Storage/ItemComponent.cs +++ b/Content.Server/GameObjects/Components/Items/Storage/ItemComponent.cs @@ -4,6 +4,7 @@ using Content.Shared.GameObjects; using Content.Shared.GameObjects.Components.Items; using Robust.Server.GameObjects; using Robust.Server.Interfaces.GameObjects; +using Robust.Shared.Containers; using Robust.Shared.GameObjects; using Robust.Shared.Interfaces.GameObjects; using Robust.Shared.Interfaces.Random; @@ -84,7 +85,7 @@ namespace Content.Server.GameObjects protected override VerbVisibility GetVisibility(IEntity user, ItemComponent component) { - if (user.TryGetComponent(out HandsComponent hands) && hands.IsHolding(component.Owner)) + if (ContainerHelpers.IsInContainer(component.Owner)) { return VerbVisibility.Invisible; }