|
|
|
@ -574,7 +574,9 @@ bool Buildings::getCorrectSize(df::coord2d &size, df::coord2d ¢er,
|
|
|
|
|
|
|
|
|
|
bool Buildings::checkFreeTiles(df::coord pos, df::coord2d size,
|
|
|
|
|
df::building_extents *ext,
|
|
|
|
|
bool create_ext, bool allow_occupied)
|
|
|
|
|
bool create_ext,
|
|
|
|
|
bool allow_occupied,
|
|
|
|
|
bool allow_wall)
|
|
|
|
|
{
|
|
|
|
|
bool found_any = false;
|
|
|
|
|
|
|
|
|
@ -609,7 +611,7 @@ bool Buildings::checkFreeTiles(df::coord pos, df::coord2d size,
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
auto tile = block->tiletype[btile.x][btile.y];
|
|
|
|
|
if (!HighPassable(tile))
|
|
|
|
|
if (!allow_wall && !HighPassable(tile))
|
|
|
|
|
allowed = false;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -659,7 +661,9 @@ static bool checkBuildingTiles(df::building *bld, bool can_change)
|
|
|
|
|
|
|
|
|
|
return Buildings::checkFreeTiles(psize.first, psize.second, &bld->room,
|
|
|
|
|
can_change && bld->isExtentShaped(),
|
|
|
|
|
!bld->isSettingOccupancy());
|
|
|
|
|
!bld->isSettingOccupancy(),
|
|
|
|
|
bld->getType() ==
|
|
|
|
|
df::building_type::Civzone);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
int Buildings::countExtentTiles(df::building_extents *ext, int defval)
|
|
|
|
|