From 9a560d96a134d2d67125808b2bfceb996e8c238a Mon Sep 17 00:00:00 2001 From: Heroman Date: Tue, 2 Mar 2021 03:58:59 +1000 Subject: [PATCH] Adds a sanity check for speech sound logic --- code/modules/mob/living/carbon/human/say.dm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm index 80aafb73d8a..5dea2482c63 100644 --- a/code/modules/mob/living/carbon/human/say.dm +++ b/code/modules/mob/living/carbon/human/say.dm @@ -184,7 +184,7 @@ /mob/living/carbon/human/handle_speech_sound() var/list/returns[2] - if(species.speech_sounds && prob(species.speech_chance)) + if(species.speech_sounds && species.speech_sounds.len && prob(species.speech_chance)) //VOREStation Edit: Sanity Check returns[1] = sound(pick(species.speech_sounds)) returns[2] = 50 return returns