Fixes losebreath typo (lung bug) (#7526)

This commit is contained in:
Matt Atlas
2019-11-28 18:36:54 +01:00
committed by Werner
parent 672a1b71ee
commit d07645c56b
6 changed files with 51 additions and 12 deletions

View File

@@ -94,7 +94,7 @@
var/mob/living/carbon/human/H = locate() in loc
if(istype(H))
if(H.lying)
icon_state = H.is_pulse_present() ? "[modify_state]-active" : "[modify_state]-idle"
icon_state = H.pulse() ? "[modify_state]-active" : "[modify_state]-idle"
victim = H
if(victim)
if(suppressing && victim.sleeping < 3)
@@ -120,7 +120,7 @@
if(ishuman(C))
var/mob/living/carbon/human/H = C
src.victim = H
icon_state = H.is_pulse_present() ? "[modify_state]-active" : "[modify_state]-idle"
icon_state = H.pulse() ? "[modify_state]-active" : "[modify_state]-idle"
else
icon_state = "[modify_state]-idle"

View File

@@ -225,7 +225,7 @@ BREATH ANALYZER
user.show_message("<span class='danger'><i>Warning: Blood Level CRITICAL: [blood_percent]% [blood_volume]cl.</i></span> <span class='notice'>Type: [blood_type]</span>")
else
user.show_message("<span class='notice'>Blood Level Normal: [blood_percent]% [blood_volume]cl. Type: [blood_type]</span>")
user.show_message("<span class='notice'>Subject's pulse: <font color='[H.is_pulse_present() == PULSE_THREADY || H.is_pulse_present() == PULSE_NONE ? "red" : "blue"]'>[H.get_pulse(GETPULSE_TOOL)] bpm.</font></span>")
user.show_message("<span class='notice'>Subject's pulse: <font color='[H.pulse() == PULSE_THREADY || H.pulse() == PULSE_NONE ? "red" : "blue"]'>[H.get_pulse(GETPULSE_TOOL)] bpm.</font></span>")
/obj/item/device/healthanalyzer/verb/toggle_mode()
set name = "Switch Verbosity"

View File

@@ -228,7 +228,7 @@
spawn (0)
user.visible_message("<b>[user]</b> checks [src]'s pulse.", "You check [src]'s pulse.")
if (do_mob(user, src, 15))
if(!is_pulse_present())
if(pulse() == PULSE_NONE)
to_chat(user, "<span class='deadsay'>[T.He] [T.has] no pulse[src.client ? "" : " and [T.his] soul has departed"]...</span>")
else
to_chat(user, "<span class='deadsay'>[T.He] [T.has] a pulse!</span>")

View File

@@ -1184,7 +1184,7 @@
usr.visible_message("<span class='notice'>[usr] begins counting their pulse.</span>",\
"You begin counting your pulse.")
if(is_pulse_present())
if(pulse())
to_chat(usr, "<span class='notice'>[self ? "You have a" : "[src] has a"] pulse! Counting...</span>")
else
to_chat(usr, "<span class='danger'>[src] has no pulse!</span>") //it is REALLY UNLIKELY that a dead person would check his own pulse)
@@ -1623,9 +1623,6 @@
else
return "0"
/mob/living/carbon/human/proc/is_pulse_present()
var/obj/item/organ/internal/heart/heart = internal_organs_by_name[BP_HEART]
if(heart)
return heart.pulse
else
return FALSE
/mob/living/carbon/human/proc/pulse()
var/obj/item/organ/internal/heart/H = internal_organs_by_name[BP_HEART]
return H ? H.pulse : PULSE_NONE

View File

@@ -27,7 +27,7 @@
owner.drip(10)
if(prob(4))
spawn owner.emote("me", 1, "gasps for air!")
owner.losebreath += 15
owner.losebreath = 1
if(is_bruised() && rescued)
if(prob(4))