MinchinWeb's MetaLibrary
v.9
Library functions of OpenTTD AI writers.
|
Station. More...
Static Public Member Functions | |
function | IsCargoAccepted (StationID, CargoID) |
Checks whether a certain Station accepts a given cargo. More... | |
function | IsNextToDock (TileID) |
Checks whether a given tile is next to a dock. More... | |
function | DistanceFromStation (VehicleID, StationID) |
Returns the distance between a given vehicle and a given station. More... | |
Private Attributes | |
main = null | |
Station.
These are functions relating to dealing with stations.
Definition at line 38 of file Station.nut.
|
static |
Returns the distance between a given vehicle and a given station.
VehicleID | ID of the vehicle (as an integer) |
StationID | ID of the station (as an integer) |
Add check that supplied VehicleID and StationID are valid
Add example of valuator code
Definition at line 102 of file Station.nut.
|
static |
Checks whether a certain Station accepts a given cargo.
StationID | ID of the station (as an integer) |
CargoID | ID of the cargo (as an integer) |
null
if the StationID or CargoID are invalid. Returns true or false, depending on if the cargo is accepted Definition at line 74 of file Station.nut.
|
static |
Checks whether a given tile is next to a dock.
TileID | ID of the tile (as an integer) |
True
if the tile is next to a dock, False
otherwise. Definition at line 89 of file Station.nut.
|
private |
Definition at line 39 of file Station.nut.