From fcc679385cdc222e961938244864469dbc48993d Mon Sep 17 00:00:00 2001 From: Zuhayr Date: Tue, 1 Jul 2014 02:46:16 +0930 Subject: [PATCH] Fixes #5387 --- code/modules/mob/living/carbon/human/say.dm | 65 +++++++++++---------- 1 file changed, 33 insertions(+), 32 deletions(-) diff --git a/code/modules/mob/living/carbon/human/say.dm b/code/modules/mob/living/carbon/human/say.dm index 462e4e015c..3c2ed51c07 100644 --- a/code/modules/mob/living/carbon/human/say.dm +++ b/code/modules/mob/living/carbon/human/say.dm @@ -14,7 +14,9 @@ if(stat == 2) return say_dead(message) - if (istype(wear_mask, /obj/item/clothing/mask/muzzle)) //Todo: Add this to speech_problem_flag checks. + var/message_mode = parse_message_mode(message, "headset") + + if (istype(wear_mask, /obj/item/clothing/mask/muzzle) && message_mode != "changeling") //Todo: Add this to speech_problem_flag checks. return if(copytext(message,1,2) == "*") @@ -22,22 +24,21 @@ if(name != GetVoice()) alt_name = "(as [get_id_name("Unknown")])" - + //parse the radio code and consume it - var/message_mode = parse_message_mode(message, "headset") if (message_mode) if (message_mode == "headset") message = copytext(message,2) //it would be really nice if the parse procs could do this for us. else message = copytext(message,3) - + //parse the language code and consume it var/datum/language/speaking = parse_language(message) if (speaking) verb = speaking.speech_verb message = copytext(message,3) - - message = capitalize(trim(message)) + + message = capitalize(trim(message)) if(speech_problem_flag) var/list/handle_r = handle_speech_problems(message) @@ -121,13 +122,13 @@ else if(r_ear && istype(r_ear,/obj/item/device/radio)) r_ear.talk_into(src,message, message_mode, verb, speaking) used_radios += r_ear - + var/sound/speech_sound var/sound_vol if((species.name == "Vox" || species.name == "Vox Armalis") && prob(20)) speech_sound = sound('sound/voice/shriek1.ogg') sound_vol = 50 - + ..(message, speaking, verb, alt_name, italics, message_range, used_radios, speech_sound, sound_vol) //ohgod we should really be passing a datum here. /mob/living/carbon/human/say_understands(var/mob/other,var/datum/language/speaking = null) @@ -146,7 +147,7 @@ return 1 if (istype(other, /mob/living/carbon/slime)) return 1 - + //This is already covered by mob/say_understands() //if (istype(other, /mob/living/simple_animal)) // if((other.universal_speak && !speaking) || src.universal_speak || src.universal_understand) @@ -180,29 +181,29 @@ /mob/living/carbon/human/proc/GetSpecialVoice() return special_voice - -/* - ***Deprecated*** - let this be handled at the hear_say or hear_radio proc - This is left in for robot speaking when humans gain binary channel access until I get around to rewriting - robot_talk() proc. - There is no language handling build into it however there is at the /mob level so we accept the call - for it but just ignore it. -*/ - -/mob/living/carbon/human/say_quote(var/message, var/datum/language/speaking = null) - var/verb = "says" - var/ending = copytext(message, length(message)) - if(ending=="!") - verb=pick("exclaims","shouts","yells") - else if(ending=="?") - verb="asks" - - return verb - - - - + +/* + ***Deprecated*** + let this be handled at the hear_say or hear_radio proc + This is left in for robot speaking when humans gain binary channel access until I get around to rewriting + robot_talk() proc. + There is no language handling build into it however there is at the /mob level so we accept the call + for it but just ignore it. +*/ + +/mob/living/carbon/human/say_quote(var/message, var/datum/language/speaking = null) + var/verb = "says" + var/ending = copytext(message, length(message)) + if(ending=="!") + verb=pick("exclaims","shouts","yells") + else if(ending=="?") + verb="asks" + + return verb + + + + /mob/living/carbon/human/proc/handle_speech_problems(var/message) var/list/returns[3] var/verb = "says"