From f634966a3435c4f2239e86a8375a94550618d0fa Mon Sep 17 00:00:00 2001 From: CitadelStationBot Date: Sat, 15 Jul 2017 22:33:14 -0500 Subject: [PATCH] Fixes monkeys trying to take offhands --- code/modules/mob/living/carbon/monkey/combat.dm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/monkey/combat.dm b/code/modules/mob/living/carbon/monkey/combat.dm index c38c624ebb..92528de148 100644 --- a/code/modules/mob/living/carbon/monkey/combat.dm +++ b/code/modules/mob/living/carbon/monkey/combat.dm @@ -272,7 +272,11 @@ if(Adjacent(target) && isturf(target.loc)) // if right next to perp // check if target has a weapon - var/obj/item/weapon/W = locate(/obj/item/weapon) in target.held_items + var/obj/item/weapon/W + for(var/obj/item/weapon/I in target.held_items) + if(!(I.flags & ABSTRACT)) + W = I + break // if the target has a weapon, chance to disarm them if(W && prob(MONKEY_ATTACK_DISARM_PROB))