* Tests if at least one surrounding tile is non-desert * @param tile tile to check * @return does this tile have at least one non-desert tile around? */
| 221 | * @return does this tile have at least one non-desert tile around? |
| 222 | */ |
| 223 | static inline bool NeighbourIsNormal(TileIndex tile) |
| 224 | { |
| 225 | for (DiagDirection dir = DIAGDIR_BEGIN; dir < DIAGDIR_END; dir++) { |
| 226 | TileIndex t = tile + TileOffsByDiagDir(dir); |
| 227 | if (!IsValidTile(t)) continue; |
| 228 | if (GetTropicZone(t) != TROPICZONE_DESERT) return true; |
| 229 | if (HasTileWaterClass(t) && GetWaterClass(t) == WaterClass::Sea) return true; |
| 230 | } |
| 231 | return false; |
| 232 | } |
| 233 | |
| 234 | static void TileLoopClearDesert(TileIndex tile) |
| 235 | { |
no test coverage detected