Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

healium tweaks p3 #22843

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions code/datums/components/rot.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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))
warface1234455 marked this conversation as resolved.
Show resolved Hide resolved
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))
Expand Down
2 changes: 1 addition & 1 deletion code/game/data_huds.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
5 changes: 3 additions & 2 deletions code/modules/mob/living/carbon/carbon.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 8 additions & 1 deletion code/modules/reagents/chemistry/reagents/gas_reagents.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
Loading