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

Function FillTileDescRailStation

src/station_cmd.cpp:3616–3633  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3614}
3615
3616void FillTileDescRailStation(TileIndex tile, TileDesc &td)
3617{
3618 const StationSpec *spec = GetStationSpec(tile);
3619
3620 if (spec != nullptr) {
3621 td.station_class = StationClass::Get(spec->class_index)->name;
3622 td.station_name = spec->name;
3623
3624 if (spec->grf_prop.HasGrfFile()) {
3625 const GRFConfig *gc = GetGRFConfig(spec->grf_prop.grfid);
3626 td.grf = gc->GetName();
3627 }
3628 }
3629
3630 const RailTypeInfo *rti = GetRailTypeInfo(GetRailType(tile));
3631 td.rail_speed = rti->max_speed;
3632 td.railtype = rti->strings.name;
3633}
3634
3635void FillTileDescAirport(TileIndex tile, TileDesc &td)
3636{

Callers 1

GetTileDesc_StationFunction · 0.85

Calls 6

GetStationSpecFunction · 0.85
GetGRFConfigFunction · 0.85
GetRailTypeInfoFunction · 0.85
GetRailTypeFunction · 0.85
HasGrfFileMethod · 0.80
GetNameMethod · 0.45

Tested by

no test coverage detected