Lung damage makes you cough (#49014)

* Update lungs.dm

* Update tgstation.dme

* brain

* onprocess not onspawn oops

* Update tgstation.dme

* please

* Update lungs.dm

* hopefully less shitcode

* thx bro
This commit is contained in:
wesoda25
2020-02-04 16:07:59 -05:00
committed by GitHub
parent ed9aca6f62
commit 8847c5eb4f
+12 -8
View File
@@ -11,8 +11,10 @@
healing_factor = STANDARD_ORGAN_HEALING
decay_factor = STANDARD_ORGAN_DECAY
low_threshold_passed = "<span class='warning'>You feel short of breath.</span>"
high_threshold_passed = "<span class='warning'>You feel some sort of constriction around your chest as your breathing becomes shallow and rapid.</span>"
now_fixed = "<span class='warning'>Your lungs seem to once again be able to hold air.</span>"
low_threshold_cleared = "<span class='info'>You can breathe normally again.</span>"
high_threshold_cleared = "<span class='info'>The constriction around your chest loosens as your breathing calms down.</span>"
@@ -395,15 +397,17 @@
breath.temperature = H.bodytemperature
/obj/item/organ/lungs/on_life()
..()
if((!failed) && ((organ_flags & ORGAN_FAILING)))
if(owner.stat == CONSCIOUS)
owner.visible_message("<span class='danger'>[owner] grabs [owner.p_their()] throat, struggling for breath!</span>", \
"<span class='userdanger'>You suddenly feel like you can't breathe!</span>")
failed = TRUE
else if(!(organ_flags & ORGAN_FAILING))
. = ..()
if(failed && !(organ_flags & ORGAN_FAILING))
failed = FALSE
return
return
if(damage >= low_threshold)
var/do_i_cough = damage < high_threshold ? prob(5) : prob(10) // between : past high
if(do_i_cough)
owner.emote("cough")
if(organ_flags & ORGAN_FAILING && owner.stat == CONSCIOUS)
owner.visible_message("<span class='danger'>[owner] grabs [owner.p_their()] throat, struggling for breath!</span>", "<span class='userdanger'>You suddenly feel like you can't breathe!</span>")
failed = TRUE
/obj/item/organ/lungs/plasmaman