diff --git a/code/game/machinery/cryo.dm b/code/game/machinery/cryo.dm index 99ff973ca76..67414971337 100644 --- a/code/game/machinery/cryo.dm +++ b/code/game/machinery/cryo.dm @@ -122,7 +122,7 @@ ..() if(autoeject) if(occupant) - if(occupant.health >= 100) + if(!occupant.has_organic_damage()) on = 0 go_out() playsound(src.loc, 'sound/machines/ding.ogg', 50, 1) diff --git a/code/modules/mob/living/carbon/human/human_organs.dm b/code/modules/mob/living/carbon/human/human_organs.dm index 50f1e7cd342..2f07fdacd07 100644 --- a/code/modules/mob/living/carbon/human/human_organs.dm +++ b/code/modules/mob/living/carbon/human/human_organs.dm @@ -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)) + diff --git a/code/modules/mob/living/living.dm b/code/modules/mob/living/living.dm index 6be18445b44..62102a2f662 100644 --- a/code/modules/mob/living/living.dm +++ b/code/modules/mob/living/living.dm @@ -287,6 +287,10 @@ adjustFireLoss(burn) src.updatehealth() +/mob/living/proc/has_organic_damage() + return (maxHealth - health) + + /mob/living/proc/restore_all_organs() return diff --git a/code/modules/mob/living/simple_animal/bot/medbot.dm b/code/modules/mob/living/simple_animal/bot/medbot.dm index 92fe2c761bc..df3ae448cf6 100644 --- a/code/modules/mob/living/simple_animal/bot/medbot.dm +++ b/code/modules/mob/living/simple_animal/bot/medbot.dm @@ -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)