mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 12:41:09 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user