ID:168523
 
I'm trying to figure out how to go about copying the contents of a z level onto a new z level at run-time. Run-time map manipulation, however, is not something that I am at all familiar with.

Basically my problem lies with figuring out how to access the contents of a specific Z level...

Thanks for any help you can provide!

A simple for loop could do it. You just need to check what z level the objects would be in.

proc/manipulate()
for(var/atom/A)
if(A.z == 1) // if on the z level of 1
new A.type (locate(A.x, A.y, 2))
// create a new path type


If you have a big map, it would be laggy, though.

~~> Dragon Lord
In response to Unknown Person
Wow. DUH! on so many levels.

Thanks!
In response to Unknown Person
Perhaps he could use block() and specify the coordiates of one z level and loop through the atoms in there? You know, to reduce lag?
In response to CaptFalcon33035
The problem is, block() returns turfs. He most likely wants to copy all of the atoms in it.

~~> Dragon Lord
In response to CaptFalcon33035
Lag isn't really going to be a problem. For my purposes, map copying will be infrequent, and only used on small maps.