WaterClass wc1 = IsWaterTile(tile) ? GetWaterClass(tile) : WATER_CLASS_CANAL; if (!IsWaterTile(tile)) { ret = DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR); if (ret.Failed()) return ret; cost.AddCost(ret); cost.AddCost(_price[PR_BUILD_CANAL]); } else { if (wc1 == WATER_CLASS_CANAL && !IsTileType(tile, MP_INDUSTRY) && GetTileOwner(tile) != OWNER_NONE) { ret = CheckTileOwnership(tile); if (ret.Failed()) return ret; } }