OpenTTD Source
20241121-master-g67a0fccfad
|
Command definitions related to tunnels and bridges. More...
Go to the source code of this file.
Functions | |
CommandCost | CmdBuildBridge (DoCommandFlag flags, TileIndex tile_end, TileIndex tile_start, TransportType transport_type, BridgeType bridge_type, uint8_t road_rail_type) |
Build a Bridge. More... | |
CommandCost | CmdBuildTunnel (DoCommandFlag flags, TileIndex start_tile, TransportType transport_type, uint8_t road_rail_type) |
Build Tunnel. More... | |
void | CcBuildBridge (Commands cmd, const CommandCost &result, TileIndex end_tile, TileIndex tile_start, TransportType transport_type, BridgeType, uint8_t) |
Callback executed after a build Bridge CMD has been called. More... | |
Command definitions related to tunnels and bridges.
Definition in file tunnelbridge_cmd.h.
void CcBuildBridge | ( | Commands | cmd, |
const CommandCost & | result, | ||
TileIndex | end_tile, | ||
TileIndex | tile_start, | ||
TransportType | transport_type, | ||
BridgeType | , | ||
uint8_t | |||
) |
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.
Referenced by ShowBuildBridgeWindow().
CommandCost CmdBuildBridge | ( | DoCommandFlag | flags, |
TileIndex | tile_end, | ||
TileIndex | tile_start, | ||
TransportType | transport_type, | ||
BridgeType | bridge_type, | ||
uint8_t | road_rail_type | ||
) |
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) |
road_rail_type | rail type or road types. |
Definition at line 261 of file tunnelbridge_cmd.cpp.
References _current_company, Town::cache, CalcClosestTownFromTile(), CMD_ERROR, DistanceSquare(), INVALID_RAILTYPE, INVALID_ROADTYPE, IsValidTile(), OWNER_DEITY, OWNER_TOWN, return_cmd_error, TownCache::squared_town_zone_radius, TRANSPORT_RAIL, TRANSPORT_ROAD, TRANSPORT_WATER, ValParamRailType(), ValParamRoadType(), and Town::xy.
CommandCost CmdBuildTunnel | ( | DoCommandFlag | flags, |
TileIndex | start_tile, | ||
TransportType | transport_type, | ||
uint8_t | road_rail_type | ||
) |
Build Tunnel.
flags | type of operation |
start_tile | start tile of tunnel |
transport_type | transport type |
road_rail_type | railtype or roadtype |
Definition at line 624 of file tunnelbridge_cmd.cpp.
References _build_tunnel_endtile, _current_company, Town::cache, CalcClosestTownFromTile(), CMD_ERROR, DistanceSquare(), INVALID_RAILTYPE, INVALID_ROADTYPE, OWNER_DEITY, OWNER_TOWN, TownCache::squared_town_zone_radius, TRANSPORT_RAIL, TRANSPORT_ROAD, ValParamRailType(), ValParamRoadType(), and Town::xy.