ID:166754
 
Is there a way to replace this with another proc?

block(locate(T.x+1,T.y,T.z),locate(T.x+1,T.y,T.z))


basically I only need one turf, not a whole range, but I'm using "locate(/turf/) in block()". My whole proc is:

if(!locate(/turf/water2) in block(locate(T.x+1,T.y,T.z),locate(T.x+1,T.y,T.z)))


The code checks to see if there is a /turf/water2 to the right of previously-defined turf "T". I'm using this to automatically place coast icons on top of all water tiles that don't have other water tiles next to them, because I'm much too lazy to put them there manually.

Basically all I want is something to replace the stuff in the first DM tag because I couldn't find a better way to pick the turf to the right without using block().

Note though that the above code works fine, so if there is no other way that's okay also it's just ugly :(
Whenever you use the in operator in a more complicated expression, you need parentheses around it. In this case, the ! operator will mess with your results.

Lummox JR
You can use <code>get_step()</code>, since that returns a turf.

if(istype(get_step(src, WEST), /turf/water2))
...


~~> Unknown Person