Skip to content

Commit

Permalink
update docs for checkFreeTiles
Browse files Browse the repository at this point in the history
  • Loading branch information
myk002 committed Feb 13, 2025
1 parent 768e3f2 commit ba44894
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
2 changes: 2 additions & 0 deletions docs/changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
17 changes: 9 additions & 8 deletions docs/dev/Lua API.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)``

Expand Down

0 comments on commit ba44894

Please sign in to comment.