diff --git a/modular_citadel/code/modules/custom_loadout/read_from_file.dm b/modular_citadel/code/modules/custom_loadout/read_from_file.dm index 78124b0324..004757add4 100644 --- a/modular_citadel/code/modules/custom_loadout/read_from_file.dm +++ b/modular_citadel/code/modules/custom_loadout/read_from_file.dm @@ -18,13 +18,13 @@ GLOBAL_LIST(custom_item_list) 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 + 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/char_str_sep = findtext(line, "|", ckey_str_sep + length(line[ckey_str_sep])) + var/job_str_sep = findtext(line, "|", char_str_sep + length(line[char_str_sep])) + var/item_str_sep = findtext(line, "|", job_str_sep + length(line[job_str_sep])) var/ckey_str = ckey(copytext(line, 1, ckey_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) + var/char_str = copytext(line, ckey_str_sep + length(line[ckey_str_sep]), char_str_sep) + var/job_str = copytext(line, char_str_sep + length(line[char_str_sep]), job_str_sep) + var/item_str = copytext(line, job_str_sep + length(line[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 + length(path_str_sep)) //Amount to spawn + var/amount = copytext(item_string, path_str_sep + length(item_string[path_str_sep])) //Amount to spawn //world << "DEBUG: Item string [item_string] processed" amount = text2num(amount) path = text2path(path)