Debug: Enable debug window for rail waypoints

This commit is contained in:
Jonathan G Rennison 2024-08-11 10:55:09 +01:00
parent 37b129c3c0
commit 5d62cb361d
2 changed files with 8 additions and 4 deletions

View File

@ -1352,8 +1352,12 @@ GrfSpecFeature GetGrfSpecFeature(TileIndex tile)
case MP_STATION:
switch (GetStationType(tile)) {
case STATION_RAIL: return GSF_STATIONS;
case STATION_AIRPORT: return GSF_AIRPORTTILES;
case STATION_RAIL:
case STATION_WAYPOINT:
return GSF_STATIONS;
case STATION_AIRPORT:
return GSF_AIRPORTTILES;
case STATION_BUS:
case STATION_TRUCK:

View File

@ -789,7 +789,7 @@ static const NIVariable _niv_stations[] = {
class NIHStation : public NIHelper {
bool IsInspectable(uint index) const override { return GetStationSpec(index) != nullptr; }
uint GetParent(uint index) const override { return GetTownInspectWindowNumber(Station::GetByTile(index)->town); }
uint GetParent(uint index) const override { return GetTownInspectWindowNumber(BaseStation::GetByTile(index)->town); }
bool ShowSpriteDumpButton(uint index) const override { return true; }
const void *GetInstance(uint index)const override { return nullptr; }
const void *GetSpec(uint index) const override { return GetStationSpec(index); }
@ -798,7 +798,7 @@ class NIHStation : public NIHelper {
uint Resolve(uint index, uint var, uint param, GetVariableExtra *extra) const override
{
StationResolverObject ro(GetStationSpec(index), Station::GetByTile(index), index, INVALID_RAILTYPE);
StationResolverObject ro(GetStationSpec(index), BaseStation::GetByTile(index), index, INVALID_RAILTYPE);
return ro.GetScope(VSG_SCOPE_SELF)->GetVariable(var, param, extra);
}