diff --git a/code/modules/clothing/under/accessories/accessory.dm b/code/modules/clothing/under/accessories/accessory.dm index f9dfa209553..62ae3a73de1 100644 --- a/code/modules/clothing/under/accessories/accessory.dm +++ b/code/modules/clothing/under/accessories/accessory.dm @@ -168,54 +168,13 @@ icon_state = "stethoscope" flippable = 1 -/obj/item/clothing/accessory/stethoscope/attack(mob/living/carbon/human/M, mob/living/user, var/target_zone) +/obj/item/clothing/accessory/stethoscope/attack(mob/living/carbon/human/M, mob/living/user) if(ishuman(M) && isliving(user)) if(user.a_intent == I_HELP) - var/body_part = parse_zone(target_zone) - if(body_part) - var/their = "their" - switch(M.gender) - if(MALE) their = "his" - if(FEMALE) their = "her" - - var/sound = "heartbeat" - var/sound_strength = "cannot hear" - var/heartbeat = 0 - if(M.species && M.species.has_organ[BP_HEART]) - var/obj/item/organ/internal/heart/heart = M.internal_organs_by_name[BP_HEART] - if(heart && !heart.robotic) - heartbeat = 1 - if(M.stat == DEAD || (M.status_flags&FAKEDEATH)) - sound_strength = "cannot hear" - sound = "anything" - else - switch(body_part) - if(BP_CHEST) - sound_strength = "hear" - sound = "no heartbeat" - if(heartbeat) - var/obj/item/organ/internal/heart/heart = M.internal_organs_by_name[BP_HEART] - if(heart.is_bruised() || M.getOxyLoss() > 50) - sound = "[pick("odd noises in","weak")] heartbeat" - else - sound = "healthy heartbeat" - - var/obj/item/organ/internal/heart/L = M.internal_organs_by_name[BP_LUNGS] - if(!L || M.losebreath) - sound += " and no respiration" - else if(M.is_lung_ruptured() || M.getOxyLoss() > 50) - sound += " and [pick("wheezing","gurgling")] sounds" - else - sound += " and healthy respiration" - if(BP_EYES,"mouth") - sound_strength = "cannot hear" - sound = "anything" - else - if(heartbeat) - sound_strength = "hear a weak" - sound = "pulse" - - user.visible_message("[user] places [src] against [M]'s [body_part] and listens attentively.", "You place [src] against [their] [body_part]. You [sound_strength] [sound].") + var/obj/item/organ/organ = M.get_organ(user.zone_sel.selecting) + if(organ) + user.visible_message(span("notice", "[user] places [src] against [M]'s [organ.name] and listens attentively."), + "You place [src] against [M]'s [organ.name]. You hear [english_list(organ.listen())].") return return ..(M,user) diff --git a/code/modules/organs/internal/heart.dm b/code/modules/organs/internal/heart.dm index 4811d068d5a..0fc22b89e1f 100644 --- a/code/modules/organs/internal/heart.dm +++ b/code/modules/organs/internal/heart.dm @@ -191,4 +191,30 @@ if(!is_usable()) return FALSE - return pulse > PULSE_NONE || BP_IS_ROBOTIC(src) || (owner.status_flags & FAKEDEATH) \ No newline at end of file + return pulse > PULSE_NONE || BP_IS_ROBOTIC(src) || (owner.status_flags & FAKEDEATH) + +/obj/item/organ/internal/heart/listen() + if(BP_IS_ROBOTIC(src) && is_working()) + if(is_bruised()) + return "sputtering pump" + else + return "steady whirr of the pump" + + if(!pulse || (owner.status_flags & FAKEDEATH)) + return "no pulse" + + var/pulsesound = "normal" + if(is_bruised()) + pulsesound = "irregular" + + switch(pulse) + if(PULSE_SLOW) + pulsesound = "slow" + if(PULSE_FAST) + pulsesound = "fast" + if(PULSE_2FAST) + pulsesound = "very fast" + if(PULSE_THREADY) + pulsesound = "extremely fast and faint" + + . = "[pulsesound] pulse" diff --git a/code/modules/organs/internal/lungs.dm b/code/modules/organs/internal/lungs.dm index ecc7f77646d..618d23988dd 100644 --- a/code/modules/organs/internal/lungs.dm +++ b/code/modules/organs/internal/lungs.dm @@ -42,7 +42,7 @@ if(!owner) return - + if(germ_level > INFECTION_LEVEL_ONE) if(prob(5)) owner.emote("cough") //Respiratory tract infection @@ -302,5 +302,31 @@ else if(breath.temperature <= owner.species.cold_discomfort_level) owner.species.get_environment_discomfort(src,"cold") +/obj/item/organ/internal/lungs/listen() + if(owner.failed_last_breath) + return "no respiration" + + if(BP_IS_ROBOTIC(src)) + if(is_bruised()) + return "malfunctioning fans" + else + return "air flowing" + + . = list() + if(is_bruised()) + . += "[pick("wheezing", "gurgling")] sounds" + + var/list/breathtype = list() + if(get_oxygen_deprivation() > 50) + breathtype += pick("straining","labored") + if(owner.shock_stage > 50) + breathtype += pick("shallow and rapid") + if(!breathtype.len) + breathtype += "healthy" + + . += "[english_list(breathtype)] breathing" + + return english_list(.) + #undef HUMAN_MAX_OXYLOSS -#undef HUMAN_CRIT_MAX_OXYLOSS \ No newline at end of file +#undef HUMAN_CRIT_MAX_OXYLOSS diff --git a/code/modules/organs/organ.dm b/code/modules/organs/organ.dm index a4444bea77c..0483fa619b8 100644 --- a/code/modules/organs/organ.dm +++ b/code/modules/organs/organ.dm @@ -419,3 +419,7 @@ user.put_in_active_hand(O) qdel(src) target.attackby(O, user) + +//used by stethoscope +/obj/item/organ/proc/listen() + return diff --git a/code/modules/organs/organ_external.dm b/code/modules/organs/organ_external.dm index 0773e4ef9d0..916dd78421b 100644 --- a/code/modules/organs/organ_external.dm +++ b/code/modules/organs/organ_external.dm @@ -1249,6 +1249,17 @@ Note that amputating the affected organ does in fact remove the infection from t flavor_text += "a ton of [wound]\s" return english_list(flavor_text) +/obj/item/organ/external/listen() + var/list/sounds = list() + for(var/obj/item/organ/internal/I in internal_organs) + var/gutsound = I.listen() + if(gutsound) + sounds += gutsound + if(!sounds.len) + if(owner.pulse()) + sounds += "faint pulse" + return sounds + /obj/item/organ/external/proc/sever_artery() if((status & ORGAN_ROBOT) || (status & ORGAN_ARTERY_CUT) || !species || species.flags & NO_BLOOD || species.flags & NO_ARTERIES) return FALSE diff --git a/html/changelogs/mattatlas-youhaveligma.yml b/html/changelogs/mattatlas-youhaveligma.yml new file mode 100644 index 00000000000..1e5dca54aee --- /dev/null +++ b/html/changelogs/mattatlas-youhaveligma.yml @@ -0,0 +1,41 @@ +################################ +# Example Changelog File +# +# Note: This file, and files beginning with ".", and files that don't end in ".yml" will not be read. If you change this file, you will look really dumb. +# +# Your changelog will be merged with a master changelog. (New stuff added only, and only on the date entry for the day it was merged.) +# When it is, any changes listed below will disappear. +# +# Valid Prefixes: +# bugfix +# wip (For works in progress) +# tweak +# soundadd +# sounddel +# rscadd (general adding of nice things) +# rscdel (general deleting of nice things) +# imageadd +# imagedel +# maptweak +# spellcheck (typo fixes) +# experiment +# balance +# admin +# backend +# security +# refactor +################################# + +# Your name. +author: MattAtlas + +# Optional: Remove this file after generating master changelog. Useful for PR changelogs that won't get used again. +delete-after: True + +# Any changes you've made. See valid prefix list above. +# INDENT WITH TWO SPACES. NOT TABS. SPACES. +# SCREW THIS UP AND IT WON'T WORK. +# Also, all entries are changed into a single [] after a master changelog generation. Just remove the brackets when you add new entries. +# Please surround your changes in double quotes ("), as certain characters otherwise screws up compiling. The quotes will not show up in the changelog. +changes: + - tweak: "Stethoscopes have been made more modular. They also give better hints now." \ No newline at end of file