Fix whispering & AI eye runtime

This commit is contained in:
tigercat2000
2018-11-26 11:39:47 -08:00
parent e56750481c
commit dd248fe618
3 changed files with 5 additions and 15 deletions
@@ -1,13 +0,0 @@
//Lallander was here
/mob/living/carbon/human/whisper(message as text)
message = trim_strip_html_properly(message) //bit of duplicate code, acceptable because the workaround would be annoying
//parse the language code and consume it
var/list/message_pieces = parse_languages(message)
if(istype(message_pieces, /datum/multilingual_say_piece)) // Little quirk to just easily deal with HIVEMIND languages
var/datum/multilingual_say_piece/S = message_pieces // Yay BYOND's hilarious typecasting
S.speaking.broadcast(src, S.message)
return 1
message = trim_left(message)
whisper_say(message, message_pieces)
@@ -143,4 +143,8 @@
/mob/camera/aiEye/hear_say(list/message_pieces, var/verb = "says", var/italics = 0, var/mob/speaker = null, var/sound/speech_sound, var/sound_vol)
if(relay_speech)
ai.relay_speech(speaker, message_pieces, verb)
if(istype(ai))
ai.relay_speech(speaker, message_pieces, verb)
else
var/mob/M = ai
M.hear_say(message_pieces, verb, italics, speaker, speech_sound, sound_vol)