summaryrefslogtreecommitdiff
path: root/src/table/newgrf_debug_data.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/table/newgrf_debug_data.h')
-rw-r--r--src/table/newgrf_debug_data.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/table/newgrf_debug_data.h b/src/table/newgrf_debug_data.h
index 064b6a9a5..b937eeea7 100644
--- a/src/table/newgrf_debug_data.h
+++ b/src/table/newgrf_debug_data.h
@@ -398,7 +398,14 @@ class NIHRailType : public NIHelper {
const void *GetSpec(uint index) const { return NULL; }
void SetStringParameters(uint index) const { this->SetObjectAtStringParameters(STR_NEWGRF_INSPECT_CAPTION_OBJECT_AT_RAIL_TYPE, INVALID_STRING_ID, index); }
uint32 GetGRFID(uint index) const { return 0; }
- void Resolve(ResolverObject *ro, uint32 index) const { extern void GetRailTypeResolver(ResolverObject *ro, uint index); GetRailTypeResolver(ro, index); }
+
+ /* virtual */ uint Resolve(uint index, uint var, uint param, bool *avail) const
+ {
+ /* There is no unique GRFFile for the tile. Multiple GRFs can define different parts of the railtype.
+ * However, currently the NewGRF Debug GUI does not display variables depending on the GRF (like 0x7F) anyway. */
+ RailTypeResolverObject ro(index, TCX_NORMAL, NULL);
+ return ro.GetScope(ro.scope)->GetVariable(var, param, avail);
+ }
};
static const NIFeature _nif_railtype = {