mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
Highlight codewords
Phrases in blue, responses in red.
This commit is contained in:
@@ -70,6 +70,18 @@ GLOBAL_LIST_INIT(freqtospan, list(
|
||||
|
||||
return "[spanpart1][spanpart2][freqpart][languageicon][compose_track_href(speaker, namepart)][namepart][compose_job(speaker, message_language, raw_message, radio_freq)][endspanpart][messagepart]"
|
||||
|
||||
/atom/movable/proc/augment_heard(message, mob/mob_hearing)
|
||||
if (mob_hearing.mind.special_role == ROLE_TRAITOR)
|
||||
for (var/codeword in GLOB.syndicate_code_phrase)
|
||||
var/regex/codeword_match = new("(" + codeword + ")", "ig")
|
||||
message = codeword_match.Replace(message, "<font color=blue>$1</font>")
|
||||
|
||||
for (var/codeword in GLOB.syndicate_code_response)
|
||||
var/regex/codeword_match = new("(" + codeword + ")", "ig")
|
||||
message = codeword_match.Replace(message, "<font color=red>$1</font>")
|
||||
|
||||
return message
|
||||
|
||||
/atom/movable/proc/compose_track_href(atom/movable/speaker, message_langs, raw_message, radio_freq)
|
||||
return ""
|
||||
|
||||
@@ -203,6 +215,8 @@ INITIALIZE_IMMEDIATE(/atom/movable/virtualspeaker)
|
||||
else // Unidentifiable mob
|
||||
job = "Unknown"
|
||||
|
||||
|
||||
|
||||
/atom/movable/virtualspeaker/GetJob()
|
||||
return job
|
||||
|
||||
|
||||
@@ -229,6 +229,8 @@ GLOBAL_LIST_INIT(department_radio_keys, list(
|
||||
// Recompose message for AI hrefs, language incomprehension.
|
||||
message = compose_message(speaker, message_language, raw_message, radio_freq, spans, message_mode)
|
||||
message = hear_intercept(message, speaker, message_language, raw_message, radio_freq, spans, message_mode)
|
||||
message = augment_heard(message, src)
|
||||
|
||||
show_message(message, 2, deaf_message, deaf_type)
|
||||
return message
|
||||
|
||||
|
||||
Reference in New Issue
Block a user