|
|
|
@ -525,7 +525,7 @@ CommandCost CmdBuildTunnel(TileIndex start_tile, DoCommandFlag flags, uint32 p1,
|
|
|
|
|
DiagDirection direction = GetInclinedSlopeDirection(start_tileh);
|
|
|
|
|
if (direction == INVALID_DIAGDIR) return_cmd_error(STR_ERROR_SITE_UNSUITABLE_FOR_TUNNEL);
|
|
|
|
|
|
|
|
|
|
if (IsWaterTile(start_tile)) return_cmd_error(STR_ERROR_CAN_T_BUILD_ON_WATER);
|
|
|
|
|
if (HasTileWaterGround(start_tile)) return_cmd_error(STR_ERROR_CAN_T_BUILD_ON_WATER);
|
|
|
|
|
|
|
|
|
|
CommandCost ret = DoCommand(start_tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
|
|
|
|
|
if (ret.Failed()) return ret;
|
|
|
|
@ -582,7 +582,7 @@ CommandCost CmdBuildTunnel(TileIndex start_tile, DoCommandFlag flags, uint32 p1,
|
|
|
|
|
/* if the command fails from here on we want the end tile to be highlighted */
|
|
|
|
|
_build_tunnel_endtile = end_tile;
|
|
|
|
|
|
|
|
|
|
if (IsWaterTile(end_tile)) return_cmd_error(STR_ERROR_CAN_T_BUILD_ON_WATER);
|
|
|
|
|
if (HasTileWaterGround(end_tile)) return_cmd_error(STR_ERROR_CAN_T_BUILD_ON_WATER);
|
|
|
|
|
|
|
|
|
|
/* Clear the tile in any case */
|
|
|
|
|
ret = DoCommand(end_tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
|
|
|
|
|