Merge pull request #33297 from tgstation/Cyberboss-patch-2

Fixes say logging
This commit is contained in:
oranges
2017-12-07 11:19:46 +13:00
committed by GitHub
+5 -7
View File
@@ -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, "<span class='warning'>You find yourself unable to speak!</span>")