Always allow buoys under bridges
This commit is contained in:
@@ -435,6 +435,10 @@ CommandCost CmdBuildBridge(TileIndex end_tile, DoCommandFlag flags, uint32 p1, u
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case STATION_BUOY:
|
||||||
|
/* Buoys are always allowed */
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (!_settings_game.construction.allow_stations_under_bridges) {
|
if (!_settings_game.construction.allow_stations_under_bridges) {
|
||||||
CommandCost ret = DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
|
CommandCost ret = DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR);
|
||||||
@@ -542,6 +546,10 @@ CommandCost CmdBuildBridge(TileIndex end_tile, DoCommandFlag flags, uint32 p1, u
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
case STATION_BUOY:
|
||||||
|
/* Buoys are always allowed */
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
if (!_settings_game.construction.allow_stations_under_bridges) goto not_valid_below;
|
if (!_settings_game.construction.allow_stations_under_bridges) goto not_valid_below;
|
||||||
break;
|
break;
|
||||||
|
@@ -298,7 +298,6 @@ CommandCost CmdBuildRailWaypoint(TileIndex start_tile, DoCommandFlag flags, uint
|
|||||||
CommandCost CmdBuildBuoy(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
|
CommandCost CmdBuildBuoy(TileIndex tile, DoCommandFlag flags, uint32 p1, uint32 p2, const char *text)
|
||||||
{
|
{
|
||||||
if (tile == 0 || !HasTileWaterGround(tile)) return_cmd_error(STR_ERROR_SITE_UNSUITABLE);
|
if (tile == 0 || !HasTileWaterGround(tile)) return_cmd_error(STR_ERROR_SITE_UNSUITABLE);
|
||||||
if (IsBridgeAbove(tile) && !_settings_game.construction.allow_stations_under_bridges) return_cmd_error(STR_ERROR_MUST_DEMOLISH_BRIDGE_FIRST);
|
|
||||||
|
|
||||||
if (!IsTileFlat(tile)) return_cmd_error(STR_ERROR_SITE_UNSUITABLE);
|
if (!IsTileFlat(tile)) return_cmd_error(STR_ERROR_SITE_UNSUITABLE);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user