Module necro.game.tile.Tile

Functions

clearLevel () Clears the level, removing all tiles and setting the map size to 0x0
exists (x, y) Checks if the specified tile is not empty.
get (x, y) Returns the tile at the specified position.
getAtIndex (index) Returns the tile at the specified numeric index.
getInfo (x, y) Returns the tile info at the specified position.
getLevelBounds () Returns the level boundaries (x, y, width, height)
getLevelPosition ()
getLevelSize ()
isInBounds (x, y)
isSolid (x, y) Checks if the tile at the specified position is solid.
reduceCoordinates (x, y) Attempts to reduce the coordinates of the specified tile into a single number.
set (x, y, id) Places a tile at the specified position.
setLevelBounds (x, y, width, height, clearLevel) Sets the level boundaries.
setType (x, y, type) Changes the type of the tile at the specified position without changing its zone.
unwrapCoordinates (value) Yields the X and Y position represented by the specified reduced coordinate value.


Functions

clearLevel ()
Clears the level, removing all tiles and setting the map size to 0x0
exists (x, y)
Checks if the specified tile is not empty.

Parameters:

  • x
  • y
get (x, y)
Returns the tile at the specified position.

Parameters:

  • x
  • y
getAtIndex (index)
Returns the tile at the specified numeric index.

Parameters:

  • index
getInfo (x, y)
Returns the tile info at the specified position.

Parameters:

  • x
  • y
getLevelBounds ()
Returns the level boundaries (x, y, width, height)
getLevelPosition ()
getLevelSize ()
isInBounds (x, y)

Parameters:

  • x
  • y
isSolid (x, y)
Checks if the tile at the specified position is solid.

Parameters:

  • x
  • y
reduceCoordinates (x, y)
Attempts to reduce the coordinates of the specified tile into a single number. Returns nil if the coordinates fall out of level range.

Parameters:

  • x
  • y
set (x, y, id)
Places a tile at the specified position.

Parameters:

  • x
  • y
  • id
setLevelBounds (x, y, width, height, clearLevel)
Sets the level boundaries. Optionally clears the level.

Parameters:

  • x
  • y
  • width
  • height
  • clearLevel
setType (x, y, type)
Changes the type of the tile at the specified position without changing its zone.

Parameters:

  • x
  • y
  • type
unwrapCoordinates (value)
Yields the X and Y position represented by the specified reduced coordinate value.

Parameters:

  • value
generated by LDoc 1.4.6