| 1129 | } |
| 1130 | |
| 1131 | static void LevelTownLand(TileIndex tile) |
| 1132 | { |
| 1133 | assert(tile < Map::Size()); |
| 1134 | |
| 1135 | /* Don't terraform if land is plain or if there's a house there. */ |
| 1136 | if (IsTileType(tile, MP_HOUSE)) return; |
| 1137 | Slope tileh = GetTileSlope(tile); |
| 1138 | if (tileh == SLOPE_FLAT) return; |
| 1139 | |
| 1140 | /* First try up, then down */ |
| 1141 | if (!TerraformTownTile(tile, ~tileh & SLOPE_ELEVATED, true)) { |
| 1142 | TerraformTownTile(tile, tileh & SLOPE_ELEVATED, false); |
| 1143 | } |
| 1144 | } |
| 1145 | |
| 1146 | /** |
| 1147 | * Generate the RoadBits of a grid tile. |
no test coverage detected