Appearance
sdk.tile
Unified static/live tile view. Reads only; actions belong to tools/path APIs.
lua
local M = require("sdk.tile")Constants
Lua 5.4 has no enums — these are integer (or string) fields on the module.
| Name | Value | Summary |
|---|---|---|
Tile | Tile | Tile class. |
new
function · new(x, y, z, opts)
Tile helper for one x,y,z.
at
alias · at = new
Same as new.
Alias
Same as new.
x
function · x: integer
Unified static/live tile snapshot. Check is_complete(part) before using a negative answer for safety decisions. in_protection_zone() is tri-state.
y
function · y: integer
Unified static/live tile snapshot. Check is_complete(part) before using a negative answer for safety decisions. in_protection_zone() is tri-state.
z
function · z: integer
Unified static/live tile snapshot. Check is_complete(part) before using a negative answer for safety decisions. in_protection_zone() is tri-state.
position
function · position: Position
Unified static/live tile snapshot. Check is_complete(part) before using a negative answer for safety decisions. in_protection_zone() is tri-state.
flags
function · flags: MapFlags
Unified static/live tile snapshot. Check is_complete(part) before using a negative answer for safety decisions. in_protection_zone() is tri-state.
state
function · state: 'walkable'|'blocked'|'unknown'
Unified static/live tile snapshot. Check is_complete(part) before using a negative answer for safety decisions. in_protection_zone() is tri-state.
cost
function · cost: number
Unified static/live tile snapshot. Check is_complete(part) before using a negative answer for safety decisions. in_protection_zone() is tri-state.
static_error
function · static_error: string
Unified static/live tile snapshot. Check is_complete(part) before using a negative answer for safety decisions. in_protection_zone() is tri-state.
items
function · items: ItemStack[]
Unified static/live tile snapshot. Check is_complete(part) before using a negative answer for safety decisions. in_protection_zone() is tri-state.
creatures
function · creatures: Player[]
Unified static/live tile snapshot. Check is_complete(part) before using a negative answer for safety decisions. in_protection_zone() is tri-state.
effects
function · effects: table[]
Unified static/live tile snapshot. Check is_complete(part) before using a negative answer for safety decisions. in_protection_zone() is tri-state.
completeness
function · completeness: TileCompleteness
Unified static/live tile snapshot. Check is_complete(part) before using a negative answer for safety decisions. in_protection_zone() is tri-state.
refresh
method · refresh(self: Tile): Tile
Unified static/live tile snapshot. Check is_complete(part) before using a negative answer for safety decisions. in_protection_zone() is tri-state.
Returns
| Type | Summary |
|---|---|
Tile | — |
is_complete
method · is_complete(self: Tile, part?: 'static'|'items'|'creatures'|'effects'|'complete'): boolean
Unified static/live tile snapshot. Check is_complete(part) before using a negative answer for safety decisions. in_protection_zone() is tri-state.
Parameters
| Name | Type | Summary |
|---|---|---|
part | 'static'|'items'|'creatures'|'effects'|'complete' | — |
Returns
| Type | Summary |
|---|---|
boolean | — |
has_item
method · has_item(self: Tile, item_id: ItemId): ItemStack?
Unified static/live tile snapshot. Check is_complete(part) before using a negative answer for safety decisions. in_protection_zone() is tri-state.
Parameters
| Name | Type | Summary |
|---|---|---|
item_id | ItemId | — |
Returns
| Type | Summary |
|---|---|
ItemStack? | — |
walkable
method · walkable(self: Tile, options?: TileWalkOptions): boolean
Unified static/live tile snapshot. Check is_complete(part) before using a negative answer for safety decisions. in_protection_zone() is tri-state.
Parameters
| Name | Type | Summary |
|---|---|---|
options | TileWalkOptions | — |
Returns
| Type | Summary |
|---|---|
boolean | — |
pathable
method · pathable(self: Tile, options?: TileWalkOptions): boolean
Unified static/live tile snapshot. Check is_complete(part) before using a negative answer for safety decisions. in_protection_zone() is tri-state.
Parameters
| Name | Type | Summary |
|---|---|---|
options | TileWalkOptions | — |
Returns
| Type | Summary |
|---|---|
boolean | — |
floor_change
method · floor_change(self: Tile): string|false
Unified static/live tile snapshot. Check is_complete(part) before using a negative answer for safety decisions. in_protection_zone() is tri-state.
Returns
| Type | Summary |
|---|---|
string|false | — |
in_protection_zone
method · in_protection_zone(self: Tile): boolean|nil
Nil means static map data is unavailable.
Returns
| Type | Summary |
|---|---|
boolean|nil | — |
interactive_objects
method · interactive_objects(self: Tile): table[]
Unified static/live tile snapshot. Check is_complete(part) before using a negative answer for safety decisions. in_protection_zone() is tri-state.
Returns
| Type | Summary |
|---|---|
table[] | — |
projectile_blocking
method · projectile_blocking(self: Tile): boolean
Unified static/live tile snapshot. Check is_complete(part) before using a negative answer for safety decisions. in_protection_zone() is tri-state.
Returns
| Type | Summary |
|---|---|
boolean | — |
magic_field
method · magic_field(self: Tile): ItemStack?
Unified static/live tile snapshot. Check is_complete(part) before using a negative answer for safety decisions. in_protection_zone() is tri-state.
Returns
| Type | Summary |
|---|---|
ItemStack? | — |
door
method · door(self: Tile): ItemStack?
Unified static/live tile snapshot. Check is_complete(part) before using a negative answer for safety decisions. in_protection_zone() is tri-state.
Returns
| Type | Summary |
|---|---|
ItemStack? | — |