From b3bc576dd363bf9794c39636bb68f6ac56d6d446 Mon Sep 17 00:00:00 2001 From: Bop Date: Wed, 11 Dec 2024 04:42:20 +0700 Subject: [PATCH 1/6] t --- .../machinery/components/unary_devices/cryo.dm | 11 +++++++++++ code/modules/mob/living/carbon/carbon.dm | 5 +++-- .../reagents/chemistry/reagents/gas_reagents.dm | 9 ++++++++- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm index 322078d72f52..fbc897daabe6 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 reviable 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..9e030fe86303 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(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) From 89c39e3c636468cb3b6af58219b456b5c28f584f Mon Sep 17 00:00:00 2001 From: Bop Date: Wed, 11 Dec 2024 04:42:33 +0700 Subject: [PATCH 2/6] yu --- code/modules/reagents/chemistry/reagents/gas_reagents.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/reagents/chemistry/reagents/gas_reagents.dm b/code/modules/reagents/chemistry/reagents/gas_reagents.dm index 9e030fe86303..17c093753a2c 100644 --- a/code/modules/reagents/chemistry/reagents/gas_reagents.dm +++ b/code/modules/reagents/chemistry/reagents/gas_reagents.dm @@ -260,7 +260,7 @@ 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(health <= HEALTH_THRESHOLD_DEAD) + if(L.health <= HEALTH_THRESHOLD_DEAD) if(L.getOxyLoss()) L.adjustOxyLoss(-50) if(L.getToxLoss()) From 83176e3d23ed54a9562183b938ec3d28daab5642 Mon Sep 17 00:00:00 2001 From: Bop Date: Sat, 14 Dec 2024 18:00:08 +0700 Subject: [PATCH 3/6] Oops --- .../atmospherics/machinery/components/unary_devices/cryo.dm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm index fbc897daabe6..cd100d94a567 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm @@ -1,4 +1,4 @@ -///Max temperature allowed inside the cryotube, should break before reaching this heat +8///Max temperature allowed inside the cryotube, should break before reaching this heat #define MAX_TEMPERATURE 4000 /// This is a visual helper that shows the occupant inside the cryo cell. @@ -327,7 +327,7 @@ 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 reviable state." + var/msg = "Dead body has been patched up to a revivable state." if(autoeject) // Eject if configured. msg += " Auto ejecting body now." open_machine() From 87760bba088bd65b7e26c435522610a01c22fb8d Mon Sep 17 00:00:00 2001 From: Bop Date: Sat, 14 Dec 2024 18:07:36 +0700 Subject: [PATCH 4/6] da hell --- .../atmospherics/machinery/components/unary_devices/cryo.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm index cd100d94a567..0ed1c7e2c99a 100644 --- a/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm +++ b/code/modules/atmospherics/machinery/components/unary_devices/cryo.dm @@ -1,4 +1,4 @@ -8///Max temperature allowed inside the cryotube, should break before reaching this heat +///Max temperature allowed inside the cryotube, should break before reaching this heat #define MAX_TEMPERATURE 4000 /// This is a visual helper that shows the occupant inside the cryo cell. From 7b0d347f71a2c727e6113253ff16db01f30bff3e Mon Sep 17 00:00:00 2001 From: Bop Date: Sun, 15 Dec 2024 04:14:43 +0700 Subject: [PATCH 5/6] unga --- code/datums/components/rot.dm | 5 +++-- code/game/data_huds.dm | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/code/datums/components/rot.dm b/code/datums/components/rot.dm index b37c6773f3f2..daeb15f0ce2b 100644 --- a/code/datums/components/rot.dm +++ b/code/datums/components/rot.dm @@ -54,8 +54,9 @@ return // Wait a bit before decaying - if(world.time - C.timeofdeath < 2 MINUTES) - return + if(!C.reagents.has_reagent(/datum/reagent/gas/healium)) + if(world.time - C.timeofdeath < 2 MINUTES) + return // Properly stored corpses shouldn't create miasma if(istype(C.loc, /obj/structure/closet/crate/coffin)|| istype(C.loc, /obj/structure/closet/body_bag) || istype(C.loc, /obj/structure/bodycontainer)) 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" From f0d6cd37a0f917dec8f8fdd819383ef096aa6810 Mon Sep 17 00:00:00 2001 From: Bop Date: Mon, 16 Dec 2024 01:47:40 +0700 Subject: [PATCH 6/6] oops --- code/datums/components/rot.dm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/code/datums/components/rot.dm b/code/datums/components/rot.dm index daeb15f0ce2b..38fadfecd05b 100644 --- a/code/datums/components/rot.dm +++ b/code/datums/components/rot.dm @@ -54,9 +54,8 @@ return // Wait a bit before decaying - if(!C.reagents.has_reagent(/datum/reagent/gas/healium)) - if(world.time - C.timeofdeath < 2 MINUTES) - return + if(world.time - C.timeofdeath < 2 MINUTES) + return // Properly stored corpses shouldn't create miasma if(istype(C.loc, /obj/structure/closet/crate/coffin)|| istype(C.loc, /obj/structure/closet/body_bag) || istype(C.loc, /obj/structure/bodycontainer)) @@ -70,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