Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit b3bc576

Browse files
t
1 parent d04c9f6 commit b3bc576

File tree

3 files changed

+22
-3
lines changed

3 files changed

+22
-3
lines changed

code/modules/atmospherics/machinery/components/unary_devices/cryo.dm

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,17 @@
321321
gas_reagent.reaction_mob(mob_occupant, VAPOR|BREATH, 2, permeability = 1)
322322
air1.adjust_moles(gas_id, -0.1 / efficiency)
323323
qdel(gas_reagent)
324+
if(C && C.stat == DEAD && C.reagents.has_reagent(/datum/reagent/gas/healium)) // attempts to cycle healium in the body to a reviable state
325+
if(!C.can_defib(FALSE))
326+
C.reagents.del_reagent(/datum/reagent/gas/healium)
327+
else
328+
set_on(FALSE)
329+
playsound(src, 'sound/machines/cryo_warning.ogg', volume) // Bug the doctors.
330+
var/msg = "Dead body has been patched up to a reviable state."
331+
if(autoeject) // Eject if configured.
332+
msg += " Auto ejecting body now."
333+
open_machine()
334+
radio.talk_into(src, msg, radio_channel)
324335

325336
return TRUE
326337

code/modules/mob/living/carbon/carbon.dm

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -874,8 +874,9 @@
874874
/mob/living/carbon/proc/can_defib(careAboutGhost = TRUE) //yogs start
875875
if(suiciding || hellbound || HAS_TRAIT(src, TRAIT_HUSK)) //can't revive
876876
return FALSE
877-
if((world.time - timeofdeath) > DEFIB_TIME_LIMIT) //too late
878-
return FALSE
877+
if(!reagents.has_reagent(/datum/reagent/gas/healium))
878+
if((world.time - timeofdeath) > DEFIB_TIME_LIMIT) //too late
879+
return FALSE
879880
if((getBruteLoss() >= MAX_REVIVE_BRUTE_DAMAGE) || (getFireLoss() >= MAX_REVIVE_FIRE_DAMAGE) || !can_be_revived()) //too damaged
880881
return FALSE
881882
if(!getorgan(/obj/item/organ/heart)) //what are we even shocking

code/modules/reagents/chemistry/reagents/gas_reagents.dm

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,11 +255,18 @@
255255
organs.applyOrganDamage(-20)
256256
if(organs.organ_flags & ORGAN_FAILING)
257257
organs.organ_flags &= ~ORGAN_FAILING
258-
if(L.stat == DEAD)
258+
if(L.stat == DEAD) //Healium kicks harder if the body is dead
259259
if(L.getBruteLoss() >= MAX_REVIVE_BRUTE_DAMAGE)
260260
L.adjustBruteLoss(-(L.getBruteLoss() - MAX_REVIVE_FIRE_DAMAGE + 50))
261261
if(L.getFireLoss() >= MAX_REVIVE_FIRE_DAMAGE)
262262
L.adjustFireLoss(-(L.getFireLoss() - MAX_REVIVE_FIRE_DAMAGE + 50))
263+
if(health <= HEALTH_THRESHOLD_DEAD)
264+
if(L.getOxyLoss())
265+
L.adjustOxyLoss(-50)
266+
if(L.getToxLoss())
267+
L.adjustToxLoss(-50)
268+
if(L.getCloneLoss())
269+
L.adjustCloneLoss(-50)
263270
ADD_TRAIT(L, TRAIT_PRESERVED_ORGANS, "healium")
264271

265272
/datum/reagent/gas/healium/on_mob_delete(mob/living/carbon/L)

0 commit comments

Comments
 (0)