diff options
author | smatz <smatz@openttd.org> | 2008-07-25 22:37:34 +0000 |
---|---|---|
committer | smatz <smatz@openttd.org> | 2008-07-25 22:37:34 +0000 |
commit | abea03fb896c14375491f94cfecc9c909c39d5d7 (patch) | |
tree | 1a6093e36d4bb9122b5adce8c2e74ff3fc512aa2 /src/station_cmd.cpp | |
parent | 9943ac29420d324ea580c3d869cb906e8cdc0ef8 (diff) | |
download | openttd-abea03fb896c14375491f94cfecc9c909c39d5d7.tar.xz |
(svn r13830) -Feature: show additional NewGRF info in the Tile Info window for stations, houses and industries
Diffstat (limited to 'src/station_cmd.cpp')
-rw-r--r-- | src/station_cmd.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/station_cmd.cpp b/src/station_cmd.cpp index a14c7e35a..0fc0a14df 100644 --- a/src/station_cmd.cpp +++ b/src/station_cmd.cpp @@ -43,6 +43,7 @@ #include "oldpool_func.h" #include "animated_tile_func.h" #include "elrail_func.h" +#include "newgrf.h" #include "table/sprites.h" #include "table/strings.h" @@ -2312,6 +2313,18 @@ static void GetTileDesc_Station(TileIndex tile, TileDesc *td) } td->build_date = GetStationByTile(tile)->build_date; + const StationSpec *spec = GetStationSpec(tile); + + if (spec != NULL) { + td->station_class = GetStationClassName(spec->sclass); + td->station_name = spec->name; + + if (spec->grffile != NULL) { + const GRFConfig *gc = GetGRFConfig(spec->grffile->grfid); + td->grf = gc->name; + } + } + StringID str; switch (GetStationType(tile)) { default: NOT_REACHED(); |