* Check if a tile where we want to build a multi-tile house has an appropriate max Z. * @param tile The tile to check. * @param z The max Z level to allow. * @param noslope Are foundations disallowed for this house? * @return true iff house can be built here. * @see CanBuildHouseHere() */
| 2610 | * @see CanBuildHouseHere() |
| 2611 | */ |
| 2612 | static inline bool CheckBuildHouseSameZ(TileIndex tile, int z, bool noslope) |
| 2613 | { |
| 2614 | if (!CanBuildHouseHere(tile, noslope)) return false; |
| 2615 | |
| 2616 | /* if building on slopes is allowed, there will be flattening foundation (to tile max z) */ |
| 2617 | if (GetTileMaxZ(tile) != z) return false; |
| 2618 | |
| 2619 | return true; |
| 2620 | } |
| 2621 | |
| 2622 | |
| 2623 | /** |
no test coverage detected