diff options
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(); |