static CommandCost TerraformTile_Water(TileIndex tile, DoCommandFlag flags, int z_new, Slope tileh_new)
{
/* Canals can't be terraformed */
if (IsWaterTile(tile) && IsCanal(tile)) return_cmd_error(STR_ERROR_MUST_DEMOLISH_CANAL_FIRST);
if (IsWaterTile(tile) && IsRiver(tile)) {
if (!IsTileFlat(tileh_new) || !IsInclinedSlope(tileh_new)) {
return_cmd_error(STR_ERROR_FLAT_LAND_REQUIRED);
}
}
return DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
}