summaryrefslogtreecommitdiff
path: root/src/script/api/script_road.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/script/api/script_road.hpp')
-rw-r--r--src/script/api/script_road.hpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/script/api/script_road.hpp b/src/script/api/script_road.hpp
index 6da45acc2..39cf0420b 100644
--- a/src/script/api/script_road.hpp
+++ b/src/script/api/script_road.hpp
@@ -13,6 +13,7 @@
#define SCRIPT_ROAD_HPP
#include "script_tile.hpp"
+#include "../../../road.h"
/**
* Class that handles all road related functions.
@@ -59,6 +60,14 @@ public:
};
/**
+ * Road/tram types
+ */
+ enum RoadTramTypes {
+ ROADTRAMTYPES_ROAD = ::RTTB_ROAD, ///< Road road types.
+ ROADTRAMTYPES_TRAM = ::RTTB_TRAM, ///< Tram road types.
+ };
+
+ /**
* Type of road station.
*/
enum RoadVehicleType {
@@ -538,6 +547,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.
* @pre IsRoadTypeAvailable(road_type)