summaryrefslogtreecommitdiff
path: root/src/ai/api/ai_rail.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/ai/api/ai_rail.hpp')
-rw-r--r--src/ai/api/ai_rail.hpp21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/ai/api/ai_rail.hpp b/src/ai/api/ai_rail.hpp
index 7444907f2..0044d56a9 100644
--- a/src/ai/api/ai_rail.hpp
+++ b/src/ai/api/ai_rail.hpp
@@ -261,6 +261,27 @@ public:
static bool BuildNewGRFRailStation(TileIndex tile, RailTrack direction, uint num_platforms, uint platform_length, StationID station_id, CargoID cargo_id, IndustryType source_industry, IndustryType goal_industry, int distance, bool source_station);
/**
+ * Build a rail waypoint.
+ * @param tile Place to build the waypoint.
+ * @pre AIMap::IsValidTile(tile).
+ * @pre IsRailTile(tile).
+ * @pre GetRailTracks(tile) == RAILTRACK_NE_SW || GetRailTracks(tile) == RAILTRACK_NW_SE.
+ * @pre IsRailTypeAvailable(GetCurrentRailType()).
+ * @exception AIError::ERR_FLAT_LAND_REQUIRED
+ * @return Whether the rail waypoint has been/can be build or not.
+ */
+ static bool BuildRailWaypoint(TileIndex tile);
+
+ /**
+ * Remove a rail waypoint.
+ * @param tile Place to remove the waypoint from.
+ * @pre AIMap::IsValidTile(tile).
+ * @pre IsRailWaypointTile(tile).
+ * @return Whether the rail waypoint has been/can be removed or not.
+ */
+ static bool RemoveRailWaypoint(TileIndex tile);
+
+ /**
* Remove a rectangle of platform pieces from a rail station.
* @param tile One corner of the rectangle to clear.
* @param tile2 The oppposite corner.