Files
Stephen 036a29b765 all mbc code from jan 1st to 2/16/2020
includes a lot of small things + fixes.
big ones are Simple Lights, New Grab stuff, Disorient Eye/Ear protection armor values, access reprogrammer and deconstruction device

also added flabo to the list of contributors, we missed her on the first go!

check changelog for full list, i merged that too
2020-02-17 01:36:01 -05:00

1814 lines
44 KiB
Plaintext

/datum/parse_result
var/string = ""
var/chars_used = 0
/datum/text_roamer
var/string = ""
var/curr_char_pos = 0
var/curr_char = ""
var/prev_char = ""
var/next_char = ""
var/next_next_char = ""
var/next_next_next_char = ""
New(var/str)
if(isnull(str)) qdel(src)
string = str
curr_char_pos = 1
curr_char = copytext(string,curr_char_pos,curr_char_pos+1)
if(length(string) > 1) next_char = copytext(string,curr_char_pos+1,curr_char_pos+2)
if(length(string) > 2) next_next_char = copytext(string,curr_char_pos+2,curr_char_pos+3)
if(length(string) > 3) next_next_next_char = copytext(string,curr_char_pos+3,curr_char_pos+4)
proc
in_word()
if(prev_char != "" && prev_char != " " && next_char != "" && next_char != " ") return 1
else return 0
end_of_word()
if(prev_char != "" && prev_char != " " && (next_char == "" || next_char == " ") ) return 1
else return 0
alone()
if((prev_char == "" || prev_char == " ") && (next_char == "" || next_char == " ") ) return 1
else return 0
update()
curr_char = copytext(string,curr_char_pos,curr_char_pos+1)
if(curr_char_pos + 1 <= length(string))
next_char = copytext(string,curr_char_pos+1,curr_char_pos+2)
else
next_char = ""
if(curr_char_pos + 2 <= length(string))
next_next_char = copytext(string,curr_char_pos+2,curr_char_pos+3)
else
next_next_char = ""
if(curr_char_pos + 3 <= length(string))
next_next_next_char = copytext(string,curr_char_pos+3,curr_char_pos+4)
else
next_next_next_char = ""
if(curr_char_pos - 1 >= 1)
prev_char = copytext(string,curr_char_pos-1,curr_char_pos)
else
prev_char = ""
return
next()
if(curr_char_pos + 1 <= length(string))
curr_char_pos++
curr_char = copytext(string,curr_char_pos,curr_char_pos+1)
if(curr_char_pos + 1 <= length(string))
next_char = copytext(string,curr_char_pos+1,curr_char_pos+2)
else
next_char = ""
if(curr_char_pos + 2 <= length(string))
next_next_char = copytext(string,curr_char_pos+2,curr_char_pos+3)
else
next_next_char = ""
if(curr_char_pos + 3 <= length(string))
next_next_next_char = copytext(string,curr_char_pos+3,curr_char_pos+4)
else
next_next_next_char = ""
if(curr_char_pos - 1 >= 1)
prev_char = copytext(string,curr_char_pos-1,curr_char_pos)
else
prev_char = ""
return
prev()
if(curr_char_pos - 1 >= 1)
curr_char_pos--
curr_char = copytext(string,curr_char_pos,curr_char_pos+1)
if(curr_char_pos + 1 <= length(string))
next_char = copytext(string,curr_char_pos+1,curr_char_pos+2)
else
next_char = ""
if(curr_char_pos + 2 <= length(string))
next_next_char = copytext(string,curr_char_pos+2,curr_char_pos+3)
else
next_next_char = ""
if(curr_char_pos + 3 <= length(string))
next_next_next_char = copytext(string,curr_char_pos+3,curr_char_pos+4)
else
next_next_next_char = ""
if(curr_char_pos - 1 >= 1)
prev_char = copytext(string,curr_char_pos-1,curr_char_pos)
else
prev_char = ""
return
/proc/explode_string(text)
if (!istext(text))
CRASH("YOU HAVE TO PASS TEXT TO THE FUNCTIONS THAT DEAL WITH TEXT, IDIOT.")
var/regex/R = regex(@"([^&]|&(?:[a-z0-9_-]+|#x?[0-9a-f]+);)", "gi")
var/list/C = new()
while (R.Find(text) != 0)
C.Add(R.group[1])
return C
/proc/elvis_parse(var/datum/text_roamer/R)
var/new_string = ""
var/used = 0
switch(R.curr_char)
if("t")
if(R.next_char == "i" && R.next_next_char == "o" && R.next_next_next_char == "n")
new_string = "shun"
used = 4
else if(R.next_char == "h" && R.next_next_char == "e")
new_string = "tha"
used = 3
else if(R.next_char == "h" && (R.next_next_char == " " || R.next_next_char == "," || R.next_next_char == "." || R.next_next_char == "-"))
new_string = "t" + R.next_next_char
used = 3
if("T")
if(R.next_char == "I" && R.next_next_char == "O" && R.next_next_next_char == "N")
new_string = "SHUN"
used = 4
else if(R.next_char == "H" && R.next_next_char == "E")
new_string = "THA"
used = 3
else if(R.next_char == "H" && (R.next_next_char == " " || R.next_next_char == "," || R.next_next_char == "." || R.next_next_char == "-"))
new_string = "T" + R.next_next_char
used = 3
if("u")
if (R.prev_char != " " || R.next_char != " ")
new_string = "uh"
used = 2
if("U")
if (R.prev_char != " " || R.next_char != " ")
new_string = "UH"
used = 2
if("o")
if (R.next_char == "w" && (R.prev_char != " " || R.next_next_char != " "))
new_string = "aw"
used = 2
else if (R.prev_char != " " || R.next_char != " ")
new_string = "ah"
used = 1
if("O")
if (R.next_char == "W" && (R.prev_char != " " || R.next_next_char != " "))
new_string = "AW"
used = 2
else if (R.prev_char != " " || R.next_char != " ")
new_string = "AH"
used = 1
if("i")
if (R.next_char == "r" && (R.prev_char != " " || R.next_next_char != " "))
new_string = "ahr"
used = 2
else if(R.next_char == "n" && R.next_next_char == "g")
new_string = "in'"
used = 3
if("I")
if (R.next_char == "R" && (R.prev_char != " " || R.next_next_char != " "))
new_string = "AHR"
used = 2
else if(R.next_char == "N" && R.next_next_char == "G")
new_string = "IN'"
used = 3
if("e")
if (R.next_char == "n" && R.next_next_char == " ")
new_string = "un "
used = 3
if (R.next_char == "r" && R.next_next_char == " ")
new_string = "ah "
used = 3
else if (R.next_char == "w" && (R.prev_char != " " || R.next_next_char != " "))
new_string = "yew"
used = 2
else if(R.next_char == " " && R.prev_char == " ") ///!!!
new_string = "ee"
used = 1
if("E")
if (R.next_char == "N" && R.next_next_char == " ")
new_string = "UN "
used = 3
if (R.next_char == "R" && R.next_next_char == " ")
new_string = "AH "
used = 3
else if (R.next_char == "W" && (R.prev_char != " " || R.next_next_char != " "))
new_string = "YEW"
used = 2
else if(R.next_char == " " && R.prev_char == " ") ///!!!
new_string = "EE"
used = 1
if("a")
if (R.next_char == "u")
new_string = "ah"
used = 2
else if (R.next_char == "n")
new_string = "ain"
used = (R.next_next_char == "d" ? 3 : 2)
if("A")
if (R.next_char == "U")
new_string = "AH"
used = 2
else if (R.next_char == "N")
new_string = "AIN"
used = (R.next_next_char == "D" ? 3 : 2)
if(new_string == "")
new_string = R.curr_char
used = 1
var/datum/parse_result/P = new/datum/parse_result
P.string = new_string
P.chars_used = used
return P
/proc/borkborkbork_parse(var/datum/text_roamer/R)
var/new_string = ""
var/used = 0
switch(R.curr_char)
if("f")
if(R.prev_char != " " || R.next_char != " ")
new_string = "ff"
used = 1
if("F")
if(R.prev_char != " " || R.next_char != " ")
new_string = "FF"
used = 1
if("w")
new_string = "v"
used = 1
if("W")
new_string = "V"
used = 1
if("v")
new_string = "f"
used = 1
if("V")
new_string = "F"
used = 1
if("b")
if(R.next_char == "o" && R.next_next_char == "r" && R.next_next_next_char == "k")
new_string = "bork"
used = 4
if("B")
if(R.next_char == "o" && R.next_next_char == "r" && R.next_next_next_char == "k")
new_string = "Bork"
used = 4
else if(R.next_char == "O" && R.next_next_char == "R" && R.next_next_next_char == "K")
new_string = "BORK"
used = 4
if("t")
if(R.next_char == "i" && R.next_next_char == "o" && R.next_next_next_char == "n")
new_string = "shun"
used = 4
else if(R.next_char == "h" && R.next_next_char == "e")
new_string = "zee"
used = 3
else if(R.next_char == "h" && (R.next_next_char == " " || R.next_next_char == "," || R.next_next_char == "." || R.next_next_char == "-"))
new_string = "t" + R.next_next_char
used = 3
if("T")
if(R.next_char == "I" && R.next_next_char == "O" && R.next_next_next_char == "N")
new_string = "SHUN"
used = 4
else if(R.next_char == "H" && R.next_next_char == "E")
new_string = "ZEE"
used = 3
else if(R.next_char == "H" && (R.next_next_char == " " || R.next_next_char == "," || R.next_next_char == "." || R.next_next_char == "-"))
new_string = "T" + R.next_next_char
used = 3
if("u")
if (R.prev_char != " " || R.next_char != " ")
new_string = "oo"
used = 1
if("U")
if (R.prev_char != " " || R.next_char != " ")
new_string = "OO"
used = 1
if("o")
if (R.next_char == "w" && (R.prev_char != " " || R.next_next_char != " "))
new_string = "oo"
used = 2
else if (R.prev_char != " " || R.next_char != " ")
new_string = "u"
used = 1
else if(R.next_char == " " && R.prev_char == " ") ///!!!
new_string = "oo"
used = 1
if("O")
if (R.next_char == "W" && (R.prev_char != " " || R.next_next_char != " "))
new_string = "OO"
used = 2
else if (R.prev_char != " " || R.next_char != " ")
new_string = "U"
used = 1
else if(R.next_char == " " && R.prev_char == " ") ///!!!
new_string = "OO"
used = 1
if("i")
if (R.next_char == "r" && (R.prev_char != " " || R.next_next_char != " "))
new_string = "ur"
used = 2
else if(R.prev_char != " " || R.next_char != " ")
new_string = "ee"
used = 1
if("I")
if (R.next_char == "R" && (R.prev_char != " " || R.next_next_char != " "))
new_string = "UR"
used = 2
else if(R.prev_char != " " || R.next_char != " ")
new_string = "EE"
used = 1
if("e")
if (R.next_char == "n" && R.next_next_char == " ")
new_string = "ee "
used = 3
else if (R.next_char == "w" && (R.prev_char != " " || R.next_next_char != " "))
new_string = "oo"
used = 2
else if ((R.next_char == " " || R.next_char == "," || R.next_char == "." || R.next_char == "-") && R.prev_char != " ")
new_string = "e-a" + R.next_char
used = 2
else if(R.next_char == " " && R.prev_char == " ") ///!!!
new_string = "i"
used = 1
if("E")
if (R.next_char == "N" && R.next_next_char == " ")
new_string = "EE "
used = 3
else if (R.next_char == "W" && (R.prev_char != " " || R.next_next_char != " "))
new_string = "OO"
used = 2
else if ((R.next_char == " " || R.next_char == "," || R.next_char == "." || R.next_char == "-") && R.prev_char != " ")
new_string = "E-A" + R.next_char
used = 2
else if(R.next_char == " " && R.prev_char == " ") ///!!!
new_string = "i"
used = 1
if("a")
if (R.next_char == "u")
new_string = "oo"
used = 2
else if (R.next_char == "n")
new_string = "un"
used = 2
else
new_string = "e" //{WC} ?
used = 1
if("A")
if (R.next_char == "U")
new_string = "OO"
used = 2
else if (R.next_char == "N")
new_string = "UN"
used = 2
else
new_string = "E" //{WC} ?
used = 1
if(new_string == "")
new_string = R.curr_char
used = 1
var/datum/parse_result/P = new/datum/parse_result
P.string = new_string
P.chars_used = used
return P
/proc/soviet_parse(var/datum/text_roamer/R)
var/S = R.curr_char
var/new_string = ""
var/used = 1
switch (S)
if ("y")
if (cmptext(R.next_char, "a"))
new_string = "&#x44f;" //Ya
used = 2
else if (cmptext(R.next_char,"u"))
new_string = "&#x44e;"
used = 2
else if (cmptext(R.next_char,"o"))
new_string = "&#x451;"
used = 2
else if (cmptext(R.next_char, "e"))
new_string = "&#x435;"
used = 2
else
new_string = "&#x44b;"
used = 1
if ("Y")
if (cmptext(R.next_char, "a"))
new_string = "&#x42f;" //Ya
used = 2
else if (cmptext(R.next_char,"u"))
new_string = "&#x42e;"
used = 2
else if (cmptext(R.next_char,"o"))
new_string = "&#x401;"
used = 2
else if (cmptext(R.next_char, "e"))
new_string = "&#x415;"
used = 2
else
new_string = "&#x42b;"
used = 1
if ("s")
if (cmptext(R.next_char,"h"))
if (cmptext(R.next_next_char, "c") && cmptext(R.next_next_next_char,"h"))
new_string = "&#x449;"
used = 4
else
new_string = "&#x448;"
used = 2
else
new_string = "&#x441;"
used = 1
if ("S")
if (cmptext(R.next_char,"h"))
if (cmptext(R.next_next_char, "c") && cmptext(R.next_next_next_char,"h"))
new_string = "&#x429;"
used = 4
else
new_string = "&#x428;"
used = 2
else
new_string = "&#x421;"
used = 1
if ("k")
if (cmptext(R.next_char, "h"))
new_string = "&#x445;" //x
used = 2
else
new_string = "&#x43A;" //k
used = 1
if ("K")
if (cmptext(R.next_char, "h"))
new_string = "&#x425;" //x
used = 2
else
new_string = "&#x41A;" //k
used = 1
if ("c")
if (cmptext(R.next_char, "h"))
new_string = "&#x447;"
used = 2
else if (cmptext(R.next_char, "z"))
new_string = "&#x446;" //ts
used = 2
if ("C")
if (cmptext(R.next_char, "h"))
new_string = "&#x427;"
used = 2
else if (cmptext(R.next_char,"z"))
new_string = "&#x426;" //ts
used = 2
if ("t")
if (cmptext(R.next_char, "s"))
new_string = "&#x446;" //ts
used = 2
else
new_string = "&#x442;" //t
used = 1
if ("T")
if (cmptext(R.next_char, "s"))
new_string = "&#x426;" //ts
used = 2
else
new_string = "&#x422;" //t
used = 1
if ("i")
new_string = "&#x438;"
if ("I")
new_string = "&#x418;"
if ("z")
if (cmptext(R.next_char, "h"))
new_string = "&#x436;"
used = 2
else
new_string = "&#x437;"
if ("Z")
if (cmptext(R.next_char, "h"))
new_string = "&#x416;"
used = 2
else
new_string = "&#x417;"
if ("e")
if (!R.prev_char || R.prev_char == " ")
new_string = "&#x44d;"
else
new_string = "&#x435;"
if ("E")
if (!R.prev_char || R.prev_char == " ")
new_string = "&#x42d;"
else
new_string = "&#x415;"
if ("t")
new_string = "&#x442;"
if ("T")
new_string = "&#x422;"
if ("u")
new_string = "&#x443;"
if ("U")
new_string = "&#x423;"
if ("p")
new_string = "&#x43f;"
if ("P")
new_string = "&#x41f;"
if ("n")
new_string = "&#x43d;"
if ("N")
new_string = "&#x41d;"
if ("m")
new_string = "&#x43c;"
if ("M")
new_string = "&#x41c;"
if ("l")
new_string = "&#x43b;"
if ("L")
new_string = "&#x41b;"
if ("d")
new_string = "&#x434;"
if ("D")
new_string = "&#x414;"
if ("g")
new_string = "&#x433;"
if ("G")
new_string = "&#x413;"
if ("b")
new_string = "&#x431;"
if ("B")
new_string = "&#x411;"
if ("v","w")
new_string = "&#x432;"
if ("V","W")
new_string = "&#x412;"
if ("r")
new_string = "&#x440;"
if ("R")
new_string = "&#x420;"
if ("f")
new_string = "&#x444;"
if ("F")
new_string = "&#x424;"
if ("o")
new_string = "&#x43E;"
if ("O")
new_string = "&#x41E;"
if ("j")
new_string = "&#x439;"
if ("J")
new_string = "&#x419;"
if ("a")
new_string = "&#x430;"
if ("A")
new_string = "&#x410;"
if ("'")
new_string = "&#x44a;"
if(new_string == "")
new_string = R.curr_char
used = 1
var/datum/parse_result/P = new/datum/parse_result
P.string = new_string
P.chars_used = used
return P
/proc/tommy_parse(var/datum/text_roamer/R)
var/S = R.curr_char
var/new_string = ""
var/used = 1
switch(S)
if("a")
new_string = "ah"
used = 1
if("A")
new_string = "AH"
used = 1
if("e")
switch(rand(1,2))
if(1)
new_string = "ee"
if(2)
new_string = "ea"
used = 1
if("E")
switch(rand(1,2))
if(1)
new_string = "EE"
if(2)
new_string = "EA"
used = 1
if("i")
new_string = "ii"
used = 1
if("I")
new_string = "II"
used = 1
if("o")
if(R.next_char == "u")
new_string = "oou"
used = 1
else
new_string = "oe"
used = 1
if("O")
if(R.next_char == "U")
new_string = "OOU"
used = 1
else
new_string = "OE"
used = 1
if("u")
if(R.next_char == " " || R.next_char == "." || R.next_char == "!" || R.next_char == "?" || R.next_char == ",")
new_string = "ue"
used = 1
else if(prob(50))
new_string = "uu"
used = 1
if("U")
if(R.next_char == " " || R.next_char == "." || R.next_char == "!" || R.next_char == "?" || R.next_char == ",")
new_string = "UE"
used = 1
else if(prob(50))
new_string = "UU"
used = 1
if("h")
if(R.next_char == "y")
new_string = "hai"
used = 2
if("H")
if(R.next_char == "Y")
new_string = "HAI"
used = 2
if("r")
if(R.next_char != "h")
new_string = "wh"
used = 2
else if(R.prev_char != "h")
new_string = "hw"
used = 2
else
new_string = "w"
used = 1
if("R")
if(R.next_char != "H")
new_string = "WH"
used = 2
else if(R.prev_char != "H")
new_string = "HW"
used = 2
else
new_string = "W"
used = 1
if(!new_string)
new_string = R.curr_char
used = 1
else if(prob(10))
new_string = uppertext(new_string)
var/datum/parse_result/P = new
P.string = new_string
P.chars_used = used
return P
/proc/finnish_parse(var/datum/text_roamer/R)
var/S = R.curr_char
var/new_string = S
var/used = 1
// Case insensitivity
var/upper = S == uppertext(S)
S = lowertext(S)
switch(S)
// Unexplainable, but great
if("p")
new_string = "b"
if("b")
new_string = "p"
/*
if("u")
if(isVowel(lowertext(R.next_char)))
new_string = "a"
else
new_string = "o"
*/
if("e")
if(isVowel(lowertext(R.next_char)))
new_string = "ee"
used = 2
if("g")
if(lowertext(R.prev_char) == "" || lowertext(R.prev_char) == " ")
new_string = "k"
used = 1
if("c")
// Common to pronounce schedule and scenario with hard C
if(lowertext(R.prev_char) == "s")
new_string = "k"
// Authentic Finnish double consonant
else if (lowertext(R.next_char) == "k")
new_string = "kk"
used = 2
// Harden soft sh- or th- sounds
if("s")
if(lowertext(R.next_char)=="h")
if(prob(50))
new_string = "s"
used = 2
else
new_string = "ch"
used = 2
if("t")
if(lowertext(R.next_char)=="h")
new_string = "t"
used = 2
// That legendary harsh R
if("r")
if(lowertext(R.next_char) != "r")
new_string = "rr"
used = 1
if("i")
if(lowertext(R.next_char) != "i")
new_string = "ii"
used = 1
if("w")
new_string = "v"
used = 1
var/datum/parse_result/P = new
P.string = upper ? uppertext(new_string) : new_string
P.chars_used = used
return P
/proc/wonk_parse(var/string)
string = lowertext(string)
if(prob(1))
return pick("yiff yiff mrr", "fuckable owwwwwwls", "cunts", "shit cunt")
var/list/broken_string = splittext(string, " ")
for(var/i = 1; i <= broken_string.len;i++)
if(prob(20))
broken_string[i] = pick("cunt", "shit", "horsefucker", "prick", "yiff", "mrr", "bubs' mum", "fisting", "fuck", "cunting", "chode", "shitehawk")
return kText.list2text(broken_string)
/proc/russify(var/string)
var/modded = ""
var/datum/text_roamer/T = new/datum/text_roamer(string)
for (var/i = 0, i < length(string), i=i)
var/datum/parse_result/P = soviet_parse(T)
modded += P.string
i += P.chars_used
T.curr_char_pos = T.curr_char_pos + P.chars_used
T.update()
return modded
/proc/finnishify(var/string)
var/modded = ""
var/datum/text_roamer/T = new/datum/text_roamer(string)
if(prob(50))
string = replacetextEx(string, " a ", "")
string = replacetextEx(string, " an ", "")
if(prob(25))
string = replacetextEx(string, " the ", "")
for (var/i = 0, i < length(string), i=i)
var/datum/parse_result/P = finnish_parse(T)
modded += P.string
i += P.chars_used
T.curr_char_pos = T.curr_char_pos + P.chars_used
T.update()
if(prob(2))
modded += " :DDDDD"
return modded
/proc/tommify(var/string)
var/modded = ""
var/datum/text_roamer/T = new/datum/text_roamer(string)
for(var/i = 0, i < length(string), i=i)
var/datum/parse_result/P = tommy_parse(T)
modded += P.string
i += P.chars_used
T.curr_char_pos = T.curr_char_pos + P.chars_used
T.update()
if(copytext(string, length(string)) == "!")
modded = uppertext(modded) + "!!"
else if(prob(50) && (copytext(string, length(string)) == "?"))
modded = uppertext(modded) + "?[ prob(50) ? " HUH!?" : null]"
return modded
/proc/borkborkbork(var/string)
var/modded = ""
var/datum/text_roamer/T = new/datum/text_roamer(string)
for(var/i = 0, i < length(string), i=i)
var/datum/parse_result/P = borkborkbork_parse(T)
modded += P.string
i += P.chars_used
T.curr_char_pos = T.curr_char_pos + P.chars_used
T.update()
if(prob(15))
modded += " Bork Bork Bork!"
if(prob(5))
modded += " Bork."
return modded
/proc/elvisfy(var/string)
var/modded = ""
var/datum/text_roamer/T = new/datum/text_roamer(string)
for(var/i = 0, i < length(string), i=i)
var/datum/parse_result/P = elvis_parse(T)
modded += P.string
i += P.chars_used
T.curr_char_pos = T.curr_char_pos + P.chars_used
T.update()
if(prob(15)) modded += pick(", uh huh.", ", alright?", ", mmhmm.", ", y'all.");
return modded
/proc/wonkify(var/string)
return wonk_parse(string)
// REFACTOR - Cirrial
// it would be nice if these were in one fucking place
// say filters
/proc/say_drunk(var/string)
var/modded = ""
var/datum/text_roamer/T = new/datum/text_roamer(string)
for(var/i = 0, i < length(string), i++)
switch(T.curr_char)
if("k")
if(lowertext(T.prev_char) == "n" || lowertext(T.prev_char) == "c")
modded += "gh"
else
modded += "g"
if("K")
if(lowertext(T.prev_char) == "N" || lowertext(T.prev_char) == "C")
modded += "GH"
else
modded += "G"
if("s")
modded += "sh"
if("S")
modded += "SH"
if("t")
if(lowertext(T.next_char) == "h")
modded += "du"
T.curr_char_pos++
else if(lowertext(T.prev_char) == "n")
modded += "thf"
else
modded += "ff"
if("T")
if(lowertext(T.next_char) == "H")
modded += "DU"
T.curr_char_pos++
else if(lowertext(T.prev_char) == "N")
modded += "THF"
else
modded += "FF"
else
modded += T.curr_char
T.curr_char_pos++
T.update()
return modded
// totally garbled drunk slurring
/proc/say_superdrunk(var/string)
var/modded = ""
var/datum/text_roamer/T = new/datum/text_roamer(string)
for(var/i = 0, i < length(string), i++)
switch(T.curr_char)
if("b","c","d","f","g","h","j","k","l","m","n","p","q","r","s","t","v","w","x","y","z")
modded += pick(consonants_lower)
if("B","C","D","F","G","H","J","K","L","M","N","P","Q","R","S","T","V","W","X","Y","Z")
modded += pick(consonants_upper)
else
modded += T.curr_char
T.curr_char_pos++
T.update()
return modded
// berserker proc thing
/proc/say_furious(var/string)
var/modded = ""
var/datum/text_roamer/T = new/datum/text_roamer(string)
for(var/i = 0, i < length(string), i=i)
var/datum/parse_result/P = say_furious_parse(T)
modded += P.string
i += P.chars_used
T.curr_char_pos = T.curr_char_pos + P.chars_used
T.update()
return modded
/proc/say_furious_parse(var/datum/text_roamer/R)
var/new_string = ""
var/used = 0
switch(R.curr_char)
if(" ","!","?",".",",",";")
used = 1
else
new_string = pick("A","R","G","H")
used = 1
if(new_string == "")
new_string = R.curr_char
used = 1
var/datum/parse_result/P = new/datum/parse_result
P.string = new_string
P.chars_used = used
return P
// genetically falling apart!
/proc/say_gurgle(var/string)
var/modded = ""
var/datum/text_roamer/T = new/datum/text_roamer(string)
for(var/i = 0, i < length(string), i=i)
var/datum/parse_result/P = say_gurgle_parse(T)
modded += P.string
i += P.chars_used
T.curr_char_pos = T.curr_char_pos + P.chars_used
T.update()
return modded
/proc/say_gurgle_parse(var/datum/text_roamer/R)
var/new_string = ""
var/used = 0
switch(R.curr_char)
if(" ","!","?",".",",",";")
used = 1
else
new_string = pick("g","u","b","l")
used = 1
if(new_string == "")
new_string = R.curr_char
used = 1
var/datum/parse_result/P = new/datum/parse_result
P.string = new_string
P.chars_used = used
return P
/proc/chavify(var/string)
var/modded = ""
var/datum/text_roamer/T = new/datum/text_roamer(string)
for(var/i = 0, i < length(string), i=i)
var/datum/parse_result/P = chav_parse(T)
modded += P.string
i += P.chars_used
T.curr_char_pos = T.curr_char_pos + P.chars_used
T.update()
if(prob(15))
modded += pick(" innit"," like"," mate")
return modded
/proc/chav_parse(var/datum/text_roamer/R)
var/new_string = ""
var/used = 0
switch(lowertext(R.curr_char))
if("w")
if(lowertext(R.next_char) == "h" && lowertext(R.next_next_char) == "a")
new_string = "wo"
used = 3
/*if("W")
if(lowertext(R.next_char) == "H" && lowertext(R.next_next_char) == "A")
new_string = "WO"
used = 3*/
if("o")
if(lowertext(R.next_char) == "u" && lowertext(R.next_next_char) == "g" && lowertext(R.next_next_next_char) == "h")
new_string = "uf"
used = 4
if(lowertext(R.next_char) == "r" && lowertext(R.next_next_char) == "r" && lowertext(R.next_next_next_char) == "y")
new_string = "oz"
used = 4
/*if("O")
if(lowertext(R.next_char) == "U" && lowertext(R.next_next_char) == "G" && lowertext(R.next_next_next_char) == "H")
new_string = "UF"
used = 4
if(lowertext(R.next_char) == "R" && lowertext(R.next_next_char) == "R" && lowertext(R.next_next_next_char) == "Y")
new_string = "OZ"
used = 4*/
if("t")
if(lowertext(R.next_char) == "i" && lowertext(R.next_next_char) == "o" && lowertext(R.next_next_next_char) == "n")
new_string = "shun"
used = 4
else if(lowertext(R.next_char) == "h" && lowertext(R.next_next_char) == "e")
new_string = "zee"
used = 3
else if(lowertext(R.next_char) == "h" && (lowertext(R.next_next_char) == " " || lowertext(R.next_next_char) == "," || lowertext(R.next_next_char) == "." || lowertext(R.next_next_char) == "-"))
new_string = "t" + R.next_next_char
used = 3
/*if("T")
if(lowertext(R.next_char) == "I" && lowertext(R.next_next_char) == "O" && lowertext(R.next_next_next_char) == "N")
new_string = "SHUN"
used = 4
else if(lowertext(R.next_char) == "H" && lowertext(R.next_next_char) == "E")
new_string = "ZEE"
used = 3
else if(lowertext(R.next_char) == "H" && (lowertext(R.next_next_char) == " " || lowertext(R.next_next_char) == "," || lowertext(R.next_next_char) == "." || lowertext(R.next_next_char) == "-"))
new_string = "T" + R.next_next_char
used = 3*/
if("u")
if (lowertext(R.prev_char) != " " || lowertext(R.next_char) != " ")
new_string = "oo"
used = 1
/*if("U")
if (lowertext(R.prev_char) != " " || lowertext(R.next_char) != " ")
new_string = "OO"
used = 1*/
if("o")
if (lowertext(R.next_char) == "w" && (lowertext(R.prev_char) != " " || lowertext(R.next_next_char )!= " "))
new_string = "oo"
used = 2
else if (lowertext(R.prev_char) != " " || lowertext(R.next_char) != " ")
new_string = "u"
used = 1
else if(lowertext(R.next_char) == " " && lowertext(R.prev_char) == " ") ///!!!
new_string = "oo"
used = 1
/*if("O")
if (lowertext(R.next_char) == "W" && (lowertext(R.prev_char) != " " || lowertext(R.next_next_char )!= " "))
new_string = "OO"
used = 2
else if (lowertext(R.prev_char) != " " || lowertext(R.next_char) != " ")
new_string = "U"
used = 1
else if(lowertext(R.next_char) == " " && lowertext(R.prev_char) == " ") ///!!!
new_string = "OO"
used = 1*/
if("i")
if (lowertext(R.next_char) == "r" && (lowertext(R.prev_char) != " " || lowertext(R.next_next_char) != " "))
new_string = "ur"
used = 2
else if((lowertext(R.prev_char) != " " || lowertext(R.next_char) != " "))
new_string = "ee"
used = 1
/*if("I")
if (lowertext(R.next_char) == "R" && (lowertext(R.prev_char) != " " || lowertext(R.next_next_char) != " "))
new_string = "UR"
used = 2
else if((lowertext(R.prev_char) != " " || lowertext(R.next_char) != " "))
new_string = "EE"
used = 1*/
if("e")
if (lowertext(R.next_char) == "n" && lowertext(R.next_next_char) == " ")
new_string = "ee "
used = 3
else if (lowertext(R.next_char) == "w" && (lowertext(R.prev_char) != " " || lowertext(R.next_next_char) != " "))
new_string = "oo"
used = 2
else if ((lowertext(R.next_char) == " " || lowertext(R.next_char) == "," || lowertext(R.next_char) == "." || lowertext(R.next_char) == "-") && lowertext(R.prev_char) != " ")
new_string = "e-a" + R.next_char
used = 2
else if(lowertext(R.next_char) == " " && lowertext(R.prev_char) == " ") ///!!!
new_string = "i"
used = 1
/*if("E")
if (lowertext(R.next_char) == "N" && lowertext(R.next_next_char) == " ")
new_string = "EE "
used = 3
else if (lowertext(R.next_char) == "W" && (lowertext(R.prev_char) != " " || lowertext(R.next_next_char) != " "))
new_string = "OO"
used = 2
else if ((lowertext(R.next_char) == " " || lowertext(R.next_char) == "," || lowertext(R.next_char) == "." || lowertext(R.next_char) == "-") && lowertext(R.prev_char) != " ")
new_string = "E-A" + R.next_char
used = 2
else if(lowertext(R.next_char) == " " && lowertext(R.prev_char) == " ") ///!!!
new_string = "I"
used = 1*/
if("a")
if (lowertext(R.next_char) == "u")
new_string = "oo"
used = 2
else if (lowertext(R.next_char) == "n")
new_string = "un"
used = 2
else
new_string = "e" //{WC} ?
used = 1
/*if("A")
if (lowertext(R.next_char) == "U")
new_string = "OO"
used = 2
else if (lowertext(R.next_char) == "N")
new_string = "UN"
used = 2
else
new_string = "E" //{WC} ?
used = 1 */
if(new_string == "")
new_string = R.curr_char
used = 1
var/datum/parse_result/P = new/datum/parse_result
P.string = new_string
P.chars_used = used
return P
/proc/smilify(var/string)
var/modded = ""
var/datum/text_roamer/T = new/datum/text_roamer(string)
for(var/i = 0, i < length(string), i=i)
var/datum/parse_result/P = smile_parse(T)
modded += P.string
i += P.chars_used
T.curr_char_pos = T.curr_char_pos + P.chars_used
T.update()
modded += " :)"
return modded
/proc/smile_parse(var/datum/text_roamer/R)
var/used = 0
var/new_string = ""
if(R.next_char && lowertext(R.next_char) != " ")
if(R.next_next_char != " ") new_string = "[R.curr_char] [R.next_char] "
else new_string = "[R.curr_char] [R.next_char]"
used = 2
if(new_string == "")
new_string = R.curr_char
used = 1
var/datum/parse_result/P = new/datum/parse_result
P.string = new_string
P.chars_used = used
return P
/proc/voidSpeak(var/message) // sharing the creepiness with everyone!!
if (!message)
return
var/fontIncreasing = 1
var/fontSizeMax = 140
var/fontSizeMin = 70
var/fontSize = rand(fontSizeMin, fontSizeMax)
var/processedMessage = ""
var/list/L = explode_string(message)
var/randomPos = ""
for (var/c in L)
fontSize += rand(5,15) * fontIncreasing
if (fontSize > fontSizeMax)
fontIncreasing = -1
else if (fontSize < fontSizeMin)
fontIncreasing = 1
// It turns out that this makes browsers lag really, really bad. Or at least IE.
// IE is still a pain in the ass in 2019, who would have guessed.
// (may be fixed if, at some point in E_FUTURE, the whole message is relative-pos instead of each span.)
if (prob(33))
randomPos = " position: relative; top: [rand(-3,3)]px; left: [rand(-3,3)]px;"
else
randomPos = ""
processedMessage += "<span style='font-size: [fontSize]%;[randomPos]'>[c]</span>"
return "<em>[processedMessage]</em>"
// zalgo text proc, borrowed from eeemo.net
//those go UP
var/list/zalgo_up = list(
"&#x030d;", "&#x030e;", "&#x0304;", "&#x0305;",
"&#x033f;", "&#x0311;", "&#x0306;", "&#x0310;",
"&#x0352;", "&#x0357;", "&#x0351;", "&#x0307;",
"&#x0308;", "&#x030a;", "&#x0342;", "&#x0343;",
"&#x0344;", "&#x034a;", "&#x034b;", "&#x034c;",
"&#x0303;", "&#x0302;", "&#x030c;", "&#x0350;",
"&#x0300;", "&#x0301;", "&#x030b;", "&#x030f;",
"&#x0312;", "&#x0313;", "&#x0314;", "&#x033d;",
"&#x0309;", "&#x0363;", "&#x0364;", "&#x0365;",
"&#x0366;", "&#x0367;", "&#x0368;", "&#x0369;",
"&#x036a;", "&#x036b;", "&#x036c;", "&#x036d;",
"&#x036e;", "&#x036f;", "&#x033e;", "&#x035b;",
"&#x0346;", "&#x031a;"
)
//those go DOWN
var/list/zalgo_down = list(
"&#x0316;", "&#x0317;", "&#x0318;", "&#x0319;",
"&#x031c;", "&#x031d;", "&#x031e;", "&#x031f;",
"&#x0320;", "&#x0324;", "&#x0325;", "&#x0326;",
"&#x0329;", "&#x032a;", "&#x032b;", "&#x032c;",
"&#x032d;", "&#x032e;", "&#x032f;", "&#x0330;",
"&#x0331;", "&#x0332;", "&#x0333;", "&#x0339;",
"&#x033a;", "&#x033b;", "&#x033c;", "&#x0345;",
"&#x0347;", "&#x0348;", "&#x0349;", "&#x034d;",
"&#x034e;", "&#x0353;", "&#x0354;", "&#x0355;",
"&#x0356;", "&#x0359;", "&#x035a;", "&#x0323;"
)
//those always stay in the middle
var/list/zalgo_mid = list(
"&#x0315;", "&#x031b;", "&#x0340;", "&#x0341;",
"&#x0358;", "&#x0321;", "&#x0322;", "&#x0327;",
"&#x0328;", "&#x0334;", "&#x0335;", "&#x0336;",
"&#x034f;", "&#x035c;", "&#x035d;", "&#x035e;",
"&#x035f;", "&#x0360;", "&#x0362;", "&#x0338;",
"&#x0337;", "&#x0361;", "&#x0489;"
)
/proc/zalgoify(var/message, var/up, var/mid, var/down)
if(!message)
return
var/new_string = ""
var/list/L = explode_string(message)
for (var/c in L)
new_string += c
for(var/j = 0, j < up, j++)
new_string += pick(zalgo_up)
for(var/j = 0, j < mid, j++)
new_string += pick(zalgo_mid)
for(var/j = 0, j < down, j++)
new_string += pick(zalgo_down)
return new_string
// REFACTOR - Cirrial
/proc/honk(var/string)
var/modded = ""
var/list/text_tokens = splittext(string, " ")
for(var/token in text_tokens)
modded += "HONK "
modded += "HONK!"
if(prob(15))
modded += " - HOOOOOONNNKKK!!!"
return modded
// FEATURE - Scots accent by Cirrial, who is english and knows fuck all about what he's doing
// NONE OF THE WORDS PASSED IN WILL HAVE PUNCTUATION AFTER THEM, JUST FOR FUTURE REFERENCE BECAUSE I AM A MORON
// to clarify: this is called for individual words, not for the full string
/proc/scots_parse(var/datum/text_roamer/R)
var/new_string = ""
var/used = 0
switch(R.curr_char)
if("e")
if(lowertext(R.next_char) == "d" && R.next_next_char == "")
new_string = "it"
used = 2
if("E")
if(lowertext(R.next_char) == "d" && R.next_next_char == "")
new_string = "IT"
used = 2
if("h")
if(R.prev_char == "")
new_string = "'"
used= 1
if("H")
if(R.prev_char == "")
new_string = "'"
used= 1
if("i")
if(R.prev_char == "" && R.next_char == "")
new_string = "ah"
used = 1
else if(R.prev_char == "" && R.next_char == "'")
new_string = "a"
used = 1
else if(lowertext(R.next_char) == "g" && lowertext(R.next_next_char) == "h" && lowertext(R.next_next_next_char) == "t")
new_string = "icht"
used = 4
if("I")
if(R.prev_char == "" && R.next_char == "")
new_string = "Ah"
used = 1
else if(R.prev_char == "" && R.next_char == "'")
new_string = "a"
used = 1
else if(lowertext(R.next_char) == "g" && lowertext(R.next_next_char) == "h" && lowertext(R.next_next_next_char) == "t")
new_string = "ICHT"
used = 4
if("l")
if(lowertext(R.next_char) == "d" && R.next_next_char == "")
new_string = "l"
used = 3
if("L")
if(lowertext(R.next_char) == "d" && R.next_next_char == "")
new_string = "L"
used = 3
if("n")
if((lowertext(R.next_char) == "d" || lowertext(R.next_char) == "g") && R.next_next_char == "")
new_string = "n'"
used = 2
if("N")
if((lowertext(R.next_char) == "d" || lowertext(R.next_char) == "g") && R.next_next_char == "")
new_string = "N'"
used = 2
if("o")
if(R.next_char == "")
new_string = "oa"
used = 1
if(lowertext(R.next_char) == "w" && R.next_next_char == "")
new_string = "a"
used = 2
if(lowertext(R.next_char) == "u")
new_string = "oo"
used = 2
if("O")
if(R.next_char == "")
new_string = "OA"
used = 1
if(lowertext(R.next_char) == "w" && R.next_next_char == "")
new_string = "A"
used = 2
if("y")
if(R.next_char == "")
new_string = "ie"
used = 1
if("Y")
if(R.next_char == "")
new_string = "IE"
used = 1
if(new_string == "")
new_string = R.curr_char
used = 1
var/datum/parse_result/P = new/datum/parse_result
P.string = new_string
P.chars_used = used
return P
// english key, scots value
// not extensive, probably room for improvement
// http://www.cs.stir.ac.uk/~kjt/general/scots.html
// https://sco.wikipedia.org/wiki/Wikipedia:RRSSC_Common_wordleet_(Inglis_ti_Scots)
// http://mudcat.org/scots/display_all.cfm
// this list got too big to maintain as a list literal, so now it lives in strings/language/scots.txt
/proc/scotify(var/string) // plays scottish music on demand, harr harr i crack me up (shoot me)
// at hufflaw's request
if(prob(1) && prob(1))
string += " You just made an enemy for life!"
var/list/tokens = splittext(string, " ")
var/list/modded_tokens = list()
var/regex/punct_check = regex("\\W+\\Z", "i")
for(var/token in tokens)
// check to see if we can just swap out the token
var/modified_token = ""
var/original_word = ""
var/punct = ""
var/punct_index = findtext(token, punct_check)
if(punct_index)
punct = copytext(token, punct_index)
original_word = copytext(token, 1, punct_index)
else
original_word = token
var/matching_token = strings("language/scots.txt", lowertext(original_word), 1)
if(matching_token)
modified_token = replacetext(original_word, lowertext(original_word), matching_token)
else // otherwise run it through the fallback roamer
var/datum/text_roamer/T = new/datum/text_roamer(original_word)
for(var/i = 0, i < length(original_word), i=i)
var/datum/parse_result/P = scots_parse(T)
modified_token += P.string
i += P.chars_used
T.curr_char_pos = T.curr_char_pos + P.chars_used
T.update()
modified_token += punct
modded_tokens += modified_token
var/modded = jointext(modded_tokens, " ")
if(prob(2))
modded += pick(" Och!"," Och aye the noo!"," Help ma Boab!"," Hoots!"," Micthy me!"," Get tae fuck!")
return modded
/proc/owo_parse(var/datum/text_roamer/R)
var/new_string = ""
var/used = 0
if((R.curr_char == "l" || R.curr_char == "r") && R.next_char != " ")
new_string = "w"
used = 1
if((R.curr_char == "L" || R.curr_char == "R") && R.next_char != " ")
new_string = "W"
used = 1
if(new_string == "")
new_string = R.curr_char
used = 1
var/datum/parse_result/P = new/datum/parse_result
P.string = new_string
P.chars_used = used
return P
//OwO whats this?
/proc/owotalk(var/string)
var/modded = ""
var/datum/text_roamer/T = new/datum/text_roamer(string)
if(prob(13))
modded += "rawr x3 "
if(prob(10))
modded += "whats this? "
if(prob(9))
modded += "owo "
if(prob(8))
modded += "uwu "
if(prob(3))
modded += "fucko boingo "
for(var/i = 0, i < length(string), i=i)
var/datum/parse_result/P = owo_parse(T)
modded += P.string
i += P.chars_used
T.curr_char_pos = T.curr_char_pos + P.chars_used
T.update()
if(prob(15))
modded += " :3c"
if(prob(13))
modded += "~"
if(prob(10))
modded += " uwu"
if(prob(11))
modded += " owo"
return modded
/proc/tabarnak(var/string)
var/modded = ""
var/datum/text_roamer/T = new/datum/text_roamer(string)
for(var/i = 0, i < length(string), i=i)
var/datum/parse_result/P = tabarnak_parse(T)
modded += P.string
i += P.chars_used
T.curr_char_pos = T.curr_char_pos + P.chars_used
T.update()
if(prob(5))
modded += " Tabarnak!"
if(prob(3))
modded += " Calisse de merde."
if(prob(3))
modded += " You dum-h'ass!"
if(prob(2))
modded += " Saint-simonac de viarge!"
if(prob(2))
modded += " Mon hosti d'con."
if(prob(1))
modded += " Hon Hon Hon. :3"
return modded
/proc/tabarnak_parse(var/datum/text_roamer/R)
var/new_string = ""
var/used = 0
switch(R.curr_char)
if("c")
if(R.next_char == "h")
new_string = "sh"
used = 2
if("C")
if(R.next_char == "H")
new_string = "SH"
used = 2
if("f")
if(R.prev_char == " " || R.next_char == " ")
new_string = "ef"
used = 1
if("F")
if(R.prev_char == " " || R.next_char == " ")
new_string = "EF"
used = 1
if("s")
if(R.next_char == "t")
new_string = "ss"
used = 2
if("S")
if(R.next_char == "T")
new_string = "SS"
used = 2
if("t")
if(R.next_char == "i" && R.next_next_char == "o" && R.next_next_next_char == "n")
new_string = "sion"
used = 4
else if(R.next_char == "h" && R.next_next_char == "e" && R.next_next_next_char == " ")
new_string = "le"
used = 3
else if(R.next_char == "h" && (R.next_next_char == " " || R.next_next_char == "," || R.next_next_char == "." || R.next_next_char == "-"))
new_string = "t" + R.next_next_char
used = 3
else if(R.next_char == "s")
new_string = "ze"
used = 1
else if(R.next_char == " ")
new_string = "tte"
used = 1
if("T")
if(R.next_char == "I" && R.next_next_char == "O" && R.next_next_next_char == "N")
new_string = "SION"
used = 4
else if(R.next_char == "H" && R.next_next_char == "E" && R.next_next_next_char == " ")
new_string = "LE"
used = 3
else if(R.next_char == "H" && (R.next_next_char == " " || R.next_next_char == "," || R.next_next_char == "." || R.next_next_char == "-"))
new_string = "T" + R.next_next_char
used = 3
else if(R.next_char == "S")
new_string = "ZE"
used = 1
else if(R.next_char == " ")
new_string = "TTE"
used = 1
if("o")
if (R.next_char == "w" && (R.prev_char != " " || R.next_next_char != " "))
new_string = "how"
used = 2
else if (R.prev_char == " " && R.next_char != " ")
new_string = "ho"
used = 1
else if(R.next_char == " " && R.prev_char == " ")
new_string = "crisse"
used = 1
if("O")
if (R.next_char == "W" && (R.prev_char != " " || R.next_next_char != " "))
new_string = "HOW"
used = 2
else if (R.prev_char == " " && R.next_char != " ")
new_string = "HO"
used = 1
else if(R.next_char == " " && R.prev_char == " ")
new_string = "ZUT!"
used = 1
if("i")
if(R.prev_char == " ")
new_string = "hi"
used = 1
if("I")
if(R.prev_char == " ")
new_string = "HI"
used = 1
if("e")
if (R.next_char != " " && R.prev_char == " ")
new_string = "he"
used = 2
else if(R.next_char == " " && R.prev_char == " ")
new_string = "oeuf"
used = 1
if("E")
if (R.next_char != " " && R.prev_char == " ")
new_string = "HE"
used = 2
else if(R.next_char == " " && R.prev_char == " ")
new_string = "OEUF"
used = 1
if("a")
if(R.prev_char == " ")
new_string = "ha"
used = 1
else if (R.next_char == "u")
new_string = "o"
used = 2
else if (R.next_char == "n")
new_string = "hann"
used = 2
if("A")
if(R.prev_char == " ")
new_string = "HA"
used = 1
else if (R.next_char == "U")
new_string = "O"
used = 2
else if (R.next_char == "N")
new_string = "HANN"
used = 2
if("h")
if (lowertext(R.next_char) == "o" && lowertext(R.next_next_char) == "n" && lowertext(R.next_next_next_char) == "k")
new_string ="hon hon hon!"
used = 4
else if(R.prev_char == " " || R.curr_char_pos == 1)
new_string = "'"
used = 1
if("H")
if (lowertext(R.next_char) == "o" && lowertext(R.next_next_char) == "n" && lowertext(R.next_next_next_char) == "k")
new_string ="Hon Hon Hon!"
used = 4
else if(R.prev_char == " " || R.curr_char_pos == 1)
new_string = "'"
used = 1
if(new_string == "")
new_string = R.curr_char
used = 1
var/datum/parse_result/P = new/datum/parse_result
P.string = new_string
P.chars_used = used
return P
/proc/mufflespeech(var/string)
var/modded = ""
var/datum/text_roamer/T = new/datum/text_roamer(string)
for(var/i = 0, i < length(string), i=i)
var/datum/parse_result/P = mufflespeech_parse(T)
modded += P.string
i += P.chars_used
T.curr_char_pos = T.curr_char_pos + P.chars_used
T.update()
return modded
/proc/mufflespeech_parse(var/datum/text_roamer/R)
var/new_string = ""
var/used = 0
switch(R.curr_char)
if("q", "t", "k")
new_string = "p"
used = 1
if("w","s","z","c")
new_string = "h"
used = 1
if("e", "y", "i")
new_string = "f"
used = 1
if("u", "o","a","d","g","j","l","x","v","b")
new_string = "m"
used = 1
if("Q", "T", "K")
new_string = "P"
used = 1
if("W","S","Z","C")
new_string = "H"
used = 1
if("E", "Y", "I")
new_string = "F"
used = 1
if("U", "O","A","D","G","J","L","X","V","B")
new_string = "M"
used = 1
if(new_string == "")
new_string = R.curr_char
used = 1
var/datum/parse_result/P = new/datum/parse_result
P.string = new_string
P.chars_used = used
return P