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
find_all_short_tile_codes
function PreHandleRoomTilesContext:find_all_short_tile_codes(layer: LAYER, short_tile_code: SHORT_TILE_CODE): tablelayer:LAYERshort_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
get_short_tile_code
function PreHandleRoomTilesContext:get_short_tile_code(tx: integer, ty: integer, layer: LAYER): SHORT_TILE_CODE?tx:integerty:integerlayer:LAYER
Returns SHORT_TILE_CODE? (may be nil)
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): booleanlayer:LAYERshort_tile_code:SHORT_TILE_CODEreplacement_short_tile_code:SHORT_TILE_CODE
Returns boolean
set_short_tile_code
function PreHandleRoomTilesContext:set_short_tile_code(tx: integer, ty: integer, layer: LAYER, short_tile_code: SHORT_TILE_CODE): booleantx:integerty:integerlayer:LAYERshort_tile_code:SHORT_TILE_CODE
Returns boolean