ID:1373524
 
(See the best response by Kaiochao.)
Basically I'm creating a mapping tool for Pokemon Atom and what I'm doing is output every object (using "typesof") to a grid.

It seems I'm unable to do this with turfs? Is there any possible way of doing so? I don't want to replace my turfs with objects.



What I'm currently doing.
mob
player
Login()
src.out_types(list_types(/obj/OUTDOOR)) //If i try this with "/turf" it won't work!
proc
list_types(stype)
return typesof(stype) - stype// Does nothing besides removing /obj from the list.
mob
proc
out_types(list/types)
src<<output(null,"Main.Mapping")
for(var/i in 1 to types.len step 1)
var/thisPath = types[i]
src.Objects += new thisPath
src << output(src.Objects[i], "Main.Mapping:1,[i]")

Are you getting any runtime errors, like "bad loc" or something?
Yeah I'm getting "bad loc" since their turfs and I can't change their "loc" var. I'm not really sure why it shows that when I'm not even changing it's loc.
In response to Kidpaddle45
Best response
You're going to have to use a movable atom to represent the turfs in the list. As for copying the turf's appearance onto the intermediate object, good luck with that. I'd put it on some extra z-level or something.

Since turfs are tiles, they can't exist anywhere that isn't on the map.
Nuuuu! I see. Well a workaround that was suggested by Lige was to have a var called "creates" and set every obj to what I want it to create ex:
obj
Rock
icon = 'Icons/Rock.dmi'
density = 1
creates = /turf/Rock


That's just boring...and will take awhile to do with the 50+ turfs I got. I was hoping I'd find something faster but ok I guess! Thanks for the help and the quick replies!
In response to Kidpaddle45
If you use the same naming convention as the turfs, it can be made simpler.

proc/some_proc()
var/path = text2path("/turf/[the obj name]")
... other code
hmm not all the turfs follow the same convention but renaming some of them would be a lot faster!

Thanks Neimo.
You could still incorporate the creates var idea - but only use it if it's a special case, so you don't have to rename everything, especially if they have different paths.