mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-09-02 19:39:12 +00:00
(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.
This commit is contained in:
@@ -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)) {
|
||||
|
Reference in New Issue
Block a user