Require
To access this API from lua, you must call require:
Functions
This function takes a Region userdata as it's first parameter. It then takes non-zero-indexed numbers as x, y and z, which indicate a tile and a layer in the given region. Finally, it takes a zero-indexed number as v, indicating the new value for that tile's layer.
This calls Region::SetTile, and may throw an exception if x, y or z are out of bounds.
This function takes a Region userdata as it's first parameter. It then takes non-zero-indexed numbers as x, y and z, which indicate a tile and a layer in the given region. This returns the value at the given tile's layer.
This calls Region::GetTile, and may throw an exception if x, y or z are out of bounds.
This function takes a Region userdata as it's first parameter. It then takes non-zero-indexed numbers as x and y, which indicate a tile in the given region. Finally, it takes boolean as v, which indicates of the tile should be solid (true) or not (false).
This calls Region::SetSolid, and may throw an exception if x or y are out of bounds.
This function takes a Region userdata as it's first parameter. It then takes non-zero-indexed numbers as x and y, which indicate a tile in the given region. This returns whether the given tile is solid (true) or not (false).
This calls Region::GetSolid, and may throw an exception if x or y are out of bounds.
This function takes a Region userdata as it's parameter. It returns the x value of the given region. It is guaranteed to be a multiple of regionAPI.GetWidth().
This function takes a Region userdata as it's parameter. It returns the y value of the given region. It is guaranteed to be a multiple of regionAPI.GetHeight().
This returns the value of REGION_WIDTH. If a Region object is given as a parameter, it will instead return the width of that region (this is currently redundant).
This returns the value of REGION_HEIGHT. If a Region object is given as a parameter, it will instead return the height of that region (this is currently redundant).
This returns the value of REGION_DEPTH. If a Region object is given as a parameter, it will instead return the depth of that region (this is currently redundant).