VoidExpanse/scope-station
Scope station
Useful during store generation process.
Visibility: Global.
List of functions
| AddItem | ||
|---|---|---|
| Arguments | Returns | Example |
|
void |
station.AddItem(12, "SomeItemToSell", 10); |
| Description | ||
|
Adds item to station's store. | ||
| GetBaseByID | ||
|---|---|---|
| Arguments | Returns | Example |
|
object:
|
station.GetBaseByID(131); |
| Description | ||
|
Returns info about base. | ||
| GetAllItems | ||
|---|---|---|
| Arguments | Returns | Example |
|
void |
array: xml-ids (strings) of all items |
var res = station.GetAllItems(); |
| Description | ||
|
Gets all items. | ||
| GetAllItemsFitsToStationLevel | ||
|---|---|---|
| Arguments | Returns | Example |
|
array: xml-ids (strings) of items |
var res = station.GetAllItemsFitsToStationLevel(132); |
| Description | ||
|
Gets all items, which shops_level parameter is equal or below specified station's level (actually, station has no level, so system's tech level, in which station is situated, will be taken). | ||
| GetAllItemsOfItemType | ||
|---|---|---|
| Arguments | Returns | Example |
|
array: xml-ids (strings) of items |
var res = station.GetAllItemsOfItemType("Hulls");
|
| Description | ||
|
Gets all items of specified type. Types are: "Devices", "Hulls", "Resources", "Weapons". All types can be gained with station.GetItemTypes. | ||
| GetItemTypes | ||
|---|---|---|
| Arguments | Returns | Example |
|
void |
array: strings of types |
var res = station.GetItemTypes(); |
| Description | ||
|
Return all items types. Useful with function station.GetAllItemsOfItemType. | ||