From e821ee0dbc9d0e61ddccbaf41ef987143f2efb80 Mon Sep 17 00:00:00 2001 From: MistakeNot4892 Date: Thu, 23 Jan 2025 10:46:25 +1100 Subject: [PATCH] Fixes bad istype() in hand slot code. --- code/modules/mob/mob.dm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/modules/mob/mob.dm b/code/modules/mob/mob.dm index 3a465515aa4..98985b3add8 100644 --- a/code/modules/mob/mob.dm +++ b/code/modules/mob/mob.dm @@ -1401,8 +1401,8 @@ /// THIS DOES NOT RELATE TO HELD ITEM SLOTS. It is very specifically a functional BP_L_HAND or BP_R_HAND organ, not necessarily a gripper. /mob/proc/get_usable_hand_slot_organ() - var/obj/item/organ/external/paw = GET_EXTERNAL_ORGAN(src, BP_L_HAND) - if(!istype(paw) && !paw.is_usable()) - paw = GET_EXTERNAL_ORGAN(src, BP_R_HAND) - if(istype(paw) && paw.is_usable()) - return paw + var/static/list/hand_slots = list(BP_L_HAND, BP_R_HAND) + for(var/slot in shuffle(hand_slots)) + var/obj/item/organ/external/hand = GET_EXTERNAL_ORGAN(src, slot) + if(istype(hand) && hand.is_usable()) + return hand