LuaTile

class LuaTile - sort
collides_with(layer) → boolean What type of things can collide with this tile?
order_deconstruction(force, player) → LuaEntity Orders deconstruction of this tile by the given force.
cancel_deconstruction(force, player) Cancels deconstruction if it is scheduled, does nothing otherwise.
name :: string [R] Prototype name of this tile.
prototype :: LuaTilePrototype [R]
position :: Position [R] The position this tile references.
hidden_tile :: string (optional) [R]
valid :: boolean [R] Is this object valid?
help() → string All methods, and properties that this object supports.

A single "square" on the map.

collides_with(layer) → boolean

What type of things can collide with this tile?

Parameters
Example
Check if the character would collide with a tile
game.player.print(tostring(game.player.surface.get_tile(1, 1).collides_with("player-layer")))
order_deconstruction(force, player) → LuaEntity

Orders deconstruction of this tile by the given force.

Parameters
force :: ForceSpecification: The force whose robots are supposed to do the deconstruction.
player :: PlayerSpecification (optional): The player to set the last_user to if any.
Return value
The deconstructible tile proxy created if any or nil.
cancel_deconstruction(force, player)

Cancels deconstruction if it is scheduled, does nothing otherwise.

Parameters
force :: ForceSpecification: The force who did the deconstruction order.
player :: PlayerSpecification (optional): The player to set the last_user to if any.
name :: string [Read-only]

Prototype name of this tile. E.g. "sand-3" or "grass-2".

prototype :: LuaTilePrototype [Read-only]

position :: Position [Read-only]

The position this tile references.

hidden_tile :: string (optional) [Read-only]