summaryrefslogtreecommitdiff
path: root/src/ai/api/ai_road.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ai/api/ai_road.hpp')
-rw-r--r--src/ai/api/ai_road.hpp19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/ai/api/ai_road.hpp b/src/ai/api/ai_road.hpp
index 970b833dd..a0bc131e6 100644
--- a/src/ai/api/ai_road.hpp
+++ b/src/ai/api/ai_road.hpp
@@ -64,6 +64,16 @@ public:
};
/**
+ * Types of road-related objects in the game.
+ */
+ enum BuildType {
+ BT_ROAD, //!< Build a piece of road
+ BT_DEPOT, //!< Build a road depot
+ BT_BUS_STOP, //!< Build a bus stop
+ BT_TRUCK_STOP, //!< Build a truck stop
+ };
+
+ /**
* Determines whether a busstop or a truckstop is needed to transport a certain cargo.
* @param cargo_type The cargo to test.
* @pre AICargo::IsValidCargo(cargo_type).
@@ -451,6 +461,15 @@ public:
*/
static bool RemoveRoadStation(TileIndex tile);
+ /**
+ * Get the baseprice of building a road-related object.
+ * @param roadtype the roadtype that is build (on)
+ * @param build_type the type of object to build
+ * @pre IsRoadTypeAvailable(railtype)
+ * @return The baseprice of building the given object.
+ */
+ static Money GetBuildCost(RoadType roadtype, BuildType build_type);
+
private:
/**