OpenTTD GameScript API
1.10.3
|
Creates a list of next hops of cargo planned to pass a station and originating from another station, with the monthly amounts of cargo planned for each of those next hops as values. More...
Public Member Functions | |
GSStationList_CargoPlannedFromByVia (StationID station_id, CargoID cargo, StationID from) | |
![]() | |
GSStationList_CargoPlanned (GSStationList_Cargo::CargoSelector selector, StationID station_id, CargoID cargo, StationID other_station) | |
Creates a list of stations associated with cargo planned to pass the station, selected and grouped by the chosen criteria. More... | |
![]() | |
GSStationList_Cargo (GSStationList_Cargo::CargoMode mode, GSStationList_Cargo::CargoSelector selector, StationID station_id, CargoID cargo, StationID other_station) | |
Creates a list of stations associated with cargo in the specified way, selected and grouped by the chosen criteria. More... | |
![]() | |
void | AddItem (int64 item, int64 value) |
Add a single item to the list. More... | |
void | RemoveItem (int64 item) |
Remove a single item from the list. More... | |
void | Clear () |
Clear the list, making Count() returning 0 and IsEmpty() returning true. | |
bool | HasItem (int64 item) |
Check if an item is in the list. More... | |
int64 | Begin () |
Go to the beginning of the list and return the item. More... | |
int64 | Next () |
Go to the next item in the list and return the item. More... | |
bool | IsEmpty () |
Check if a list is empty. More... | |
bool | IsEnd () |
Check if there is a element left. More... | |
int32 | Count () |
Returns the amount of items in the list. More... | |
int64 | GetValue (int64 item) |
Get the value that belongs to this item. More... | |
bool | SetValue (int64 item, int64 value) |
Set a value of an item directly. More... | |
void | Sort (SorterType sorter, bool ascending) |
Sort this list by the given sorter and direction. More... | |
void | AddList (GSList *list) |
Add one list to another one. More... | |
void | SwapList (GSList *list) |
Swap the contents of two lists. More... | |
void | RemoveAboveValue (int64 value) |
Removes all items with a higher value than 'value'. More... | |
void | RemoveBelowValue (int64 value) |
Removes all items with a lower value than 'value'. More... | |
void | RemoveBetweenValue (int64 start, int64 end) |
Removes all items with a value above start and below end. More... | |
void | RemoveValue (int64 value) |
Remove all items with this value. More... | |
void | RemoveTop (int32 count) |
Remove the first count items. More... | |
void | RemoveBottom (int32 count) |
Remove the last count items. More... | |
void | RemoveList (GSList *list) |
Remove everything that is in the given list from this list (same item index that is). More... | |
void | KeepAboveValue (int64 value) |
Keep all items with a higher value than 'value'. More... | |
void | KeepBelowValue (int64 value) |
Keep all items with a lower value than 'value'. More... | |
void | KeepBetweenValue (int64 start, int64 end) |
Keep all items with a value above start and below end. More... | |
void | KeepValue (int64 value) |
Keep all items with this value. More... | |
void | KeepTop (int32 count) |
Keep the first count items, i.e. More... | |
void | KeepBottom (int32 count) |
Keep the last count items, i.e. More... | |
void | KeepList (GSList *list) |
Keeps everything that is in the given list from this list (same item index that is). More... | |
void | Valuate (void *valuator_function, int params,...) |
Give all items a value defined by the valuator you give. More... | |
Additional Inherited Members | |
![]() | |
enum | CargoSelector { CS_BY_FROM, CS_VIA_BY_FROM, CS_BY_VIA, CS_FROM_BY_VIA } |
Criteria of selecting and grouping cargo at a station. More... | |
enum | CargoMode { CM_WAITING, CM_PLANNED } |
Ways of associating cargo to stations. More... | |
![]() | |
enum | SorterType { SORT_BY_VALUE, SORT_BY_ITEM } |
Type of sorter. More... | |
![]() | |
static const bool | SORT_ASCENDING = true |
Sort ascending. | |
static const bool | SORT_DESCENDING = false |
Sort descending. | |
Creates a list of next hops of cargo planned to pass a station and originating from another station, with the monthly amounts of cargo planned for each of those next hops as values.
Cargo planned to go "via" the station being queried will actually be delivered there.
GSStationList_CargoPlannedFromByVia::GSStationList_CargoPlannedFromByVia | ( | StationID | station_id, |
CargoID | cargo, | ||
StationID | from | ||
) |
station_id | Station to query for planned flows. |
cargo | Cargo type to query for. |
from | Origin station to restrict the query with. |