--- a/src/clear_cmd.cpp Tue Jun 19 19:49:03 2007 +0000
+++ b/src/clear_cmd.cpp Tue Jun 19 21:15:14 2007 +0000
@@ -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 @@
}
}
+ /* 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)) {