mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-07-19 12:05:59 +01:00
Adds the ability for get_callproc_returnval() to spot assoc lists
This commit is contained in:
@@ -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>"
|
||||
|
||||
Reference in New Issue
Block a user