Loading

Paste #pebfhefle

  1.     bool add_cost;
  2.     /* At this point we got a flat tile with water at the ground. Do not demolish canal of OWNER_NONE, but check for ownership */
  3.     if (IsWaterTile(tile) && IsCanal(tile)) {
  4.         ret = EnsureNoVehicleOnGround(tile);
  5.         if (ret.Failed()) return ret;
  6.         if (o1 != OWNER_NONE) {
  7.             ret = CheckTileOwnership(tile);
  8.             if (ret.Failed() && !_settings_game.construction.build_on_competitor_canal) return ret;
  9.         }
  10.     } else {
  11.         add_cost = !IsWaterTile(tile);
  12.         ret = DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
  13.         if (ret.Failed()) return ret;
  14.         if (add_cost) {
  15.             cost.AddCost(ret);
  16.         }
  17.     }

Comments