NewGRF: Only extend value of road stops variable 68 if feature tested for

This commit is contained in:
Jonathan G Rennison
2023-06-01 18:14:23 +01:00
parent 5989edab8d
commit 1dbbbed9e5
8 changed files with 41 additions and 11 deletions

View File

@@ -102,7 +102,12 @@ struct RoadStopScopeResolver : public ScopeResolver {
uint32 GetVariable(uint16 variable, uint32 parameter, GetVariableExtra *extra) const override;
private:
uint32 GetNearbyRoadStopsInfo(uint32 parameter, bool v2) const;
enum class NearbyRoadStopInfoMode {
Standard,
Extended,
V2,
};
uint32 GetNearbyRoadStopsInfo(uint32 parameter, NearbyRoadStopInfoMode mode) const;
};
/** Road stop resolver. */