From a09c0e5bd0c8afaab47fa03967ccb58716777bd7 Mon Sep 17 00:00:00 2001 From: Contrabang <91113370+Contrabang@users.noreply.github.com> Date: Fri, 8 Jul 2022 09:59:41 -0700 Subject: [PATCH] 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 --- code/game/gamemodes/cult/runes.dm | 2 +- code/modules/mob/living/carbon/human/say.dm | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/code/game/gamemodes/cult/runes.dm b/code/game/gamemodes/cult/runes.dm index 0b82c1fb1d5..e34425862df 100644 --- a/code/game/gamemodes/cult/runes.dm +++ b/code/game/gamemodes/cult/runes.dm @@ -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 diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm index 42e1126cbd9..2ae2227561f 100644 --- a/code/modules/mob/living/carbon/human/say.dm +++ b/code/modules/mob/living/carbon/human/say.dm @@ -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)