ID:267055
 
Hey,
Just needed some help with areas. What Im trying to do is make my 'Copy Map' proc able to copy areas as well as turf||obj.
Ive got everything done up to the part where I replace the old areas that already existed with new areas.
I know I cant simply write over them like I do with turfs.
-DogMan
Dog Man wrote:
Hey,
Just needed some help with areas. What Im trying to do is make my 'Copy Map' proc able to copy areas as well as turf||obj.
Ive got everything done up to the part where I replace the old areas that already existed with new areas.
I know I cant simply write over them like I do with turfs.

SwapMaps is capable of handling this for you.
If all you need to do is copy the map, you can create a new swapmap datum corresponding to the compiled-in map, save, and then use the saved map as a template for a new one:
var/swapmap/template = new("template_test",locate(1,1,5),locate(100,100,5))
template.Save()
var/swapmap/copy = SwapMaps_CreateFromTemplate("template_test")
// give the copy an id if you want, so it will be savable
copy.SetID("template_copy")

Lummox JR
In response to Lummox JR
Well Id rather make it myself then use a libary (I guess I just prefere knowing exactly what my code does).
Thanks anyway though. I'll look at SwapMaps too see how you did it. Hopefully that will give me enough of a clue on how to do it.
-DogMan