From 55b93b1c058aff7fb67dad186c31855acb2a5724 Mon Sep 17 00:00:00 2001 From: rubidium Date: Tue, 19 Jun 2007 21:15:14 +0000 Subject: (svn r10230) -Fix [FS#594]: terraforming wipes out canals. Now you always have to remove the canal before terraforming, instead of "just" removing the canal. --- src/clear_cmd.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/clear_cmd.cpp') diff --git a/src/clear_cmd.cpp b/src/clear_cmd.cpp index c69ff0d99..7b95d085a 100644 --- a/src/clear_cmd.cpp +++ b/src/clear_cmd.cpp @@ -22,6 +22,7 @@ #include "unmovable_map.h" #include "genworld.h" #include "industry.h" +#include "water_map.h" struct TerraformerHeightMod { TileIndex tile; @@ -141,6 +142,13 @@ static int TerraformProc(TerraformerState *ts, TileIndex tile, int mode) } } + /* Canals can't be terraformed */ + if (IsClearWaterTile(tile) && IsCanal(tile)) { + _terraform_err_tile = tile; + _error_message = STR_MUST_DEMOLISH_CANAL_FIRST; + return -1; + } + ret = DoCommand(tile, 0, 0, ts->flags & ~DC_EXEC, CMD_LANDSCAPE_CLEAR); if (CmdFailed(ret)) { -- cgit v1.2.3-70-g09d2