mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-27 22:18:27 +01:00
Do speedboost text with zany regex
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user