ID:1872952
 
(See the best response by Lummox JR.)
Code:
mob/proc/Add_Builds()
var/Q = typesof(/turf/Warp)
for(var/A in typesof(/turf) -(/turf/VOID) -(/turf/Roofs) -(/turf/Roofs/Metal_Roofs) -(/turf/Stairs) -(/turf/World) -(/turf/Walls) -(/turf/Walls/Metal_Walls) -(/turf/Walls/Dark_Brick_Walls) -(/turf/Floors) -(/turf/Floors/Metal_Floors) -(/turf/Floors/Grating_Floors) -(/turf/Floors/Stone_Floors) -(/turf/Floors/Wood_Floors) -(/turf/Floors/Luxury_Floors) -(/turf/Floors/Grass) -(/turf/Floors/Artistic_Floor) -(/turf/Floors/Bar_Floors) -(/turf/Floors/Water) - Q) if(A!=/turf)
if(prob(5)) sleep(1)
var/turf/C=new A(locate(1,1,1))
var/obj/Building/B=new/obj/Building
B.icon=C.icon
B.icon_state=C.icon_state
B.savetype="[C.type]"
B.name=C.name
contents.Add(B)
del(C)
var/turf/H
H += (/obj/Turfs/Props/Grave)
H += (/obj/Turfs/House_Items/Couch)
H += (/obj/Turfs/House_Items/Plant)
H += (/obj/Turfs/Props)
H += (/obj/Turfs/Props/Flower_Bed)
var/G = typesof(/obj/Turfs/House_Items/BookCases)
for(var/A in typesof(/obj/Turfs) -(/obj/Turfs/Edges) -(/obj/Turfs/Edges/One) -(/obj/Turfs/Edges/Two) -(/obj/Turfs/Edges/Three) -(/obj/Turfs/Edges/Four) -(/obj/Turfs/Edges/Five) -(/obj/Turfs/Edges/Six) -(/obj/Turfs/Plants) -(/obj/Turfs/Plants/Flowers) -(/obj/Turfs/Plants/Grain) -(/obj/Turfs/House_Items) -(/obj/Turfs/House_Items/Red_Table) -(/obj/Turfs/House_Items/Food) -(/obj/Turfs/House_Items/Food/Style_1) -(/obj/Turfs/House_Items/Food/Style_2) -(/obj/Turfs/House_Items/Bed) -(/obj/Turfs/House_Items/Bed/Style_1) -(/obj/Turfs/House_Items/Bed/Style_2) -(/obj/Turfs/House_Items/Bed/Style_3) -H -G) if(A!=/obj/Turfs)
//-(obj/Turfs/Props/Grave) -(obj/Turfs/House_Items/Couch) -(obj/Turfs/Plant) -(obj/Turfs/Props) -(obj/Turfs/Props/Flower_Bed)
if(prob(5)) sleep(1)
var/obj/Turfs/C=new A
var/obj/Building/B=new/obj/Building
B.icon=C.icon
B.icon_state=C.icon_state
B.savetype="[C.type]"
B.name=C.name
contents.Add(B)
del(C)


Problem description:
Basically, My game, makes a variable underneath a specific directory, which when you click on that directory, it does a specific thing. I'm trying to remove the blank directories such as obj/Turfs but, not remove the things underneath obj/Turfs. I'm trying to find a more clean and neater way to do the code above without breaking the system and etc.
Best response
You mean types, not directories, right?