Add: New RoadType API functions.
This commit is contained in:
@@ -13,6 +13,7 @@
|
||||
#define SCRIPT_ROAD_HPP
|
||||
|
||||
#include "script_tile.hpp"
|
||||
#include "../../../road.h"
|
||||
|
||||
/**
|
||||
* Class that handles all road related functions.
|
||||
@@ -58,6 +59,14 @@ public:
|
||||
ROADTYPE_INVALID = -1, ///< Invalid RoadType.
|
||||
};
|
||||
|
||||
/**
|
||||
* Road/tram types
|
||||
*/
|
||||
enum RoadTramTypes {
|
||||
ROADTRAMTYPES_ROAD = ::RTTB_ROAD, ///< Road road types.
|
||||
ROADTRAMTYPES_TRAM = ::RTTB_TRAM, ///< Tram road types.
|
||||
};
|
||||
|
||||
/**
|
||||
* Type of road station.
|
||||
*/
|
||||
@@ -537,6 +546,13 @@ public:
|
||||
*/
|
||||
static Money GetBuildCost(RoadType roadtype, BuildType build_type);
|
||||
|
||||
/**
|
||||
* Test if a road type is for road or trams.
|
||||
* @param roadtype the roadtype to test.
|
||||
* @return RoadTramTypes of the road types.
|
||||
*/
|
||||
static RoadTramTypes GetRoadTramType(RoadType roadtype);
|
||||
|
||||
/**
|
||||
* Get the maximum speed of road vehicles running on this roadtype.
|
||||
* @param road_type The roadtype to get the maximum speed of.
|
||||
|
Reference in New Issue
Block a user