Merge pull request #10813 from Ghommie/Ghommie-cit540

Unicode support updates from tgstation.
This commit is contained in:
kevinz000
2020-02-02 01:47:24 -07:00
committed by GitHub
143 changed files with 891 additions and 903 deletions
@@ -13,7 +13,7 @@ GLOBAL_LIST_EMPTY(loadout_whitelist_ids)
LAZYINITLIST(GLOB.loadout_whitelist_ids)
var/list/file_lines = world.file2list(loadout_config)
for(var/line in file_lines)
if(!line || findtextEx(line,"#",1,2))
if(!line || line[1] == "#")
continue
var/list/lineinfo = splittext(line, "|")
var/lineID = lineinfo[1]
@@ -21,7 +21,7 @@ GLOBAL_LIST_EMPTY(loadout_whitelist_ids)
var/sublinetypedef = findtext(subline, "=")
if(sublinetypedef)
var/sublinetype = copytext(subline, 1, sublinetypedef)
var/list/sublinecontent = splittext(copytext(subline, sublinetypedef+1), ",")
var/list/sublinecontent = splittext(copytext(subline, sublinetypedef+ length(sublinetypedef)), ",")
if(sublinetype == "WHITELIST")
GLOB.loadout_whitelist_ids["[lineID]"] = sublinecontent
@@ -13,18 +13,18 @@ GLOBAL_LIST(custom_item_list)
GLOB.custom_item_list = list()
var/list/file_lines = world.file2list(custom_filelist)
for(var/line in file_lines)
if(length(line) == 0) //Emptyline, no one cares.
if(!length(line)) //Emptyline, no one cares.
continue
if(copytext(line,1,3) == "//") //Commented line, ignore.
if(copytext(line,1,3) == "//") //Commented line, ignore. 3 == length("//") + 1
continue
var/ckey_str_sep = findtext(line, "|") //Process our stuff..
var/char_str_sep = findtext(line, "|", ckey_str_sep+1)
var/job_str_sep = findtext(line, "|", char_str_sep+1)
var/item_str_sep = findtext(line, "|", job_str_sep+1)
var/char_str_sep = findtext(line, "|", ckey_str_sep + length(ckey_str_sep))
var/job_str_sep = findtext(line, "|", char_str_sep + length(char_str_sep))
var/item_str_sep = findtext(line, "|", job_str_sep + length(job_str_sep))
var/ckey_str = ckey(copytext(line, 1, ckey_str_sep))
var/char_str = copytext(line, ckey_str_sep+1, char_str_sep)
var/job_str = copytext(line, char_str_sep+1, job_str_sep)
var/item_str = copytext(line, job_str_sep+1, item_str_sep)
var/char_str = copytext(line, ckey_str_sep + length(ckey_str_sep), char_str_sep)
var/job_str = copytext(line, char_str_sep + length(char_str_sep), job_str_sep)
var/item_str = copytext(line, job_str_sep + length(job_str_sep), item_str_sep)
if(!ckey_str || !char_str || !job_str || !item_str || !length(ckey_str) || !length(char_str) || !length(job_str) || !length(item_str))
log_admin("Errored custom_items_whitelist line: [line] - Component/separator missing!")
if(!islist(GLOB.custom_item_list[ckey_str]))
@@ -42,7 +42,7 @@ GLOBAL_LIST(custom_item_list)
for(var/item_string in item_strings)
var/path_str_sep = findtext(item_string, "=")
var/path = copytext(item_string, 1, path_str_sep) //Path to spawn
var/amount = copytext(item_string, path_str_sep+1) //Amount to spawn
var/amount = copytext(item_string, path_str_sep + length(path_str_sep)) //Amount to spawn
//world << "DEBUG: Item string [item_string] processed"
amount = text2num(amount)
path = text2path(path)
@@ -10,9 +10,9 @@
spawn(300)
verbs += /client/verb/mentorhelp // 30 second cool-down for mentorhelp
msg = sanitize(copytext(msg,1,MAX_MESSAGE_LEN))
if(!msg) return
if(!mob) return //this doesn't happen
msg = sanitize(copytext_char(msg, 1, MAX_MESSAGE_LEN))
if(!msg || !mob)
return
var/show_char = CONFIG_GET(flag/mentors_mobname_only)
var/mentor_msg = "<span class='mentornotice'><b><font color='purple'>MENTORHELP:</b> <b>[key_name_mentor(src, 1, 0, 1, show_char)]</b>: [msg]</font></span>"
@@ -53,7 +53,7 @@
if (!C.is_mentor() && !is_mentor())
return
msg = sanitize(copytext(msg,1,MAX_MESSAGE_LEN))
msg = sanitize(copytext_char(msg, 1, MAX_MESSAGE_LEN))
if(!msg && is_mentor(whom))
to_chat(GLOB.admins | GLOB.mentors, "<span class='purple'>[src] has stopped their reply to [whom]'s mhelp.</span>")
return
@@ -5,8 +5,9 @@
if(!is_mentor())
return
msg = copytext(sanitize(msg), 1, MAX_MESSAGE_LEN)
if(!msg) return
msg = copytext_char(sanitize(msg), 1, MAX_MESSAGE_LEN)
if(!msg)
return
msg = emoji_parse(msg)
log_mentor("MSAY: [key_name(src)] : [msg]")