diff --git a/code/datums/components/rot.dm b/code/datums/components/rot.dm index b37c6773f3f2..38fadfecd05b 100644 --- a/code/datums/components/rot.dm +++ b/code/datums/components/rot.dm @@ -69,6 +69,10 @@ if(C.bodytemperature <= T0C-10 || (!(C.mob_biotypes & (MOB_ORGANIC & MOB_UNDEAD)))) return + // Healium prevents body from rotting + if(C.reagents.has_reagent(/datum/reagent/gas/healium)) + return + ..() /datum/component/rot/gibs diff --git a/code/game/data_huds.dm b/code/game/data_huds.dm index 45b6908f48f9..4c53e4c48db2 100644 --- a/code/game/data_huds.dm +++ b/code/game/data_huds.dm @@ -171,7 +171,7 @@ Medical HUD! Basic mode needs suit sensors on. return if(tod) var/tdelta = round(world.time - timeofdeath) - if(tdelta < (DEFIB_TIME_LIMIT)) + if(tdelta < (DEFIB_TIME_LIMIT) || reagents.has_reagent(/datum/reagent/gas/healium)) holder.icon_state = "huddefib" return holder.icon_state = "huddead" diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm index 322078d72f52..0ed1c7e2c99a 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm @@ -321,6 +321,17 @@ gas_reagent.reaction_mob(mob_occupant, VAPOR|BREATH, 2, permeability = 1) air1.adjust_moles(gas_id, -0.1 / efficiency) qdel(gas_reagent) + if(C && C.stat == DEAD && C.reagents.has_reagent(/datum/reagent/gas/healium)) // attempts to cycle healium in the body to a reviable state + if(!C.can_defib(FALSE)) + C.reagents.del_reagent(/datum/reagent/gas/healium) + else + set_on(FALSE) + playsound(src, 'sound/machines/cryo_warning.ogg', volume) // Bug the doctors. + var/msg = "Dead body has been patched up to a revivable state." + if(autoeject) // Eject if configured. + msg += " Auto ejecting body now." + open_machine() + radio.talk_into(src, msg, radio_channel) return TRUE diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 47d99ceff3ce..c4fe1d3398c5 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -874,8 +874,9 @@ /mob/living/carbon/proc/can_defib(careAboutGhost = TRUE) //yogs start if(suiciding || hellbound || HAS_TRAIT(src, TRAIT_HUSK)) //can't revive return FALSE - if((world.time - timeofdeath) > DEFIB_TIME_LIMIT) //too late - return FALSE + if(!reagents.has_reagent(/datum/reagent/gas/healium)) + if((world.time - timeofdeath) > DEFIB_TIME_LIMIT) //too late + return FALSE if((getBruteLoss() >= MAX_REVIVE_BRUTE_DAMAGE) || (getFireLoss() >= MAX_REVIVE_FIRE_DAMAGE) || !can_be_revived()) //too damaged return FALSE if(!getorgan(/obj/item/organ/heart)) //what are we even shocking diff --git a/code/modules/reagents/chemistry/reagents/gas_reagents.dm b/code/modules/reagents/chemistry/reagents/gas_reagents.dm index 2bd85d45d505..17c093753a2c 100644 --- a/code/modules/reagents/chemistry/reagents/gas_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/gas_reagents.dm @@ -255,11 +255,18 @@ organs.applyOrganDamage(-20) if(organs.organ_flags & ORGAN_FAILING) organs.organ_flags &= ~ORGAN_FAILING - if(L.stat == DEAD) + if(L.stat == DEAD) //Healium kicks harder if the body is dead if(L.getBruteLoss() >= MAX_REVIVE_BRUTE_DAMAGE) L.adjustBruteLoss(-(L.getBruteLoss() - MAX_REVIVE_FIRE_DAMAGE + 50)) if(L.getFireLoss() >= MAX_REVIVE_FIRE_DAMAGE) L.adjustFireLoss(-(L.getFireLoss() - MAX_REVIVE_FIRE_DAMAGE + 50)) + if(L.health <= HEALTH_THRESHOLD_DEAD) + if(L.getOxyLoss()) + L.adjustOxyLoss(-50) + if(L.getToxLoss()) + L.adjustToxLoss(-50) + if(L.getCloneLoss()) + L.adjustCloneLoss(-50) ADD_TRAIT(L, TRAIT_PRESERVED_ORGANS, "healium") /datum/reagent/gas/healium/on_mob_delete(mob/living/carbon/L)