Add: New RoadType API functions.

This commit is contained in:
peter1138
2019-04-06 20:50:00 +01:00
committed by Michael Lutz
parent c02ef3e456
commit 3293f08e0b
24 changed files with 231 additions and 2 deletions

View File

@@ -217,6 +217,28 @@ public:
*/
static bool HasPowerOnRail(EngineID engine_id, ScriptRail::RailType track_rail_type);
/**
* Check if a road vehicle can run on a RoadType.
* @param engine_id The engine to check.
* @param road_type Another RoadType.
* @pre IsValidEngine(engine_id).
* @pre GetVehicleType(engine_id) == ScriptVehicle::VT_ROAD.
* @pre ScriptRoad::IsRoadTypeAvailable(road_type).
* @return Whether an engine of type 'engine_id' can run on 'road_type'.
*/
static bool CanRunOnRoad(EngineID engine_id, ScriptRoad::RoadType road_type);
/**
* Check if a road vehicle has power on a RoadType.
* @param engine_id The engine to check.
* @param road_type Another RoadType.
* @pre IsValidEngine(engine_id).
* @pre GetVehicleType(engine_id) == ScriptVehicle::VT_ROAD.
* @pre ScriptRoad::IsRoadTypeAvailable(road_type).
* @return Whether an engine of type 'engine_id' has power on 'road_type'.
*/
static bool HasPowerOnRoad(EngineID engine_id, ScriptRoad::RoadType road_type);
/**
* Get the RoadType of the engine.
* @param engine_id The engine to get the RoadType of.