Enable NewGRF debug window for non-GRF vehicles

This commit is contained in:
Jonathan G Rennison
2018-08-15 03:14:53 +01:00
parent 97d6e3c90f
commit fb3cb9c3d2
2 changed files with 5 additions and 1 deletions

View File

@@ -69,7 +69,8 @@ static const NIVariable _niv_vehicles[] = {
};
class NIHVehicle : public NIHelper {
bool IsInspectable(uint index) const { return Vehicle::Get(index)->GetGRF() != NULL; }
bool IsInspectable(uint index) const { return true; }
bool ShowExtraInfoOnly(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(); }