Tile

Group
scene
Methods
15
Fields
None

Getting one

scene:tileAt(…)
client:getTopLevelWorldView():getSelectedSceneTile()
client:getScene():getTile(…)

Methods

MethodReturnsDescription
getWorldLocation()WorldPointIts world tile, on its plane (getPlane(): for the tile a bridge hides, the plane it is on, read from the tile itself).
getLocalLocation()LocalPointIts centre as a local point.
getSceneLocation()PointIts scene coordinates.
getPlane()numberIts plane (a bridge tile, moved down a plane, answers the plane it is on now; the tile it hides keeps the plane it was built on).
getRenderLevel()numberThe plane it renders on (where its heights come from): a bridge tile's original plane.
getGameObjects(){ n: number, [number]: GameObject? }The loc game objects on it, every one covering it, padded with nil to five slots.
getWallObject()WallObject?Its wall object, if any.
getDecorativeObject()DecorativeObject?Its decorative object, if any.
getGroundObject()GroundObject?Its ground object, if any.
getItemLayer()ItemLayer?Its item pile, if any items lie on it.
getGroundItems(){TileItem}?Its floor items, nil when there are none: the most valuable (the item layer's top) first; the rest in the client's value order, least val…
getBridge()Tile?The tile a bridge tile hides (the plane-0 tile the map load moved it over), else nil.
getSceneTilePaint()SceneTilePaint?Its flat paint (an underlay, or an overlay covering the whole tile), a SceneTilePaint: the colour of each corner, the texture, the minima…
getSceneTileModel()SceneTileModel?Its tile model, a SceneTileModel: the floor of a tile whose overlay has a shape (a slope, a corner or an edge piece), with its vertices,…
equals(any)booleanWhether other equals this Tile, as == answers it (false for a value of another class).

Returned by

MethodReturnsDescription
DecorativeObjectDespawned.getTileTileIts tile.
DecorativeObjectSpawned.getTileTileIts tile.
GameObjectDespawned.getTileTileIts origin tile.
GameObjectSpawned.getTileTileIts origin (south-west) tile.
GroundObjectDespawned.getTileTileIts tile.
GroundObjectSpawned.getTileTileIts tile.
ItemDespawned.getTileTileThe tile it lay on.
ItemQuantityChanged.getTileTileThe tile it lies on.
ItemSpawned.getTileTileThe tile it lies on.
Scene.getExtendedTiles{{{ n: number, [number]: Tile? }}}Every tile of the extended scene, [plane][x + 40][y + 40] (184 a side). The client builds no tiles past the 104-tile scene, so the ring a…
Scene.getTileTile?One tile, the one getTiles()[plane + 1][x + 1][y + 1] holds, at (plane, x, y) (0-based scene coordinates), or nil, without building t…
Scene.getTiles{{{ n: number, [number]: Tile? }}}Every tile, [plane][x][y] (1-based in Luau: getTiles()[plane + 1][x + 1][y + 1]), nil where there is none. The same array until the s…
SceneDomain.tileAtTile?What stands on one tile: the Tile of the top-level scene.
TileItem.getTileTileThe tile it lies on. The handle is keyed by it, so an item from scene:groundItems() can say where it is.
WallObjectDespawned.getTileTileIts tile.
WallObjectSpawned.getTileTileIts tile.
WorldView.getSelectedSceneTileTile?The tile under the mouse, on this world view's plane (getPlane()), or nil when the mouse is over none of its tiles. The client finds it…

Method details

getWorldLocation

getWorldLocation: (Tile) -> WorldPoint

Its world tile, on its plane (getPlane(): for the tile a bridge hides, the plane it is on, read from the tile itself).

getPlane

getPlane: (Tile) -> number

Its plane (a bridge tile, moved down a plane, answers the plane it is on now; the tile it hides keeps the plane it was built on).

getRenderLevel

getRenderLevel: (Tile) -> number

The plane it renders on (where its heights come from): a bridge tile's original plane.

getGameObjects

getGameObjects: (Tile) -> { n: number, [number]: GameObject? }

The loc game objects on it, every one covering it, padded with nil to five slots.

getGroundItems

getGroundItems: (Tile) -> {TileItem}?

Its floor items, nil when there are none: the most valuable (the item layer's top) first; the rest in the client's value order, least valuable first.

getBridge

getBridge: (Tile) -> Tile?

The tile a bridge tile hides (the plane-0 tile the map load moved it over), else nil.

getSceneTilePaint

getSceneTilePaint: (Tile) -> SceneTilePaint?

Its flat paint (an underlay, or an overlay covering the whole tile), a SceneTilePaint: the colour of each corner, the texture, the minimap colour and whether it is level. nil when it has none: no underlay or overlay, or an overlay shape, which has a SceneTileModel instead; also for a tile kept across a reload. Raises on a client whose table does not place the paint.

getSceneTileModel

getSceneTileModel: (Tile) -> SceneTileModel?

Its tile model, a SceneTileModel: the floor of a tile whose overlay has a shape (a slope, a corner or an edge piece), with its vertices, faces, and the faces' colours and texture ids. nil when it has none: a flat paint (getSceneTilePaint) or nothing built; also for a tile kept across a reload. A copy read when asked (the client never changes it). Raises on a client whose table does not place the model.

equals

equals: (Tile, any) -> boolean

Whether other equals this Tile, as == answers it (false for a value of another class).