From 1980ecf62a17e573cee2c15ec05d849f979c36a1 Mon Sep 17 00:00:00 2001 From: Kyep Date: Sat, 3 Dec 2016 20:48:37 -0800 Subject: [PATCH] Makes cryopod auto-eject work with mech limbs - People with mechanical limbs are now auto-ejected properly from cryotubes once their organic parts have been healed. --- code/game/machinery/cryo.dm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index 99ff973ca76..bb1d91cdc5d 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -122,7 +122,14 @@ ..() if(autoeject) if(occupant) - if(occupant.health >= 100) + var/mech_damage = 0 + if(istype(occupant, /mob/living/carbon/human)) + var/mob/living/carbon/human/H = occupant + for(var/obj/item/organ/external/O in H.organs) + if(O.status & ORGAN_ROBOT) + mech_damage += O.brute_dam + mech_damage += O.burn_dam + if(occupant.health >= (100 - mech_damage)) on = 0 go_out() playsound(src.loc, 'sound/machines/ding.ogg', 50, 1)