bool add_cost;
/* At this point we got a flat tile with water at the ground. Do not demolish canal of OWNER_NONE, but check for ownership */
if (IsWaterTile(tile) && IsCanal(tile)) {
ret = EnsureNoVehicleOnGround(tile);
if (ret.Failed()) return ret;
if (o1 != OWNER_NONE) {
ret = CheckTileOwnership(tile);
if (ret.Failed() && !_settings_game.construction.build_on_competitor_canal) return ret;
}
} else {
add_cost = !IsWaterTile(tile);
ret = DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
if (ret.Failed()) return ret;
if (add_cost) {
cost.AddCost(ret);
}
}