(svn r15519) -Add [NoAI]: support for waypoints by adding AIRail::Build/Remove RailWaypoint, AIWaypoint and AIWaypointList.

This commit is contained in:
yexo
2009-02-19 07:40:08 +00:00
parent c2d9c85c0f
commit c0e7ddeb9e
14 changed files with 334 additions and 0 deletions

View File

@@ -260,6 +260,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.