Stethoscopes now require hearing instead of vision to use (#58169)

This commit is contained in:
Ryll Ryll
2021-04-06 05:33:26 -07:00
committed by GitHub
parent 4d650df07e
commit 87d794b820
2 changed files with 31 additions and 29 deletions
+7 -8
View File
@@ -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))
+24 -21
View File
@@ -55,31 +55,34 @@
user.visible_message("<span class='suicide'>[user] puts \the [src] to [user.p_their()] chest! It looks like [user.p_they()] won't hear much!</span>")
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 = "<span class='danger'>no</span>"
var/lung_strength = "<span class='danger'>no</span>"
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 = "<span class='danger'>no</span>"
var/lung_strength = "<span class='danger'>no</span>"
if(!(M.stat == DEAD || (HAS_TRAIT(M, TRAIT_FAKEDEATH))))
if(heart && istype(heart))
heart_strength = "<span class='danger'>an unstable</span>"
if(heart.beating)
heart_strength = "a healthy"
if(lungs && istype(lungs))
lung_strength = "<span class='danger'>strained</span>"
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("<span class='notice'>[user] places [src] against [M]'s [body_part] and listens attentively.</span>", "<span class='notice'>You place [src] against [M]'s [body_part]. [diagnosis]</span>")
return
return ..(M,user)
if(carbon_patient.stat != DEAD && !(HAS_TRAIT(carbon_patient, TRAIT_FAKEDEATH)))
if(istype(heart))
heart_strength = (heart.beating ? "a healthy" : "<span class='danger'>an unstable</span>")
if(istype(lungs))
lung_strength = ((carbon_patient.failed_last_breath || carbon_patient.losebreath) ? "<span class='danger'>strained</span>" : "healthy")
user.visible_message("<span class='notice'>[user] places [src] against [carbon_patient]'s [body_part] and listens attentively.</span>", 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, "<span class='notice'>You place [src] against [carbon_patient]'s [body_part]. [diagnosis].</span>")
///////////
//SCARVES//