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

Function FillTileDescAirport

src/station_cmd.cpp:3635–3651  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3633}
3634
3635void FillTileDescAirport(TileIndex tile, TileDesc &td)
3636{
3637 const AirportSpec *as = Station::GetByTile(tile)->airport.GetSpec();
3638 td.airport_class = AirportClass::Get(as->class_index)->name;
3639 td.airport_name = as->name;
3640
3641 const AirportTileSpec *ats = AirportTileSpec::GetByTile(tile);
3642 td.airport_tile_name = ats->name;
3643
3644 if (as->grf_prop.HasGrfFile()) {
3645 const GRFConfig *gc = GetGRFConfig(as->grf_prop.grfid);
3646 td.grf = gc->GetName();
3647 } else if (ats->grf_prop.HasGrfFile()) {
3648 const GRFConfig *gc = GetGRFConfig(ats->grf_prop.grfid);
3649 td.grf = gc->GetName();
3650 }
3651}
3652
3653static void GetTileDesc_Station(TileIndex tile, TileDesc &td)
3654{

Callers 1

GetTileDesc_StationFunction · 0.85

Calls 4

GetGRFConfigFunction · 0.85
HasGrfFileMethod · 0.80
GetSpecMethod · 0.45
GetNameMethod · 0.45

Tested by

no test coverage detected