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.
This commit is contained in:
Kyep
2016-12-03 20:48:37 -08:00
parent 50506f40dd
commit 1980ecf62a
+8 -1
View File
@@ -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)