Prevents hallucinations revealing people's identity

This commit is contained in:
LetterJay
2017-09-02 05:33:55 -05:00
parent 5d1c2c523b
commit d8679dbfcf
2 changed files with 6 additions and 3 deletions
+4 -1
View File
@@ -44,7 +44,7 @@ GLOBAL_LIST_INIT(freqtospan, list(
/atom/movable/proc/get_spans()
return list()
/atom/movable/proc/compose_message(atom/movable/speaker, datum/language/message_language, raw_message, radio_freq, list/spans, message_mode)
/atom/movable/proc/compose_message(atom/movable/speaker, datum/language/message_language, raw_message, radio_freq, list/spans, message_mode, face_name = FALSE)
//This proc uses text() because it is faster than appending strings. Thanks BYOND.
//Basic span
var/spanpart1 = "<span class='[radio_freq ? get_radio_span(radio_freq) : "game say"]'>"
@@ -54,6 +54,9 @@ GLOBAL_LIST_INIT(freqtospan, list(
var/freqpart = radio_freq ? "\[[get_radio_name(radio_freq)]\] " : ""
//Speaker name
var/namepart = "[speaker.GetVoice()][speaker.get_alt_name()]"
if(face_name && ishuman(speaker))
var/mob/living/carbon/human/H = speaker
namepart = "[H.get_face_name()]" //So "fake" speaking like in hallucinations does not give the speaker away if disguised
//End name span.
var/endspanpart = "</span>"
+2 -2
View File
@@ -759,7 +759,7 @@ GLOBAL_LIST_INIT(hallucinations_major, list(
people += H
if(person) //Basic talk
var/image/speech_overlay = image('icons/mob/talk.dmi', person, "default0", layer = ABOVE_MOB_LAYER)
var/message = target.compose_message(person,understood_language,pick(speak_messages),null,person.get_spans())
var/message = target.compose_message(person,understood_language,pick(speak_messages),null,person.get_spans(),face_name = TRUE)
feedback_details += "Type: Talk, Source: [person.real_name], Message: [message]"
to_chat(target, message)
if(target.client)
@@ -771,7 +771,7 @@ GLOBAL_LIST_INIT(hallucinations_major, list(
for(var/mob/living/carbon/human/H in GLOB.living_mob_list)
humans += H
person = pick(humans)
var/message = target.compose_message(person,understood_language,pick(radio_messages),"1459",person.get_spans())
var/message = target.compose_message(person,understood_language,pick(radio_messages),"1459",person.get_spans(),face_name = TRUE)
feedback_details += "Type: Radio, Source: [person.real_name], Message: [message]"
to_chat(target, message)
qdel(src)