ID:267704
 
Id like to know if it is possible to show all of the users contents in a switch() proc. Such as a person asks wha you have, and then it lists each item, seperately. I know its sort of hard to understand, if you need a better explanation just ask, if it is possible, please post it. Thanks for any help at all, The Conjuror.
well, i THINK i know what you want...

mob/verb/Check_Contents()
var/obj/item = input("View what item?","Items") in usr.contents
usr << "[item.name]:[item.desc]"

That will simply show everything you own, in an input box, and when you select an item from the list, it tells you its name, and desc(optional, you can do whatever with it really)

Basically, so you know what to do, for the input statement, its: in usr.contents , because usr.contents is a list, and at the end of an input, you can chose to have the data come from a list. Therefore, you put: in (list name)
[ in our case, its usr.contents ]
In response to JackGuy
Just what the doctor ordered! Thanks JackGuy.
In response to JackGuy
For someone i have never heard of, you answered his question quite well, good job.
In response to The Conjuror
Can this also be done with mini-icons as well like when you put usr.contents in a statpanel? Basically to pop up a graphical interface to select loot from a chest persay.