From a52451ba249ee50a14d95e68ceb61889b77442b2 Mon Sep 17 00:00:00 2001 From: Dimach Date: Tue, 26 Mar 2024 02:46:24 +0000 Subject: [PATCH] Xenopanel fixes --- .../code/xeno_whitelist/xeno_webhook.dm | 4 ++-- .../code/xeno_whitelist/xeno_whitelist.dm | 22 +++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/mods/ex666_ecosystem/code/xeno_whitelist/xeno_webhook.dm b/mods/ex666_ecosystem/code/xeno_whitelist/xeno_webhook.dm index de1a9a4658e0c..e2376ded008c0 100644 --- a/mods/ex666_ecosystem/code/xeno_whitelist/xeno_webhook.dm +++ b/mods/ex666_ecosystem/code/xeno_whitelist/xeno_webhook.dm @@ -79,10 +79,10 @@ var/list/text = list("diff") for(var/race in check) text += race - fields[++length(fields)] = list( + fields += list(list( "name" = ckey2, "value" = "```[jointext(text, "\n")]```" - ) + )) if(length(fields)) desc["fields"] = fields .["embeds"] = list(desc) diff --git a/mods/ex666_ecosystem/code/xeno_whitelist/xeno_whitelist.dm b/mods/ex666_ecosystem/code/xeno_whitelist/xeno_whitelist.dm index 8df3438ea441a..d20f1609244d2 100644 --- a/mods/ex666_ecosystem/code/xeno_whitelist/xeno_whitelist.dm +++ b/mods/ex666_ecosystem/code/xeno_whitelist/xeno_whitelist.dm @@ -273,18 +273,18 @@ GLOBAL_DATUM_INIT(xeno_state, /datum/topic_state/admin_state/xeno, new) for(var/list/check in l) if(check["ckey"] == ckey) create = FALSE - newckey[++length(newckey)] = check + newckey += list(check) else if(findtext(check["ckey"], ckey, 1, length(ckey)+1)) - insort[++length(insort)] = check + insort += list(check) else - notinsort[++length(notinsort)] = check + notinsort += list(check) if(create) var/list/check = list() check["ckey"] = ckey for(var/race in lowerxenoname) check["NO"] += list(race) - newckey[++length(newckey)] = check + newckey += list(check) l.Cut() l.Add(newckey) @@ -369,7 +369,7 @@ GLOBAL_DATUM_INIT(xeno_state, /datum/topic_state/admin_state/xeno, new) a["race"] = unite[2] ckeys += list(a) if(!(unite[2] in racecheck)) - racecheck[++length(racecheck)] = unite[2] + racecheck += list(unite[2]) racecheck = sortList(racecheck) var/list/result = list() for(var/check in racecheck) @@ -399,7 +399,7 @@ GLOBAL_DATUM_INIT(xeno_state, /datum/topic_state/admin_state/xeno, new) // Если элемент есть в подлисте - вытаскиваем его повыше /proc/SortByRace(list/L, race = "ckey") if(!length(L)) - return + return list() L = sortByKey(L, "ckey") if(race && !(race == "ckey")) var/list/insort = list() @@ -408,13 +408,13 @@ GLOBAL_DATUM_INIT(xeno_state, /datum/topic_state/admin_state/xeno, new) var/list/notinsort = list() for(var/list/s in L) if(lowertext(race) in s["GRANT"]) - insort[++length(insort)] = s + insort += list(s) else if(lowertext(race) in s["REVOKE"]) - secondsort[++length(secondsort)] = s + secondsort += list(s) else if(lowertext(race) in s["YES"]) - tirhdsort[++length(tirhdsort)] = s + tirhdsort += list(s) else - notinsort[++length(notinsort)] = s + notinsort += list(s) L.Cut() L.Add(insort) L.Add(secondsort) @@ -426,7 +426,7 @@ GLOBAL_DATUM_INIT(xeno_state, /datum/topic_state/admin_state/xeno, new) /proc/ParseXenoWhitelist(list/l, list/allspecies) var/list/A = list() if(!length(l)) - return + return list() A = splittext(pick(l), " - ") if(length(A) >= 2) log_admin("Error: Alien Whitelist SQL usage has been turned on, but list wasn't reloaded.")