summaryrefslogtreecommitdiff
path: root/src/table
diff options
context:
space:
mode:
Diffstat (limited to 'src/table')
-rw-r--r--src/table/newgrf_debug_data.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/table/newgrf_debug_data.h b/src/table/newgrf_debug_data.h
index e7867e3aa..e24a183c8 100644
--- a/src/table/newgrf_debug_data.h
+++ b/src/table/newgrf_debug_data.h
@@ -61,12 +61,12 @@ static const NIVariable _niv_vehicles[] = {
};
class NIHVehicle : public NIHelper {
- bool IsInspectable(uint index) const { return Vehicle::Get(index)->GetEngine()->grf_prop.grffile != NULL; }
+ bool IsInspectable(uint index) const { return Vehicle::Get(index)->GetGRF() != NULL; }
uint GetParent(uint index) const { const Vehicle *first = Vehicle::Get(index)->First(); return GetInspectWindowNumber(GetGrfSpecFeature(first->type), first->index); }
const void *GetInstance(uint index)const { return Vehicle::Get(index); }
const void *GetSpec(uint index) const { return Vehicle::Get(index)->GetEngine(); }
void SetStringParameters(uint index) const { this->SetSimpleStringParameters(STR_VEHICLE_NAME, index); }
- uint32 GetGRFID(uint index) const { return (this->IsInspectable(index)) ? Vehicle::Get(index)->GetEngine()->grf_prop.grffile->grfid : 0; }
+ uint32 GetGRFID(uint index) const { return Vehicle::Get(index)->GetGRFID(); }
void Resolve(ResolverObject *ro, uint32 index) const { extern void GetVehicleResolver(ResolverObject *ro, uint index); GetVehicleResolver(ro, index); }
};