ID:167511
 
I've racked my mind for quite a bit on how to do some layering in the project I'm working on.
(The semi-isometric one I posted about way back when)
Problem is I'm trying to make it so I won't have to make 5 different icon_states for each layer (1-9) Grass, water, sand, etc..
I got to thinking why not place a blank turf over top of the turfs I want to change and then , using New(), have it check those turfs and change; something like:

New()
..()
spawn(5)
for(var/turf/T in src)
src.icon_state= T.icon_state
if(src.turf type = "grass")// blah blah Add some colouring.

I heard that if you lay a turf over another turf , it doesn't count as a turf, only an overlay or something like that? Any input?
Mechanios wrote:
I heard that if you lay a turf over another turf , it doesn't count as a turf, only an overlay or something like that?

Only in the map editor. Otherwise, it'll just delete the existing turf on the location.

~~> Unknown Person
The topmost turf is counted as the actual turf, and the rest as overlays (Or underlays... since they're under it..) and no longer exist as turfs outside of the map editor. You would have to look through their overlays, I think.
In response to DarkCampainger (#2)
Ah. If I get something working I'll post it on here.

Hey! what if I placed an inviisble atom or something? and then see if the turf is in the obj/mobs contents? Then change the object as needed?
In response to Mechanios (#3)
A turf will never be in the contents of a mob or obj. Never. The turf will be their loc though.
In response to Loduwijk (#4)
So I could do
<dm>for(var/turf/T in src.loc)<dm> then? (under New()) for the obj or mob) and then set everyhting?
In response to Mechanios (#5)
No, because there is only one turf, and it is the loc.
You should be able to do it under turf/New()