MinchinWeb's MetaLibrary v.11
Library functions for OpenTTD AI (and GS) writers.
|
Station. More...
Public Member Functions | |
function | BuildStreetcarStation (Tile, Loop=true) |
Build a streetcar station. | |
function | GetName (Tile, StationType=AIStation.STATION_ANY) |
Get a station's name. |
Static Public Member Functions | |
function | IsCargoAccepted (StationID, CargoID) |
Checks whether a certain Station accepts a given cargo. | |
function | IsNextToDock (TileID) |
Checks whether a given tile is next to a dock. | |
function | DistanceFromStation (VehicleID, StationID) |
Returns the distance between a given vehicle and a given station. |
Private Attributes | |
main = null |
Station.
These are functions relating to dealing with stations.
Definition at line 38 of file Station.nut.
function _MinchinWeb_Station_::BuildStreetcarStation | ( | Tile | , |
Loop | = true ) |
Build a streetcar station.
First tries to build a streetcar station with a half-tile loop on each end; if that works, actually build it.
Tile | |
Loop | If true, build a loop connecting the two ends |
Definition at line 132 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 125 of file Station.nut.
function _MinchinWeb_Station_::GetName | ( | Tile | , |
StationType | = AIStation.STATION_ANY ) |
Get a station's name.
Tile | Tile assumed to be part of the station. |
StationType | One of AIStation: AIStation.STATION_TRAIN, AIStation.STATION_TRUCK_STOP, AIStation.STATION_BUS_STOP, AIStation.STATION_AIRPORT, AIStation.STATION_DOCK, or AIStation.STATION_ANY. |
Definition at line 200 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) |
Definition at line 97 of file Station.nut.
|
static |
Checks whether a given tile is next to a dock.
TileID | ID of the tile (as an integer) |
Definition at line 112 of file Station.nut.
|
private |
Definition at line 39 of file Station.nut.