Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STAGING-SIERRA: Xenopanel fixes #2060

Merged
merged 1 commit into from
Mar 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions mods/ex666_ecosystem/code/xeno_whitelist/xeno_webhook.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
22 changes: 11 additions & 11 deletions mods/ex666_ecosystem/code/xeno_whitelist/xeno_whitelist.dm
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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()
Expand All @@ -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)
Expand All @@ -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.")
Expand Down