src/station_cmd.cpp
changeset 9714 5d785e184f2d
parent 9669 da2ecea5561e
child 9718 4b7468076d31
--- a/src/station_cmd.cpp	Fri Jul 25 19:50:40 2008 +0000
+++ b/src/station_cmd.cpp	Fri Jul 25 22:37:34 2008 +0000
@@ -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 @@
 	}
 	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();