| Old revision #pwaxzzmo8 | New revision #pecr1uayk | ||
|---|---|---|---|
| 1 | if (HasTileWaterClass(tile) && GetWaterClass(tile) == WATER_CLASS_CANAL) { | 1 | WaterClass wc1 = IsWaterTile(tile) ? GetWaterClass(tile) : WATER_CLASS_CANAL; |
| 2 | if (!IsTileType(tile, MP_INDUSTRY)) { | ||
| 3 | Owner o1 = GetTileOwner(tile); | ||
| 4 | if (o1 != OWNER_NONE) { | ||
| 5 | ret = CheckTileOwnership(tile); | ||
| 6 | if (ret.Failed()) return ret; | ||
| 7 | } | ||
| 8 | } | ||
| 9 | } | ||
| 10 | 2 | ||
| 11 | if (!IsWaterTile(tile)) { | 3 | if (!IsWaterTile(tile)) { |
| 12 | ret = DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR); | 4 | ret = DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR); |
| 13 | if (ret.Failed()) return ret; | 5 | if (ret.Failed()) return ret; |
| 14 | cost.AddCost(ret); | 6 | cost.AddCost(ret); |
| 15 | cost.AddCost(_price[PR_BUILD_CANAL]); | 7 | cost.AddCost(_price[PR_BUILD_CANAL]); |
| 8 | } else { | ||
| 9 | if (wc1 == WATER_CLASS_CANAL && !IsTileType(tile, MP_INDUSTRY) && GetTileOwner(tile) != OWNER_NONE) { | ||
| 10 | ret = CheckTileOwnership(tile); | ||
| 11 | if (ret.Failed()) return ret; | ||
| 12 | } | ||
| 16 | } | 13 | } |