ID:145262
 
Code: Simple Multi-tile code.
world
New()
..()
for(var/turf/Tree/T in world)
var/obj/o = new/obj/Treeoverlay
o.loc = T.loc
continue

turf
Tree
icon = 'Tree.png'
density = 1
obj
Treeoverlay
icon = 'Tree1.png'
layer = 7
pixel_y=32


Problem description: Only one tree gets the overlay above it.

I became pretty annoyied so you can see I tried to use World for it.

Yeah, euh, delete the continue.
In response to Mysame
No effect.
Try o.loc = T
In response to Justin B
That works good.
In response to RedlineM203
I found that, when putting something (an object, mainly) on turf.loc, it goes WRROOOONNNGGGG. I need to do locate(turf.x,turf.y,turf.z).
In response to Mysame
Well, the turf contents is what you really want I think. T is inside the turf, and everything has to enter the contents. I remember someone explaining it awhile ago.
In response to Mysame
Mysame wrote:
I found that, when putting something (an object, mainly) on turf.loc, it goes WRROOOONNNGGGG. I need to do locate(turf.x,turf.y,turf.z).

You can use turf.loc and it works just fine, it's just that turf.loc is not the appropriate object in this case. A turf's loc is an area. If you want to move something to the turf, just use the turf itself, not its loc.

atom/movable.loc will always be another atom/movable, a turf, or null
turf.loc will be an area
In response to Loduwijk
<code> turf/Tree icon='Tree.png' density=1 New() var/obj/Treeoverlay/o=new(src.loc) return ..() obj/Treeoverlay icon='Tree1.png' layer=7 pixel_y=32 </code>

This would work just as well and have the same effect.