diff --git a/code/modules/mob/living/say.dm b/code/modules/mob/living/say.dm index c56f13bfa3a..385f48c8d9e 100644 --- a/code/modules/mob/living/say.dm +++ b/code/modules/mob/living/say.dm @@ -72,7 +72,7 @@ GLOBAL_LIST_INIT(department_radio_keys, list( /mob/living/say(message, bubble_type,var/list/spans = list(), sanitize = TRUE, datum/language/language = null, ignore_spam = FALSE) var/static/list/crit_allowed_modes = list(MODE_WHISPER = TRUE, MODE_CHANGELING = TRUE, MODE_ALIEN = TRUE) var/static/list/unconscious_allowed_modes = list(MODE_CHANGELING = TRUE, MODE_ALIEN = TRUE) - var/key = get_key(message) + var/talk_key = get_key(message) var/static/list/one_character_prefix = list(MODE_HEADSET = TRUE, MODE_ROBOT = TRUE, MODE_WHISPER = TRUE) @@ -134,12 +134,10 @@ GLOBAL_LIST_INIT(department_radio_keys, list( // Detection of language needs to be before inherent channels, because // AIs use inherent channels for the holopad. Most inherent channels // ignore the language argument however. - - var/datum/saymode/SM = SSradio.saymodes[key] - if(key && SM) - if(!SM.handle_message(src, message, language)) - return - + + var/datum/saymode/SM = SSradio.saymodes[talk_key] + if(SM && !SM.handle_message(src, message, language)) + return if(!can_speak_vocal(message)) to_chat(src, "You find yourself unable to speak!")