Index: src/water_cmd.cpp =================================================================== --- src/water_cmd.cpp (revision 27200) +++ src/water_cmd.cpp (working copy) @@ -39,7 +39,7 @@ #include "company_base.h" #include "company_gui.h" #include "newgrf_generic.h" - +#include "cheat_type.h" #include "table/strings.h" #include "safeguards.h" @@ -470,6 +470,8 @@ if (flags & DC_NO_WATER) return_cmd_error(STR_ERROR_CAN_T_BUILD_ON_WATER); Money base_cost = IsCanal(tile) ? _price[PR_CLEAR_CANAL] : _price[PR_CLEAR_WATER]; + if (IsRiver(tile) && _game_mode == GM_NORMAL && !_cheats.magic_bulldozer.value) base_cost = 0; + /* Make sure freeform edges are allowed or it's not an edge tile. */ if (!_settings_game.construction.freeform_edges && (!IsInsideMM(TileX(tile), 1, MapMaxX() - 1) || !IsInsideMM(TileY(tile), 1, MapMaxY() - 1))) { @@ -491,7 +493,9 @@ Company::Get(owner)->infrastructure.water--; DirtyCompanyInfrastructureWindows(owner); } + bool river = HasTileWaterClass(tile) && GetWaterClass(tile) == WATER_CLASS_RIVER; DoClearSquare(tile); + if (river && _game_mode == GM_NORMAL && !_cheats.magic_bulldozer.value) MakeRiver(tile, Random()); MarkCanalsAndRiversAroundDirty(tile); } @@ -1314,6 +1318,7 @@ /* Canals can't be terraformed */ if (IsWaterTile(tile) && IsCanal(tile)) return_cmd_error(STR_ERROR_MUST_DEMOLISH_CANAL_FIRST); + if (IsWaterTile(tile) && IsRiver(tile)) return_cmd_error(STR_ERROR_SITE_UNSUITABLE); return DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR); }