OpenTTD AI API 20250222-master-g9a8d9e4e48
|
Base class for stations and waypoints. More...
#include <script_basestation.hpp>
Static Public Member Functions | |
static bool | IsValidBaseStation (StationID station_id) |
Checks whether the given basestation is valid and owned by you. | |
static string | GetName (StationID station_id) |
Get the name of a basestation. | |
static bool | SetName (StationID station_id, Text *name) |
Set the name this basestation. | |
static TileIndex | GetLocation (StationID station_id) |
Get the current location of a basestation. | |
static AIDate::Date | GetConstructionDate (StationID station_id) |
Get the last calendar-date a station part was added to this station. | |
Static Public Attributes | |
static constexpr StationID | STATION_NEW = ::NEW_STATION |
Build a new station. | |
static constexpr StationID | STATION_JOIN_ADJACENT = ::ADJACENT_STATION |
Join an neighbouring station if one exists. | |
static constexpr StationID | STATION_INVALID = ::StationID::Invalid() |
Invalid station id. | |
Base class for stations and waypoints.
|
static |
Get the last calendar-date a station part was added to this station.
station_id | The station to look at. |
Get the current location of a basestation.
station_id | The basestation to get the location of. |
|
static |
Get the name of a basestation.
station_id | The basestation to get the name of. |
|
static |
Checks whether the given basestation is valid and owned by you.
station_id | The station to check. |
|
static |
Set the name this basestation.
station_id | The basestation to set the name of. |
name | The new name of the station (can be either a raw string, or a AIText object). |
AIError::ERR_NAME_IS_NOT_UNIQUE |