Add onLayoutOpened API callback

This commit is contained in:
GriffinR
2025-03-14 23:24:17 -04:00
parent 4b1332609e
commit e6f4e64aa4
8 changed files with 82 additions and 46 deletions

View File

@@ -153,11 +153,18 @@ Callbacks
.. js:function:: onMapOpened(mapName)
Called when a map or layout is opened.
Called when a map is opened.
:param mapName: the name of the opened map or layout
:param mapName: the name of the opened map
:type mapName: string
.. js:function:: onLayoutOpened(layoutName)
Called when a layout is opened, either by selecting a new map/layout in the map list or swapping the layout for the current map.
:param layoutName: the name of the opened layout
:type layoutName: string
.. js:function:: onBlockChanged(x, y, prevBlock, newBlock)
Called when a block is changed on the map. For example, this is called when a user paints a new tile or changes the collision property of a block.