Merge pull request #3087 from myk002/myk_no_building_on_magma

mark tiles with magma or deep water as "not free"
develop
Myk 2023-03-24 15:46:10 -07:00 committed by GitHub
commit 63e022f955
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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;
}