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 | 05c2a8eba4d3a7e703235cad3eeb7f585faae59d (patch) | |
tree | 1a6093e36d4bb9122b5adce8c2e74ff3fc512aa2 /src/misc_gui.cpp | |
parent | ce7585101d58c617da5df7ebcbd76ab3ae64744f (diff) | |
download | openttd-05c2a8eba4d3a7e703235cad3eeb7f585faae59d.tar.xz |
(svn r13830) -Feature: show additional NewGRF info in the Tile Info window for stations, houses and industries
Diffstat (limited to 'src/misc_gui.cpp')
-rw-r--r-- | src/misc_gui.cpp | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp index 69f2d10b0..00ccd5c2b 100644 --- a/src/misc_gui.cpp +++ b/src/misc_gui.cpp @@ -73,7 +73,7 @@ static const WindowDesc _land_info_desc = { class LandInfoWindow : public Window { enum { - LAND_INFO_CENTERED_LINES = 9, ///< Up to 9 centered lines + LAND_INFO_CENTERED_LINES = 12, ///< Up to 12 centered lines LAND_INFO_MULTICENTER_LINE = LAND_INFO_CENTERED_LINES, ///< One multicenter line LAND_INFO_LINE_END, @@ -131,6 +131,11 @@ public: td.owner[2] = OWNER_NONE; td.owner[3] = OWNER_NONE; + td.station_class = STR_NULL; + td.station_name = STR_NULL; + + td.grf = NULL; + GetAcceptedCargo(tile, ac); GetTileDesc(tile, &td); @@ -186,6 +191,29 @@ public: line_nr++; } + /* Station class */ + if (td.station_class != STR_NULL) { + SetDParam(0, td.station_class); + GetString(this->landinfo_data[line_nr], STR_TILEDESC_STATION_CLASS, lastof(this->landinfo_data[line_nr])); + line_nr++; + } + + /* Station type name */ + if (td.station_name != STR_NULL) { + SetDParam(0, td.station_name); + GetString(this->landinfo_data[line_nr], STR_TILEDESC_STATION_TYPE, lastof(this->landinfo_data[line_nr])); + line_nr++; + } + + /* NewGRF name */ + if (td.grf != NULL) { + SetDParamStr(0, td.grf); + GetString(this->landinfo_data[line_nr], STR_TILEDESC_NEWGRF_NAME, lastof(this->landinfo_data[line_nr])); + line_nr++; + } + + assert(line_nr < LAND_INFO_CENTERED_LINES); + /* Mark last line empty */ this->landinfo_data[line_nr][0] = '\0'; |