rename is_civzone to the more general allow_wall

develop
Myk Taylor 2020-08-15 20:13:48 -07:00
parent dd3ff7252d
commit e546d3eec3
3 changed files with 6 additions and 5 deletions

@ -1617,12 +1617,13 @@ 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,is_civzone])``
* ``dfhack.buildings.checkFreeTiles(pos,size[,extents,change_extents,allow_occupied,allow_wall])``
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 ``is_civzone`` to true if the building is a civzone (like an activity zone).
Set ``allow_wall`` to true if the building is unhindered by walls (such as an
activity zone).
* ``dfhack.buildings.countExtentTiles(extents,defval)``

@ -143,7 +143,7 @@ DFHACK_EXPORT bool checkFreeTiles(df::coord pos, df::coord2d size,
df::building_extents *ext = NULL,
bool create_ext = false,
bool allow_occupied = false,
bool is_civzone = false);
bool allow_wall = false);
/**
* Returns the number of tiles included by the extent, or defval.

@ -576,7 +576,7 @@ bool Buildings::checkFreeTiles(df::coord pos, df::coord2d size,
df::building_extents *ext,
bool create_ext,
bool allow_occupied,
bool is_civzone)
bool allow_wall)
{
bool found_any = false;
@ -611,7 +611,7 @@ bool Buildings::checkFreeTiles(df::coord pos, df::coord2d size,
else
{
auto tile = block->tiletype[btile.x][btile.y];
if (!is_civzone && !HighPassable(tile))
if (!allow_wall && !HighPassable(tile))
allowed = false;
}