ID:139773
 
Code:
var/swapmap/M = new(idd,10,10,1)
for(var/turf/T in block(locate(M.x1,M.y1,M.z1),locate(M.x2,M.y2,M.z2)))
for(var/atom/movable/O in T) del(O)
new/turf(T)


Problem description:
Okay, dunno if this is the right place, but basically, when I try to create a Swap Map (with swapmap_New proc) that's less then the x/y of my current world, it creates the map, -but-, it ends up being the same size as the regular map, with just the smaller swap map inside. Can anything be done?
You may be deleting everything on the map level(or shrinking the map level), and then creating the new map. Go through your code piece by piece.
In response to OrangeWeapons
OrangeWeapons wrote:
You may be deleting everything on the map level(or shrinking the map level), and then creating the new map. Go through your code piece by piece.

Huh? I think you misunderstood. I have a 20by20 test map, and tried to make a 10by10 swap map. But the Swap Map is 20by20.
In response to Asellia
No, I'm saying what may be happening is that your X and Y could be downsized (or blank, dense atoms are being created around the area) when you create a new swapmap.
In response to OrangeWeapons
I'm so confused.

I WANT them to be 10by10, smaller then the rest of the real maps, but they're still 20by20. Why would x and y downsizing make them BIGGER?
In response to Asellia
Asellia wrote:
Huh? I think you misunderstood. I have a 20by20 test map, and tried to make a 10by10 swap map. But the Swap Map is 20by20.

The way byond works, each z-level is the same width and height. The swapmaps documentation talks about putting a border around your swapmaps so that players can't just walk from one to another on the same z-level.
In response to Skyspark
Skyspark wrote:
Asellia wrote:
Huh? I think you misunderstood. I have a 20by20 test map, and tried to make a 10by10 swap map. But the Swap Map is 20by20.

The way byond works, each z-level is the same width and height. The swapmaps documentation talks about putting a border around your swapmaps so that players can't just walk from one to another on the same z-level.

I lost the documentation, where can I find it?
In response to Asellia
Asellia wrote:
I lost the documentation, where can I find it?

It's included as 'swapmaps.html' within the library itself. Here's the relevant quote from the docs:

When a map is created or loaded, the library will try to find a place to fit it among all the other loaded maps. A swapmap can have smaller x and y dimensions than your world, so it's your responsibility to add a boundary to the swapmap if you don't want people crossing from one to the other. For your convenience, there are procs included that will help you build on your map quickly.