Skip to content

PreHandleRoomTilesContext

Callback context typesno constructorsource

Context received in ON.PRE_HANDLE_ROOM_TILES. Used to change the room data as well as add a backlayer room if none is set yet.

Methods

add_copied_back_layer

function PreHandleRoomTilesContext:add_copied_back_layer()
source

add_empty_back_layer

function PreHandleRoomTilesContext:add_empty_back_layer()
source

find_all_short_tile_codes

function PreHandleRoomTilesContext:find_all_short_tile_codes(layer: LAYER, short_tile_code: SHORT_TILE_CODE): table
layer: LAYER
short_tile_code: SHORT_TILE_CODE

Returns table

Finds all places a short tile code is used in the room, layer must be in {LAYER.FRONT, LAYER.BACK, LAYER.BOTH} Returns an empty list if layer == LAYER.BACK and the room does not have a back layer

source

get_short_tile_code

function PreHandleRoomTilesContext:get_short_tile_code(tx: integer, ty: integer, layer: LAYER): SHORT_TILE_CODE?
tx: integer
ty: integer
layer: LAYER

Returns SHORT_TILE_CODE? (may be nil)

source

has_back_layer

function PreHandleRoomTilesContext:has_back_layer(): boolean

Returns boolean

source

replace_short_tile_code

function PreHandleRoomTilesContext:replace_short_tile_code(layer: LAYER, short_tile_code: SHORT_TILE_CODE, replacement_short_tile_code: SHORT_TILE_CODE): boolean
layer: LAYER
short_tile_code: SHORT_TILE_CODE
replacement_short_tile_code: SHORT_TILE_CODE

Returns boolean

source

set_short_tile_code

function PreHandleRoomTilesContext:set_short_tile_code(tx: integer, ty: integer, layer: LAYER, short_tile_code: SHORT_TILE_CODE): boolean
tx: integer
ty: integer
layer: LAYER
short_tile_code: SHORT_TILE_CODE

Returns boolean

source