|
OpenTTD Source 20260421-master-gc2fbc6fdeb
|
Command definitions related to tunnels and bridges. More...
#include "bridge_type.h"#include "command_type.h"#include "rail_type.h"#include "road_type.h"#include "transport_type.h"Go to the source code of this file.
Functions | |
| CommandCost | CmdBuildBridge (DoCommandFlags flags, TileIndex tile_end, TileIndex tile_start, TransportType transport_type, BridgeType bridge_type, RailType railtype, RoadType roadtype) |
| Build a Bridge. | |
| CommandCost | CmdBuildTunnel (DoCommandFlags flags, TileIndex start_tile, TransportType transport_type, RailType railtype, RoadType roadtype) |
| Build Tunnel. | |
| void | CcBuildBridge (Commands, const CommandCost &result, TileIndex end_tile, TileIndex tile_start, TransportType transport_type, BridgeType, RailType, RoadType) |
| Callback executed after a build Bridge CMD has been called. | |
Command definitions related to tunnels and bridges.
Definition in file tunnelbridge_cmd.h.
| void CcBuildBridge | ( | Commands | , |
| const CommandCost & | result, | ||
| TileIndex | end_tile, | ||
| TileIndex | tile_start, | ||
| TransportType | transport_type, | ||
| BridgeType | , | ||
| RailType | , | ||
| RoadType | ) |
Callback executed after a build Bridge CMD has been called.
| result | Whether the build succeeded |
| end_tile | End tile of the bridge. |
| tile_start | start tile |
| transport_type | transport type. |
Definition at line 57 of file bridge_gui.cpp.
References _settings_client, ConnectRoadToStructure(), CommandCost::Failed(), GetTunnelBridgeDirection(), ReverseDiagDir(), SND_27_CONSTRUCTION_BRIDGE, and TRANSPORT_ROAD.
Referenced by BuildDocksToolbarWindow::OnPlaceObject(), and ShowBuildBridgeWindow().
| CommandCost CmdBuildBridge | ( | DoCommandFlags | flags, |
| TileIndex | tile_end, | ||
| TileIndex | tile_start, | ||
| TransportType | transport_type, | ||
| BridgeType | bridge_type, | ||
| RailType | railtype, | ||
| RoadType | roadtype ) |
Build a Bridge.
| flags | type of operation |
| tile_end | end tile |
| tile_start | start tile |
| transport_type | transport type. |
| bridge_type | bridge type (hi bh) |
| railtype | rail type for rail bridge, or INVALID_RAILTYPE |
| roadtype | road type for road bridge, or INVALID_ROADTYPE |
Definition at line 311 of file tunnelbridge_cmd.cpp.
References _current_company, _local_company, _price, _settings_game, CommandCost::AddCost(), AddSideToSignalBuffer(), AXIS_X, AXIS_Y, AxisToDiagDir(), AxisToTrack(), BuildAqueduct, BuildBridge, Town::cache, CalcBridgeLenCostFactor(), CalcClosestTownFromTile(), ChangeTownRating(), CheckBridgeAvailability(), CheckBridgeSlope(), CheckForDockingTile(), ClearBridge, ClosestTownFromTile(), CMD_ERROR, CommandCostWithParam(), DirtyCompanyInfrastructureWindows(), DistanceSquare(), Execute, EXPENSES_CONSTRUCTION, CommandCost::Failed(), GetBridgeAxis(), GetBridgeHeight(), GetBridgeSpec(), GetBridgeType(), CommandCost::GetCost(), GetNorthernBridgeEnd(), GetOtherBridgeEnd(), GetRailType(), GetRoadOwner(), GetRoadTypeRoad(), GetRoadTypeTram(), GetTileMaxZ(), GetTileOwner(), GetTileSlopeZ(), GetTileZ(), GetTunnelBridgeLength(), GetTunnelBridgeTransportType(), HasTunnelBridgeReservation(), Company::infrastructure, INVALID_DIAGDIR, INVALID_ROADTYPE, CompanyProperties::is_ai, IsBridgeAbove(), IsBridgeTile(), IsTileOwner(), IsValidTile(), MakeAqueductBridgeRamp(), MakeRailBridgeRamp(), MakeRoadBridgeRamp(), MarkBridgeDirty(), OWNER_DEITY, OWNER_NONE, OWNER_TOWN, QueryCost, CompanyInfrastructure::rail, RailBuildCost(), RATING_TUNNEL_BRIDGE_UP_STEP, ReverseDiagDir(), Road, CompanyInfrastructure::road, RoadBuildCost(), SetBridgeMiddle(), SetTunnelBridgeReservation(), SLOPE_FLAT, TownCache::squared_town_zone_radius, BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test(), TileDiffXY(), TileOffsByAxis(), TileX(), TileY(), to_underlying(), TownEdge, Tram, TRANSPORT_RAIL, TRANSPORT_ROAD, TRANSPORT_WATER, TUNNELBRIDGE_TRACKBIT_FACTOR, TunnelBridgeClearCost(), ValParamRailType(), ValParamRoadType(), CompanyInfrastructure::water, Town::xy, and YapfNotifyTrackLayoutChange().
| CommandCost CmdBuildTunnel | ( | DoCommandFlags | flags, |
| TileIndex | start_tile, | ||
| TransportType | transport_type, | ||
| RailType | railtype, | ||
| RoadType | roadtype ) |
Build Tunnel.
| flags | type of operation |
| start_tile | start tile of tunnel |
| transport_type | transport type |
| railtype | rail type for rail tunnel, or INVALID_RAILTYPE |
| roadtype | road type for road tunnel, or INVALID_ROADTYPE |
Definition at line 644 of file tunnelbridge_cmd.cpp.
References _build_tunnel_endtile, _cheats, _current_company, _price, _settings_game, CommandCost::AddCost(), AddSideToSignalBuffer(), AXIS_Y, BuildTunnel, Town::cache, CalcClosestTownFromTile(), CMD_ERROR, ComplementSlope(), DIAGDIR_NE, DIAGDIR_NW, DIAGDIR_SE, DIAGDIR_SW, DiagDirToAxis(), DiagDirToDiagTrack(), DirtyCompanyInfrastructureWindows(), DistanceSquare(), Execute, EXPENSES_CONSTRUCTION, CommandCost::Failed(), FindClearedObject(), ClearedObjectArea::first_tile, CommandCost::GetCost(), GetInclinedSlopeDirection(), GetTileSlopeZ(), HasTileWaterGround(), Company::infrastructure, INVALID_DIAGDIR, INVALID_ROADTYPE, INVALID_TILE, IsTunnelInWayDir(), IsValidTile(), MakeRailTunnel(), MakeRoadTunnel(), Map::MaxX(), OWNER_DEITY, OWNER_NONE, OWNER_TOWN, CompanyInfrastructure::rail, RailBuildCost(), ReverseDiagDir(), CompanyInfrastructure::road, RoadBuildCost(), TownCache::squared_town_zone_radius, BaseBitSet< Timpl, Tvalue_type, Tstorage, Tmask >::Test(), TileOffsByDiagDir(), TileX(), TileY(), to_underlying(), TownEdge, TRANSPORT_RAIL, TRANSPORT_ROAD, TUNNELBRIDGE_TRACKBIT_FACTOR, ValParamRailType(), ValParamRoadType(), Town::xy, and YapfNotifyTrackLayoutChange().