summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2010-08-28 18:54:12 +0000
committerrubidium <rubidium@openttd.org>2010-08-28 18:54:12 +0000
commit9991c8677d257aa94c131e4bce64124af051c594 (patch)
treeac7e6733926869c9391e7faada36477ce001ce29 /src
parent60fe27db5060a4079dc58b8b61355f0a57757e36 (diff)
downloadopenttd-9991c8677d257aa94c131e4bce64124af051c594.tar.xz
(svn r20663) -Codechange: add the GRF name to the tile info window
Diffstat (limited to 'src')
-rw-r--r--src/object_cmd.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/object_cmd.cpp b/src/object_cmd.cpp
index 8978fb9cd..a45903777 100644
--- a/src/object_cmd.cpp
+++ b/src/object_cmd.cpp
@@ -23,7 +23,6 @@
#include "window_func.h"
#include "company_gui.h"
#include "cheat_type.h"
-#include "landscape_type.h"
#include "object.h"
#include "cargopacket.h"
#include "sprite.h"
@@ -31,6 +30,8 @@
#include "core/pool_func.hpp"
#include "object_map.h"
#include "object_base.h"
+#include "newgrf.h"
+#include "newgrf_config.h"
#include "newgrf_object.h"
#include "date_func.h"
@@ -373,9 +374,14 @@ static void AddAcceptedCargo_Object(TileIndex tile, CargoArray &acceptance, uint
static void GetTileDesc_Object(TileIndex tile, TileDesc *td)
{
- td->str = ObjectSpec::GetByTile(tile)->name;
+ const ObjectSpec *spec = ObjectSpec::GetByTile(tile);
+ td->str = spec->name;
td->owner[0] = GetTileOwner(tile);
td->build_date = Object::GetByTile(tile)->build_date;
+
+ if (spec->grf_prop.grffile != NULL) {
+ td->grf = GetGRFConfig(spec->grf_prop.grffile->grfid)->GetName();
+ }
}
static void TileLoop_Object(TileIndex tile)