ID:136827
 
It would be the same as types of, but would have the names

Say if I wanted to pick and item of obj/item

obj/item
test1
name = "hobo"
test2
name = "super hobo"

world
New()
..()
for(var/types in typesof(/obj/item) - /obj/item)
itemlist += types
var/list/itemlist = new()

mob
var/list/test = new()
Login()
..()
var/temp = input("Which?")in list("Items")
switch(temp)
if("Items") test = itemlist
temp = input("Which ?") in namesof(test)
new temp(usr)


So that would instead of using typesof() you could use namesof()

This is the output with the typesof()

/obj/item/test1
//blah

This would be the output with the namesof()
hobo (/obj/item/test1)
super hobo//blah

-ST
proc/namesof(var/path = /atom)
var/list/names = list()
for(var/i in typesof(path))
var/a = new i (null)
names.Add(a.name)
del a
return names

Usage:
client
Topic(href)
if(copytext(href,1,2) == "*")
for(var/i in typesof(/atom))
var/a = new i (null)
if(copytext(href,2,0) == a.name)
del a
new i (mob.x,mob.y,mob.z)
mob/verb/MakeObject()
for(var/i in namesof(/obj))
var/a = new i (null)
src << "<a href=?*[a.name]>[a.name]</a>"


This might not actually work (it's untested,) but you should get the point. Good luck!
-LoW
In response to Lord of Water
This is a feature request !!!