From dd248fe61887ecca3d5bd6e0b51698394aeb8f7f Mon Sep 17 00:00:00 2001 From: tigercat2000 Date: Mon, 26 Nov 2018 11:39:47 -0800 Subject: [PATCH] Fix whispering & AI eye runtime --- code/modules/mob/living/carbon/human/whisper.dm | 13 ------------- code/modules/mob/living/silicon/ai/freelook/eye.dm | 6 +++++- paradise.dme | 1 - 3 files changed, 5 insertions(+), 15 deletions(-) delete mode 100644 code/modules/mob/living/carbon/human/whisper.dm diff --git a/code/modules/mob/living/carbon/human/whisper.dm b/code/modules/mob/living/carbon/human/whisper.dm deleted file mode 100644 index 4f7270bfcba..00000000000 --- a/code/modules/mob/living/carbon/human/whisper.dm +++ /dev/null @@ -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) \ No newline at end of file diff --git a/code/modules/mob/living/silicon/ai/freelook/eye.dm b/code/modules/mob/living/silicon/ai/freelook/eye.dm index a53d346fab1..98d010b878c 100644 --- a/code/modules/mob/living/silicon/ai/freelook/eye.dm +++ b/code/modules/mob/living/silicon/ai/freelook/eye.dm @@ -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) diff --git a/paradise.dme b/paradise.dme index a1cdfa6b147..4139c0682bc 100644 --- a/paradise.dme +++ b/paradise.dme @@ -1701,7 +1701,6 @@ #include "code\modules\mob\living\carbon\human\status_procs.dm" #include "code\modules\mob\living\carbon\human\update_icons.dm" #include "code\modules\mob\living\carbon\human\update_stat.dm" -#include "code\modules\mob\living\carbon\human\whisper.dm" #include "code\modules\mob\living\carbon\human\interactive\functions.dm" #include "code\modules\mob\living\carbon\human\interactive\interactive.dm" #include "code\modules\mob\living\carbon\human\interactive\prefabs.dm"