OpenTTD AI API
20241117-master-ga6c526cfa0
|
Class that handles all waypoint related functions. More...
Public Types | |
enum | ErrorMessages { ERR_WAYPOINT_BASE , ERR_WAYPOINT_TOO_CLOSE_TO_ANOTHER_WAYPOINT , ERR_WAYPOINT_ADJOINS_MULTIPLE_WAYPOINTS } |
All waypoint related error messages. More... | |
enum | WaypointType { WAYPOINT_RAIL , WAYPOINT_BUOY , WAYPOINT_ANY } |
Type of waypoints known in the game. More... | |
Public Types inherited from AIBaseStation | |
enum | SpecialStationIDs { STATION_NEW , STATION_JOIN_ADJACENT , STATION_INVALID } |
Special station IDs for building adjacent/new stations when the adjacent/distant join features are enabled. More... | |
Static Public Member Functions | |
static bool | IsValidWaypoint (StationID waypoint_id) |
Checks whether the given waypoint is valid and owned by you. More... | |
static StationID | GetWaypointID (TileIndex tile) |
Get the StationID of a tile. More... | |
static bool | HasWaypointType (StationID waypoint_id, WaypointType waypoint_type) |
Check if any part of the waypoint contains a waypoint of the type waypoint_type. More... | |
Static Public Member Functions inherited from AIBaseStation | |
static bool | IsValidBaseStation (StationID station_id) |
Checks whether the given basestation is valid and owned by you. More... | |
static string | GetName (StationID station_id) |
Get the name of a basestation. More... | |
static bool | SetName (StationID station_id, Text *name) |
Set the name this basestation. More... | |
static TileIndex | GetLocation (StationID station_id) |
Get the current location of a basestation. More... | |
static AIDate::Date | GetConstructionDate (StationID station_id) |
Get the last calendar-date a station part was added to this station. More... | |
Class that handles all waypoint related functions.
All waypoint related error messages.
Get the StationID of a tile.
tile | The tile to find the StationID of. |
|
static |
Check if any part of the waypoint contains a waypoint of the type waypoint_type.
waypoint_id | The waypoint to look at. |
waypoint_type | The WaypointType to look for. |
|
static |
Checks whether the given waypoint is valid and owned by you.
waypoint_id | The waypoint to check. |