From 73c3e9494664b38b4e3c5455c61106d59b27c317 Mon Sep 17 00:00:00 2001 From: Useroth Date: Fri, 17 May 2019 17:07:45 +0200 Subject: [PATCH] A fixed oopsie. --- code/modules/surgery/nutcracker.dm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/code/modules/surgery/nutcracker.dm b/code/modules/surgery/nutcracker.dm index 580a1f4872..a4d2f13c86 100644 --- a/code/modules/surgery/nutcracker.dm +++ b/code/modules/surgery/nutcracker.dm @@ -28,6 +28,11 @@ //It's a bit of a clusterfuck, but if someone wants, it can be easily repurposed to work on other limbs too. /obj/item/nutcracker/attack(mob/living/carbon/M, mob/living/carbon/user) . = ..() + var/target_zone = "head" + var/obj/item/bodypart/target_limb = M.get_bodypart(target_zone) + var/crush_time = max(0, 400 - target_limb.brute_dam*2) + + if(!get_turf(M)) return if(!istype(M)) @@ -43,10 +48,6 @@ to_chat(user, "Expose [M]\s head before trying to crush it!") return - var/target_zone = "head" - var/obj/item/bodypart/target_limb = M.get_bodypart(target_zone) - var/crush_time = max(0, 400 - target_limb.brute_dam*2) - M.visible_message("[user] is trying to crush [M]\s head with \the [src]!")