(svn r10230) -Fix [FS#594]: terraforming wipes out canals. Now you always have to remove the canal before terraforming, instead of "just" removing the canal.

This commit is contained in:
rubidium
2007-06-19 21:15:14 +00:00
parent fe7f4a2f9c
commit 9e55573616
3 changed files with 14 additions and 0 deletions

View File

@@ -45,6 +45,11 @@ static inline bool IsCoast(TileIndex t)
return GetWaterTileType(t) == WATER_TILE_COAST;
}
static inline bool IsCanal(TileIndex t)
{
return GetWaterTileType(t) == WATER_TILE_CLEAR && GetTileOwner(t) != OWNER_WATER;
}
static inline bool IsClearWaterTile(TileIndex t)
{
return IsTileType(t, MP_WATER) && IsWater(t) && GetTileSlope(t, NULL) == SLOPE_FLAT;