Merge pull request #5943 from Kyep/cryo_mechparts

Fix for medbay cryo never auto-ejecting patients with mech limbs
This commit is contained in:
Fox McCloud
2016-12-08 19:03:25 -05:00
committed by GitHub
4 changed files with 17 additions and 1 deletions
@@ -201,3 +201,12 @@ I use this to standardize shadowling dethrall code
return null
var/obj/item/organ/internal/O = get_int_organ(organ_name)
return O.parent_organ
/mob/living/carbon/human/has_organic_damage()
var/odmg = 0
for(var/obj/item/organ/external/O in organs)
if(O.status & ORGAN_ROBOT)
odmg += O.brute_dam
odmg += O.burn_dam
return (health < (100 - odmg))
+4
View File
@@ -287,6 +287,10 @@
adjustFireLoss(burn)
src.updatehealth()
/mob/living/proc/has_organic_damage()
return (maxHealth - health)
/mob/living/proc/restore_all_organs()
return
@@ -368,6 +368,9 @@
if(declare_crit && C.health <= 0) //Critical condition! Call for help!
declare(C)
if(!C.has_organic_damage())
return 0
//If they're injured, we're using a beaker, and don't have one of our WONDERCHEMS.
if((reagent_glass) && (use_beaker) && ((C.getBruteLoss() >= heal_threshold) || (C.getToxLoss() >= heal_threshold) || (C.getToxLoss() >= heal_threshold) || (C.getOxyLoss() >= (heal_threshold + 15))))
for(var/datum/reagent/R in reagent_glass.reagents.reagent_list)