mark tiles with magma or deep water as "not free"

develop
Myk Taylor 2023-03-24 15:05:17 -07:00
parent cc5329b935
commit fe0590503f
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
2 changed files with 7 additions and 3 deletions

@ -38,6 +38,7 @@ changelog.txt uses a syntax similar to RST, with a few special sequences:
## Fixes
- `buildingplan`: upright spike traps are now placed extended rather than retracted
- `buildingplan`: you can no longer designate constructions on tiles with magma or deep water
- `buildingplan`: fixed material filter getting lost for planning buildings on save/reload
- `buildingplan`: respect building size limits (e.g. roads and bridges cannot be more than 31 tiles in any dimension)
- `tailor`: now properly discriminates between dyed and undyed cloth, no longer defaults to using adamantine, and properly tracks material requirements for already queued orders

@ -799,10 +799,13 @@ bool Buildings::checkFreeTiles(df::coord pos, df::coord2d size,
if (!allow_occupied &&
block->occupancy[btile.x][btile.y].bits.building)
allowed = false;
else
else if (!allow_wall)
{
auto tile = block->tiletype[btile.x][btile.y];
if (!allow_wall && !HighPassable(tile))
auto &tt = block->tiletype[btile.x][btile.y];
auto &des = block->designation[btile.x][btile.y];
if (!HighPassable(tt) ||
des.bits.flow_size > 1 ||
(des.bits.flow_size >= 1 && des.bits.liquid_type == df::tile_liquid::Magma))
allowed = false;
}