diff options
author | yexo <yexo@openttd.org> | 2010-09-01 23:14:15 +0000 |
---|---|---|
committer | yexo <yexo@openttd.org> | 2010-09-01 23:14:15 +0000 |
commit | c07fdab16c4a89dda13efa72fdb5c081872de1ce (patch) | |
tree | 04c6eae1387ef0eed4c27d4a5d264ec6c5c85a1a /src/station_cmd.cpp | |
parent | e640373475375d2bd2f5f4215b0d58b7002175f7 (diff) | |
download | openttd-c07fdab16c4a89dda13efa72fdb5c081872de1ce.tar.xz |
(svn r20716) -Feature: add airport class and airport name to the land info tool
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r-- | src/station_cmd.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index f6cba01bb..12ea763d6 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -2805,10 +2805,17 @@ static void GetTileDesc_Station(TileIndex tile, TileDesc *td) } if (IsAirport(tile)) { + const AirportSpec *as = Station::GetByTile(tile)->airport.GetSpec(); + td->airport_class = AirportClass::GetName(as->cls_id); + td->airport_name = as->name; + const AirportTileSpec *ats = AirportTileSpec::GetByTile(tile); td->airport_tile_name = ats->name; - if (ats->grf_prop.grffile != NULL) { + if (as->grf_prop.grffile != NULL) { + const GRFConfig *gc = GetGRFConfig(as->grf_prop.grffile->grfid); + td->grf = gc->GetName(); + } else if (ats->grf_prop.grffile != NULL) { const GRFConfig *gc = GetGRFConfig(ats->grf_prop.grffile->grfid); td->grf = gc->GetName(); } |