Do speedboost text with zany regex

This commit is contained in:
Aronai Sieyes
2021-07-17 03:08:46 -04:00
parent 035a67b3d1
commit edb44c3bc3
+6 -3
View File
@@ -130,10 +130,13 @@
. = 1
if(CE_SPEEDBOOST in chem_effects || is_jittery) // motor mouth
// Despite trying to url/html decode these, byond is just being bad and I dunno.
var/static/regex/speedboost_initial = new (@"&[a-z]{2,5};|&#\d{2};","g")
// Not herestring because bad vs code syntax highlight panics at apostrophe
var/static/regex/speedboost_main = new ("\[ ',!?.;\]","g")
for(var/datum/multilingual_say_piece/S in message_data[1])
S.message = replacetext(S.message," ","")
S.message = replacetext(S.message,",","")
S.message = replacetext(S.message,";","")
S.message = speedboost_initial.Replace(S.message, "")
S.message = speedboost_main.Replace(S.message, "")
else
. = ..(message_data)