check if the tile is suitable to stand on and build, or is planned to become one
| 386 | |
| 387 | // check if the tile is suitable to stand on and build, or is planned to become one |
| 388 | static bool isPotentialSuitableAccess (coord pos) { |
| 389 | if (isSuitableAccess(pos)) |
| 390 | return true; |
| 391 | |
| 392 | // wall-type tiles can never become suitable |
| 393 | auto tile_type = Maps::getTileType(pos); |
| 394 | if (!tile_type || isWallTerrain(*tile_type)) |
| 395 | return false; |
| 396 | |
| 397 | // other tiles can become suitable if a wall is being constructed below |
| 398 | auto below = Buildings::findAtTile(coord(pos.x,pos.y,pos.z-1)); |
| 399 | if (below && below->getType() == df::building_type::Construction && |
| 400 | (below->getSubtype() == construction_type::Wall || |
| 401 | below->getSubtype() == construction_type::ReinforcedWall)) |
| 402 | return true; |
| 403 | |
| 404 | return false; |
| 405 | } |
| 406 | |
| 407 | static bool tileHasSupportWall(coord pos) { |
| 408 | auto tile_type = Maps::getTileType(pos); |
nothing calls this directly
no test coverage detected