From 87ff9e75407eaedd53c921c3d94525713cbd6c1a Mon Sep 17 00:00:00 2001 From: wb13 <26555013+wb13@users.noreply.github.com> Date: Wed, 20 Sep 2023 15:40:59 +0300 Subject: [PATCH] [MIRROR] Installing items using a gripper no longer fails sanity checks --- code/_onclick/item_attack.dm | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index 2f5378278baba..180465f46795c 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -217,10 +217,15 @@ avoid code duplication. This includes items that may sometimes act as a standard if (!silent) FEEDBACK_UNEQUIP_FAILURE(src, tool) return FALSE - if (HAS_FLAGS(flags, SANITY_CHECK_TOOL_IN_HAND) && get_active_hand() != tool) - if (!silent) - FEEDBACK_FAILURE(src, "\The [tool] must stay in your active hand.") - return FALSE + if (HAS_FLAGS(flags, SANITY_CHECK_TOOL_IN_HAND)) + var/active = get_active_hand() + if (istype(active, /obj/item/gripper)) + var/obj/item/gripper/gripper = active + active = gripper.wrapped + if (active != tool) + if (!silent) + FEEDBACK_FAILURE(src, "\The [tool] must stay in your active hand.") + return FALSE return TRUE