diff --git a/code/__HELPERS/names.dm b/code/__HELPERS/names.dm
index 09e0aa95b9..db2eba2422 100644
--- a/code/__HELPERS/names.dm
+++ b/code/__HELPERS/names.dm
@@ -151,6 +151,10 @@ GLOBAL_VAR(command_name)
GLOBAL_VAR(syndicate_code_phrase) //Code phrase for traitors.
GLOBAL_VAR(syndicate_code_response) //Code response for traitors.
+//Cached regex search - for checking if codewords are used.
+GLOBAL_DATUM(syndicate_code_phrase_regex, /regex)
+GLOBAL_DATUM(syndicate_code_response_regex, /regex)
+
/*
Should be expanded.
How this works:
diff --git a/code/controllers/subsystem/ticker.dm b/code/controllers/subsystem/ticker.dm
index 0c3181a019..df96c44df7 100755
--- a/code/controllers/subsystem/ticker.dm
+++ b/code/controllers/subsystem/ticker.dm
@@ -127,9 +127,20 @@ SUBSYSTEM_DEF(ticker)
if(!GLOB.syndicate_code_phrase)
GLOB.syndicate_code_phrase = generate_code_phrase(return_list=TRUE)
+
+ var/codewords = jointext(GLOB.syndicate_code_phrase, "|")
+ var/regex/codeword_match = new("([codewords])", "ig")
+
+ GLOB.syndicate_code_phrase_regex = codeword_match
+
if(!GLOB.syndicate_code_response)
GLOB.syndicate_code_response = generate_code_phrase(return_list=TRUE)
+ var/codewords = jointext(GLOB.syndicate_code_response, "|")
+ var/regex/codeword_match = new("([codewords])", "ig")
+
+ GLOB.syndicate_code_response_regex = codeword_match
+
start_at = world.time + (CONFIG_GET(number/lobby_countdown) * 10)
if(CONFIG_GET(flag/randomize_shift_time))
gametime_offset = rand(0, 23) HOURS
diff --git a/code/modules/antagonists/traitor/datum_traitor.dm b/code/modules/antagonists/traitor/datum_traitor.dm
index 828e19e3f6..e43c2f6254 100644
--- a/code/modules/antagonists/traitor/datum_traitor.dm
+++ b/code/modules/antagonists/traitor/datum_traitor.dm
@@ -358,8 +358,14 @@
return result.Join("
")
/datum/antagonist/traitor/roundend_report_footer()
- return "
The code phrases were: [GLOB.syndicate_code_phrase]
\
- The code responses were: [GLOB.syndicate_code_response]
"
+ var/phrases = jointext(GLOB.syndicate_code_phrase, ", ")
+ var/responses = jointext(GLOB.syndicate_code_response, ", ")
+
+ var message = "
The code phrases were: [phrases]
\
+ The code responses were: [responses]
"
+
+ return message
+
/datum/antagonist/traitor/is_gamemode_hero()
return SSticker.mode.name == "traitor"
diff --git a/code/modules/mob/living/carbon/say.dm b/code/modules/mob/living/carbon/say.dm
index 47c9b6beb8..452c8f8b78 100644
--- a/code/modules/mob/living/carbon/say.dm
+++ b/code/modules/mob/living/carbon/say.dm
@@ -28,12 +28,7 @@
message = trauma.on_hear(message, speaker, message_language, raw_message, radio_freq)
if (src.mind.has_antag_datum(/datum/antagonist/traitor))
- for (var/codeword in GLOB.syndicate_code_phrase)
- var/regex/codeword_match = new("([codeword])", "ig")
- message = codeword_match.Replace(message, "$1")
-
- for (var/codeword in GLOB.syndicate_code_response)
- var/regex/codeword_match = new("([codeword])", "ig")
- message = codeword_match.Replace(message, "$1")
+ message = GLOB.syndicate_code_phrase_regex.Replace(message, "$1")
+ message = GLOB.syndicate_code_response_regex.Replace(message, "$1")
return message
diff --git a/html/browser/roundend.css b/html/browser/roundend.css
index 865b42999e..e69635e888 100644
--- a/html/browser/roundend.css
+++ b/html/browser/roundend.css
@@ -10,6 +10,10 @@
color: #ef2f3c;
font-weight: bold;
}
+.bluetext {
+ color: #517fff;
+ font-weight: bold;
+}
.neutraltext {
font-weight: bold; /* If you feel these should have some color feel free to change */
}