From e2aab5c1a53bebfd2c882acc539fc2b74c6122a6 Mon Sep 17 00:00:00 2001
From: kevinz000 <2003111+kevinz000@users.noreply.github.com>
Date: Fri, 12 Jun 2020 18:01:53 -0700
Subject: [PATCH] css is really hard folks
---
code/modules/admin/verbs/SDQL2/SDQL_2.dm | 22 +++++++++++++++-------
1 file changed, 15 insertions(+), 7 deletions(-)
diff --git a/code/modules/admin/verbs/SDQL2/SDQL_2.dm b/code/modules/admin/verbs/SDQL2/SDQL_2.dm
index 6977735d54..4bb0c7d76d 100644
--- a/code/modules/admin/verbs/SDQL2/SDQL_2.dm
+++ b/code/modules/admin/verbs/SDQL2/SDQL_2.dm
@@ -694,8 +694,7 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/SDQL2_VV_all, new(null
* Limit imposed by callers should be around 10000 objects
* Seriously, if you hit those limits, you're doing something wrong.
*/
-/datum/SDQL2_query/proc/SDQL_print(datum/object, list/text_list, print_nulls = TRUE, recursion = 0, linebreak = TRUE)
- text_list += ""
+/datum/SDQL2_query/proc/SDQL_print(datum/object, list/text_list, print_nulls = TRUE, recursion = 1, linebreak = TRUE)
if(recursion > 50)
text_list += "RECURSION LIMIT REACHED."
if(is_object_datatype(object))
@@ -719,15 +718,25 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/SDQL2_VV_all, new(null
else
text_list += " in nullspace"
else // lists are snowflake and get special treatment.
- text_list += "/list [REF(object)] \["
+ text_list += "/list [REF(object)] \[
"
var/list/L = object
if(length(L))
- var/lastkey = L[length(L)]
for(var/key in object)
- SDQL_print(key, text_list, TRUE, recursion + 1, FALSE)
+ if(islist(key))
+ text_list += ""
+ SDQL_print(key, text_list, TRUE, recursion + 1, FALSE)
+ text_list += ""
+ else
+ SDQL_print(key, text_list, TRUE, recursion, FALSE)
if(IS_VALID_ASSOC_KEY(key) && !isnull(L[key]))
+ var/value = L[key]
text_list += " --> "
- SDQL_print(L[key], text_list, TRUE, recursion + 1, FALSE)
+ if(islist(value))
+ text_list += ""
+ SDQL_print(value, text_list, TRUE, recursion + 1, FALSE)
+ text_list += ""
+ else
+ SDQL_print(value, text_list, TRUE, recursion, FALSE)
text_list += "
"
text_list += "\]"
else
@@ -740,7 +749,6 @@ GLOBAL_DATUM_INIT(sdql2_vv_statobj, /obj/effect/statclick/SDQL2_VV_all, new(null
text_list += "NUM: [object]"
else
text_list += "UNKNOWN: [object]"
- text_list += ""
if(linebreak)
text_list += "
"