Skip to content

Commit

Permalink
Fixes bad istype() in hand slot code.
Browse files Browse the repository at this point in the history
  • Loading branch information
MistakeNot4892 committed Jan 23, 2025
1 parent 15ddd12 commit e821ee0
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions code/modules/mob/mob.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit e821ee0

Please sign in to comment.