Merge branch 'master' into jgrpp
# Conflicts: # src/ai/ai_gui.cpp # src/build_vehicle_gui.cpp # src/genworld_gui.cpp # src/lang/english.txt # src/lang/german.txt # src/lang/korean.txt # src/newgrf_sound.cpp # src/roadveh.h # src/sound.cpp # src/station_cmd.cpp # src/train.h # src/train_cmd.cpp # src/vehicle.cpp # src/vehicle_base.h # src/vehicle_gui.cpp
This commit is contained in:
@@ -3018,7 +3018,7 @@ CommandCost CmdBuildDock(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
|
||||
if (ret.Failed()) return ret;
|
||||
cost.AddCost(ret);
|
||||
|
||||
if (!IsTileType(flat_tile, MP_WATER) || !IsTileFlat(flat_tile)) {
|
||||
if (!HasTileWaterGround(flat_tile) || !IsTileFlat(flat_tile)) {
|
||||
return_cmd_error(STR_ERROR_SITE_UNSUITABLE);
|
||||
}
|
||||
|
||||
@@ -3027,8 +3027,10 @@ CommandCost CmdBuildDock(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32
|
||||
/* Get the water class of the water tile before it is cleared.*/
|
||||
WaterClass wc = GetWaterClass(flat_tile);
|
||||
|
||||
bool add_cost = !IsWaterTile(flat_tile);
|
||||
ret = DoCommand(flat_tile, 0, 0, flags | DC_ALLOW_REMOVE_WATER, CMD_LANDSCAPE_CLEAR);
|
||||
if (ret.Failed()) return ret;
|
||||
if (add_cost) cost.AddCost(ret);
|
||||
|
||||
TileIndex adjacent_tile = flat_tile + TileOffsByDiagDir(direction);
|
||||
if (!IsTileType(adjacent_tile, MP_WATER) || !IsTileFlat(adjacent_tile)) {
|
||||
|
Reference in New Issue
Block a user