I'm trying to implement a system for swapping out a region of the map when the number of players in the region falls to zero. The cells occupied by the region would be flagged as unused, and could be used for another purpose. However, if a player wants to re-enter the swapped out region, it must be reloaded, and this will cause problems if the cells that it occupied have been re-used. It would be useful if saved turfs could be reloaded into different cells of the map.
I think that the best way to implement this would be to add three new vars to savefile:
/savefile
var/x = 1
var/y = 1
var/z = 1
The coordinates of turfs written to the savefile would be relative to the x, y and z vars of the savefile. These should probably be 1-based for compatibility with other uses of coordinates in DM i.e. the turf at [savefile.x,savefile.y,savefile.z] will be saved with coordinates [1,1,1].
When the turfs need to be reloaded into different cells, the savefile's x, y and z vars could be set to different values from those used to write the savefile. The coordinates of turfs read from the savefile would then be interpreted relative to the x, y and z vars to find the cell in which to recreate the turf.
ID:137242
Jan 14 2002, 10:37 am
|
|
Fortunately it's pretty easy to implement this yourself (I did it in the Way Old Days when savefiles were much harder), so I'm not sure Dantom should try to customize things like this until they do a complete reworking of the map functionality.