summaryrefslogtreecommitdiff
path: root/src/table
diff options
context:
space:
mode:
authoralberth <alberth@openttd.org>2012-11-10 20:41:08 +0000
committeralberth <alberth@openttd.org>2012-11-10 20:41:08 +0000
commitc417efc962a2d452bf52842b615bf3e09ecef7d6 (patch)
tree0b852206cf2bd7dc51285746fe7b8241f458d032 /src/table
parenta9b8b22daf38be899b5fd13e8028b7a9e5f5bcfc (diff)
downloadopenttd-c417efc962a2d452bf52842b615bf3e09ecef7d6.tar.xz
(svn r24684) -Codechange: Add resolver classes for stations.
Diffstat (limited to 'src/table')
-rw-r--r--src/table/newgrf_debug_data.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/table/newgrf_debug_data.h b/src/table/newgrf_debug_data.h
index 8a669fee5..064b6a9a5 100644
--- a/src/table/newgrf_debug_data.h
+++ b/src/table/newgrf_debug_data.h
@@ -126,7 +126,12 @@ class NIHStation : public NIHelper {
const void *GetSpec(uint index) const { return GetStationSpec(index); }
void SetStringParameters(uint index) const { this->SetObjectAtStringParameters(STR_STATION_NAME, GetStationIndex(index), index); }
uint32 GetGRFID(uint index) const { return (this->IsInspectable(index)) ? GetStationSpec(index)->grf_prop.grffile->grfid : 0; }
- void Resolve(ResolverObject *ro, uint32 index) const { extern void GetStationResolver(ResolverObject *ro, uint index); GetStationResolver(ro, index); }
+
+ /* virtual */ uint Resolve(uint index, uint var, uint param, bool *avail) const
+ {
+ StationResolverObject ro(GetStationSpec(index), Station::GetByTile(index), index);
+ return ro.GetScope(ro.scope)->GetVariable(var, param, avail);
+ }
};
static const NIFeature _nif_station = {