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 17:59:41 +01:00
committed by GitHub
parent d35824402e
commit a09c0e5bd0
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -186,7 +186,7 @@ structure_check() searches for nearby cultist structures required for the invoca
ghost_invokers++
if(invocation)
if(!L.IsVocal())
L.emote("gestures ominously.")
L.custom_emote(EMOTE_VISIBLE, message = pick("draws arcane sigils in the air.","gestures ominously.","silently mouths out an invocation.","places their hands on the rune, activating it."))
else
L.say(invocation)
L.changeNext_move(CLICK_CD_MELEE)//THIS IS WHY WE CAN'T HAVE NICE THINGS
@@ -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)