fixes a runtime caused by a custom emote and makes IsVocal() false for people with the mute trait (#18271)

* why are they silent

* bam fixed

* oops remove those testing things
This commit is contained in:
Contrabang
2022-07-08 09:59:41 -07:00
committed by GitHub
parent d35824402e
commit a09c0e5bd0
2 changed files with 3 additions and 1 deletions
@@ -97,6 +97,8 @@
// how do species that don't breathe talk? magic, that's what.
var/breathes = (!HAS_TRAIT(src, TRAIT_NOBREATH))
var/obj/item/organ/internal/L = get_organ_slot("lungs")
if(HAS_TRAIT(src, TRAIT_MUTE))
return FALSE
if((breathes && !L) || breathes && L && (L.status & ORGAN_DEAD))
return FALSE
if(getOxyLoss() > 10 || AmountLoseBreath() >= 8 SECONDS)