MCPcopy Create free account
hub / github.com/OpenTTD/OpenTTD / CheckBuildAbove_Station

Function CheckBuildAbove_Station

src/station_cmd.cpp:5366–5387  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5364}
5365
5366static CommandCost CheckBuildAbove_Station(TileIndex tile, DoCommandFlags, Axis, int height)
5367{
5368 StationType type = GetStationType(tile);
5369 auto bridgeable_info = GetStationBridgeableTileInfo(type);
5370
5371 switch (type) {
5372 case StationType::Rail:
5373 case StationType::RailWaypoint:
5374 if (const StationSpec *spec = GetStationSpec(tile); spec != nullptr) bridgeable_info = spec->bridgeable_info;
5375 break;
5376
5377 case StationType::Bus:
5378 case StationType::Truck:
5379 case StationType::RoadWaypoint:
5380 if (const RoadStopSpec *spec = GetRoadStopSpec(tile); spec != nullptr) bridgeable_info = spec->bridgeable_info;
5381 break;
5382
5383 default: break;
5384 }
5385
5386 return IsStationBridgeAboveOk(tile, bridgeable_info, type, GetStationGfx(tile), height);
5387}
5388
5389extern const TileTypeProcs _tile_type_station_procs = {
5390 DrawTile_Station, // draw_tile_proc

Callers

nothing calls this directly

Calls 6

GetStationTypeFunction · 0.85
GetStationSpecFunction · 0.85
GetRoadStopSpecFunction · 0.85
IsStationBridgeAboveOkFunction · 0.85
GetStationGfxFunction · 0.85

Tested by

no test coverage detected