Adds the ability for get_callproc_returnval() to spot assoc lists

This commit is contained in:
Remie Richards
2016-01-17 20:18:09 +00:00
parent 603bf4624c
commit 65a60d438c
+10 -3
View File
@@ -192,9 +192,16 @@ But you can call procs that are of type /mob/living/carbon/human/proc/ for that
var/list/returnedlist = returnval
. = "<font color='blue'>"
if(returnedlist.len)
. += "[procname] returned a list:"
for(var/elem in returnedlist)
. += "[elem]"
var/assoc_check = returnedlist[1]
if(istext(assoc_check) && (returnedlist[assoc_check] != null))
. += "[procname] returned an associative list:"
for(var/key in returnedlist)
. += "[key] = [returnedlist[key]]"
else
. += "[procname] returned a list:"
for(var/elem in returnedlist)
. += "[elem]"
else
. = "[procname] returned an empty list"
. += "</font>"