From ba448949ffac1d933ce4089871f19ce0f1c54ee3 Mon Sep 17 00:00:00 2001 From: Myk Taylor Date: Wed, 12 Feb 2025 18:44:14 -0800 Subject: [PATCH] update docs for checkFreeTiles --- docs/changelog.txt | 2 ++ docs/dev/Lua API.rst | 17 +++++++++-------- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/docs/changelog.txt b/docs/changelog.txt index 20e65538d2..20d11103bc 100644 --- a/docs/changelog.txt +++ b/docs/changelog.txt @@ -74,11 +74,13 @@ Template for new versions: ## API - ``Military::removeFromSquad``: removes unit from any squad assignments +- ``Buildings::checkFreeTiles``: now replaces the extents parameter for a building pointer ## Lua - ``dfhack.units.setAutomaticProfessions``: sets unit labors according to current work detail settings - ``dfhack.military.removeFromSquad``: Lua API for ``Military::removeFromSquad`` - ``gui.dwarfmode``: adventure mode cursor now supported in ``getCursorPos``, ``setCursorPos``, and ``clearCursorPos`` funcitons +- ``dfhack.buildings.checkFreeTiles``: now replaces the extents parameter for a building pointer ## Removed diff --git a/docs/dev/Lua API.rst b/docs/dev/Lua API.rst index bbab5a6c38..f8108e8b2c 100644 --- a/docs/dev/Lua API.rst +++ b/docs/dev/Lua API.rst @@ -2477,14 +2477,15 @@ General using width and height for flexible dimensions. Returns *is_flexible, width, height, center_x, center_y*. -* ``dfhack.buildings.checkFreeTiles(pos,size[,extents[,change_extents[,allow_occupied[,allow_wall[,allow_flow]]]]])`` - - Checks if the rectangle defined by ``pos`` and ``size``, and possibly extents, - can be used for placing a building. If ``change_extents`` is true, bad tiles - are removed from extents. If ``allow_occupied``, the occupancy test is skipped. - Set ``allow_wall`` to true if the building is unhindered by walls (such as an - activity zone). Set ``allow_flow`` to true if the building can be built even - if there is deep water or any magma on the tile (such as abstract buildings). +* ``dfhack.buildings.checkFreeTiles(pos,size[,bld[,change_extents[,allow_occupied[,allow_wall[,allow_flow]]]]])`` + + Checks if the rectangle defined by ``pos`` and ``size``, and possibly the + extents associated with bld, can be used for placing a building. If + ``change_extents`` is true, bad tiles are removed from extents. If + ``allow_occupied``, the occupancy test is skipped. Set ``allow_wall`` to true + if the building is unhindered by walls (such as an activity zone). Set + ``allow_flow`` to true if the building can be built even if there is deep + water or any magma on the tile (such as abstract buildings). * ``dfhack.buildings.countExtentTiles(extents,defval)``