Override this to return TRUE if you want this atom to be saved to spaces.
FALSE if you want it to be ignored, not duplicated, not saved.
Defaults to FALSE.
A space of turfs on the map.
Map data can be duplicated to anywhere.
Spaces can be saved and loaded via savefiles.
Create from two corner turfs
Create from a list containing turfs
Create by copying another space's turfs
LowerCorner() (turf at min coordinates)
UpperCorner() (turf at max coordinates)
Turfs() (turfs in the space)
Width() (x tile span)
Height() (y tile span)
Depth() (z tile span)
Write(savefile/save) (called by savefile << space)
Read(savefile/save) (called by savefile >> space)
Copy() (copy data from the map in preparation for paste)
Paste(turf/lower) (paste copied data)
Duplicate(turf/lower) (copy then paste)
Locate(x, y, z) (get a turf by relative coordinates)
Contains(atom/atom) (check if an atom is in the space)
FindWithTag(tag) (get the first atom in the space with the matching tag)
Contains and allocates new spaces to avoid overlapping.
Allocating new spaces
Allocate(width, height, depth)
This lets you create a new space of a given size that doesn't overlap any spaces in a universe. This is useful when loading spaces from savefiles or creating new empty spaces where you don't care where they end up, as long as they're not overlapping any other spaces in this universe.
Opening and Closing spaces
universe -= space
universe += space
Spaces allocated in a universe are closed off to that universe.
Closed spaces won't be overlapped by allocation.
Open spaces can be overlapped.
Pasting loaded spaces
When a space is loaded from a savefile, it doesn't exist on the map yet, but it contains copied data that can be pasted into the world. If you don't care where the space ends up, you can paste it in a universe for it to be pasted anywhere in the world without overlapping any closed spaces.
Represents a place in the file system to store spaces by name.
Create at a path
New(path = "Spaces")
Spaces will be saved and loaded by name relative to this path.
Lookup(name) (get a space by name)
NameOf(space/space) (get a name by space)
Saving and Loading
CanLoad(name) (does the file exist?)
Filename(name) (path to the savefile for this name)
Savefile(name) (the /savefile instance for this name)