From 87d794b8206055593f508ddda6868749e596a4dc Mon Sep 17 00:00:00 2001 From: Ryll Ryll <3589655+Ryll-Ryll@users.noreply.github.com> Date: Tue, 6 Apr 2021 08:33:26 -0400 Subject: [PATCH] Stethoscopes now require hearing instead of vision to use (#58169) --- code/modules/clothing/clothing.dm | 15 +++++----- code/modules/clothing/neck/_neck.dm | 45 +++++++++++++++-------------- 2 files changed, 31 insertions(+), 29 deletions(-) diff --git a/code/modules/clothing/clothing.dm b/code/modules/clothing/clothing.dm index 9ab21114acd..e9a891e17b8 100644 --- a/code/modules/clothing/clothing.dm +++ b/code/modules/clothing/clothing.dm @@ -122,15 +122,14 @@ else qdel(src) -/obj/item/clothing/attack(mob/attacker, mob/living/user, params) - if(!user.combat_mode && ismoth(attacker)) - if (isnull(moth_snack)) - moth_snack = new - moth_snack.name = name - moth_snack.clothing = WEAKREF(src) - moth_snack.attack(attacker, user, params) - else +/obj/item/clothing/attack(mob/living/M, mob/living/user, params) + if(user.combat_mode || !ismoth(M)) return ..() + if(isnull(moth_snack)) + moth_snack = new + moth_snack.name = name + moth_snack.clothing = WEAKREF(src) + moth_snack.attack(M, user, params) /obj/item/clothing/attackby(obj/item/W, mob/user, params) if(!istype(W, repairable_by)) diff --git a/code/modules/clothing/neck/_neck.dm b/code/modules/clothing/neck/_neck.dm index 95b011deb04..6f82c5c9ce7 100644 --- a/code/modules/clothing/neck/_neck.dm +++ b/code/modules/clothing/neck/_neck.dm @@ -55,31 +55,34 @@ user.visible_message("[user] puts \the [src] to [user.p_their()] chest! It looks like [user.p_they()] won't hear much!") return OXYLOSS -/obj/item/clothing/neck/stethoscope/attack(mob/living/carbon/human/M, mob/living/user) - if(ishuman(M) && isliving(user)) - if(!user.combat_mode) - var/body_part = parse_zone(user.zone_selected) +/obj/item/clothing/neck/stethoscope/attack(mob/living/M, mob/living/user) + if(!ishuman(M) || !isliving(user)) + return ..() + if(user.combat_mode) + return - var/heart_strength = "no" - var/lung_strength = "no" + var/mob/living/carbon/carbon_patient = M + var/body_part = parse_zone(user.zone_selected) - var/obj/item/organ/heart/heart = M.getorganslot(ORGAN_SLOT_HEART) - var/obj/item/organ/lungs/lungs = M.getorganslot(ORGAN_SLOT_LUNGS) + var/heart_strength = "no" + var/lung_strength = "no" - if(!(M.stat == DEAD || (HAS_TRAIT(M, TRAIT_FAKEDEATH)))) - if(heart && istype(heart)) - heart_strength = "an unstable" - if(heart.beating) - heart_strength = "a healthy" - if(lungs && istype(lungs)) - lung_strength = "strained" - if(!(M.failed_last_breath || M.losebreath)) - lung_strength = "healthy" + var/obj/item/organ/heart/heart = carbon_patient.getorganslot(ORGAN_SLOT_HEART) + var/obj/item/organ/lungs/lungs = carbon_patient.getorganslot(ORGAN_SLOT_LUNGS) - var/diagnosis = (body_part == BODY_ZONE_CHEST ? "You hear [heart_strength] pulse and [lung_strength] respiration." : "You faintly hear [heart_strength] pulse.") - user.visible_message("[user] places [src] against [M]'s [body_part] and listens attentively.", "You place [src] against [M]'s [body_part]. [diagnosis]") - return - return ..(M,user) + if(carbon_patient.stat != DEAD && !(HAS_TRAIT(carbon_patient, TRAIT_FAKEDEATH))) + if(istype(heart)) + heart_strength = (heart.beating ? "a healthy" : "an unstable") + if(istype(lungs)) + lung_strength = ((carbon_patient.failed_last_breath || carbon_patient.losebreath) ? "strained" : "healthy") + + user.visible_message("[user] places [src] against [carbon_patient]'s [body_part] and listens attentively.", ignored_mobs = user) + + var/diagnosis = (body_part == BODY_ZONE_CHEST ? "You hear [heart_strength] pulse and [lung_strength] respiration" : "You faintly hear [heart_strength] pulse") + if(!user.can_hear()) + diagnosis = "Fat load of good it does you though, since you can't hear" + + to_chat(user, "You place [src] against [carbon_patient]'s [body_part]. [diagnosis].") /////////// //SCARVES//