ID:267441
 
var/list/buildtypes = typesof(/obj/door)

used in corresponding with
mob/Stat()
statpanel("Build")
stat(buildtypes)
gives and empty stat panel......shouldnt it show the doors?
Magnus VI wrote:
var/list/buildtypes = typesof(/obj/door)
used in corresponding with
mob/Stat()
statpanel("Build")
stat(buildtypes)
gives and empty stat panel......shouldnt it show the doors?

Negatory. A type path is not an actual object, so calling stat() with it won't show the icon and name like you seem to be trying to do.

You can however make a temporary obj for every buildable item, and keep track of those in a list.
obj/buildicon
var/path

New(dummyloc, typepath)
path = typepath
name = "[path]"
// strip out slashes; change "/obj/door/wood" to just "wood"
var/index = findtext(name, "/")
while(index)
name = copytext(name, index+1)
index = findtext(name, "/")
overlays += typepath

Click()
usr.buildtype = path

var/list/buildcache = new

proc/GetBuildIcon(typepath)
. = buildcache[typepath]
if(!.)
. = new /obj/buildicon(null, typepath)
buildicon[typepath] = .

Lummox JR