Code update

This commit is contained in:
r4d6
2020-02-09 07:21:47 -05:00
parent e6398815b6
commit 9ba0a1b470
2 changed files with 4 additions and 5 deletions
@@ -58,18 +58,16 @@ GLOBAL_LIST_INIT(dwarf_last, world.file2list("strings/names/dwarf_last.txt")) //
if(message[1] != "*")
message = " [message]" //Credits to goonstation for the strings list.
var/list/dwarf_words = strings("dwarf_replacement.json", "dwarf") //thanks to regex too.
for(var/key in dwarf_words) //Theres like 1459 words or something man.
var/value = dwarf_words[key] //Thus they will always be in character.
if(islist(value)) //Whether they like it or not.
value = pick(value) //This could be drastically reduced if needed though.
message = replacetextEx(message, " [uppertext(key)]", " [uppertext(value)]")
message = replacetextEx(message, " [capitalize(key)]", " [capitalize(value)]")
message = replacetextEx(message, " [key]", " [value]") //Also its scottish.
if(prob(3))
message += pick(" By Armok!")
message += " By Armok!"
speech_args[SPEECH_MESSAGE] = trim(message)
//This mostly exists because my testdwarf's liver died while trying to also not die due to no alcohol.