Stethoscope Examine Quality of Life (#13856)

This commit is contained in:
VisVirific
2022-05-22 19:12:43 +02:00
committed by GitHub
parent 9a940adfa1
commit c0afca460f
4 changed files with 82 additions and 10 deletions
@@ -14,6 +14,27 @@
skipitems |= C.flags_inv
return skipitems
/mob/living/carbon/human/proc/examine_pulse(mob/user)
if(user.stat || user.incapacitated() || !ishuman(user))
return
var/mob/living/carbon/human/H = user
if(H.has_stethoscope_active())
var/obj/item/organ/organ = src.get_organ(user.zone_sel.selecting)
if(organ)
user.visible_message("<b>[user]</b> checks [src] with a stethoscope.", "You check [src] with the stethoscope on your person.")
to_chat(user, SPAN_NOTICE("You place the stethoscope against [src]'s [organ.name]. You hear <b>[english_list(organ.listen())]</b>."))
else
to_chat(user, SPAN_WARNING("[src] is missing that limb!"))
else if(src.stat && !(src.species.flags & NO_BLOOD))
user.visible_message("<b>[user]</b> checks [src]'s pulse.", "You check [src]'s pulse.")
if(do_mob(user, src, 15))
if(pulse() == PULSE_NONE || (status_flags & FAKEDEATH))
to_chat(user, "<span class='deadsay'>[get_pronoun("He")] [get_pronoun("has")] no pulse.</span>")
else
to_chat(user, "<span class='deadsay'>[get_pronoun("He")] [get_pronoun("has")] a pulse!</span>")
/mob/living/carbon/human/examine(mob/user)
var/skipbody = get_covered_body_parts()
var/skipbody_thick = get_covered_body_parts(TRUE)
@@ -223,18 +244,11 @@
var/distance = get_dist(user,src)
if(istype(user, /mob/abstract/observer) || user.stat == 2) // ghosts can see anything
distance = 1
if (src.stat && !(src.species.flags & NO_BLOOD)) // No point checking pulse of a species that doesn't have one.
if(src.stat && !(src.species.flags & NO_BLOOD)) // No point checking pulse of a species that doesn't have one.
msg += "<span class='warning'>[get_pronoun("He")] [get_pronoun("is")]n't responding to anything around [get_pronoun("him")] and seems to be unconscious.</span>\n"
if((stat == DEAD || is_asystole() || src.losebreath) && distance <= 3 || (status_flags & FAKEDEATH))
msg += "<span class='warning'>[get_pronoun("He")] [get_pronoun("does")] not appear to be breathing.</span>\n"
if(istype(user, /mob/living/carbon/human) && !user.stat && Adjacent(user))
spawn (0)
user.visible_message("<b>[user]</b> checks [src]'s pulse.", "You check [src]'s pulse.")
if (do_mob(user, src, 15))
if(pulse() == PULSE_NONE || (status_flags & FAKEDEATH))
to_chat(user, "<span class='deadsay'>[get_pronoun("He")] [get_pronoun("has")] no pulse.</span>")
else
to_chat(user, "<span class='deadsay'>[get_pronoun("He")] [get_pronoun("has")] a pulse!</span>")
else if (src.stat)
msg += SPAN_WARNING("[get_pronoun("He")] [get_pronoun("is")] not responding to anything around [get_pronoun("him")].\n")
@@ -389,6 +403,8 @@
msg += "\n[get_pronoun("He")] [pose]"
to_chat(user, msg.Join())
if(Adjacent(user))
INVOKE_ASYNC(src, .proc/examine_pulse, user)
//Helper procedure. Called by /mob/living/carbon/human/examine() and /mob/living/carbon/human/Topic() to determine HUD access to security and medical records.
/proc/hasHUD(mob/M, hudtype)
@@ -220,6 +220,21 @@
return TRUE
return FALSE
/mob/living/carbon/human/proc/has_stethoscope_active()
var/obj/item/clothing/under/uniform = w_uniform
var/obj/item/clothing/suit/suit = wear_suit
if(suit)
var/obj/item/clothing/accessory/stethoscope/stet = locate() in suit.accessories
if(stet)
if(stet.auto_examine)
return TRUE
if(uniform)
var/obj/item/clothing/accessory/stethoscope/stet = locate() in uniform.accessories
if(stet)
if(stet.auto_examine)
return TRUE
return FALSE
/mob/living/carbon/human/proc/is_submerged()
if(lying && istype(loc, /turf/simulated/floor/beach/water)) // replace this when we port fluids
return TRUE