|
|
|
@ -2500,7 +2500,7 @@ CommandCost CmdBuildDock(DoCommandFlag flags, TileIndex tile, StationID station_
|
|
|
|
|
|
|
|
|
|
TileIndex tile_cur = tile + TileOffsByDiagDir(direction);
|
|
|
|
|
|
|
|
|
|
if (!IsTileType(tile_cur, MP_WATER) || !IsTileFlat(tile_cur)) {
|
|
|
|
|
if (!HasTileWaterGround(tile_cur) || !IsTileFlat(tile_cur)) {
|
|
|
|
|
return_cmd_error(STR_ERROR_SITE_UNSUITABLE);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
@ -2509,8 +2509,10 @@ CommandCost CmdBuildDock(DoCommandFlag flags, TileIndex tile, StationID station_
|
|
|
|
|
/* Get the water class of the water tile before it is cleared.*/
|
|
|
|
|
WaterClass wc = GetWaterClass(tile_cur);
|
|
|
|
|
|
|
|
|
|
bool add_cost = !IsWaterTile(tile_cur);
|
|
|
|
|
ret = Command<CMD_LANDSCAPE_CLEAR>::Do(flags, tile_cur);
|
|
|
|
|
if (ret.Failed()) return ret;
|
|
|
|
|
if (add_cost) cost.AddCost(ret);
|
|
|
|
|
|
|
|
|
|
tile_cur += TileOffsByDiagDir(direction);
|
|
|
|
|
if (!IsTileType(tile_cur, MP_WATER) || !IsTileFlat(tile_cur)) {
|
|
|
|
|