VoidExpanse/scope-station: Difference between revisions
(Created page with "<noinclude> Category:VoidExpanse/api_scopes </noinclude> = Scope station = Useful during store generation process. '''Visibility:''' Global. == List of functions == {{...") |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 33: | Line 33: | ||
{{Scripting_api| | {{Scripting_api|GenerateStockDistribution| | ||
* int: base_id| | |||
object: | |||
<pre style="margin:0px;"> | type: quantity| | ||
<pre style="margin:0px;">station.GenerateStockDistribution(12);</pre> | | |||
Generates stock distribution (type_of_good => quantity) based on xml data of station. | |||
}} | }} | ||
{{Scripting_api| | {{Scripting_api|GetCivilianItems| | ||
void| | |||
arrqy of string IDs| | |||
<pre style="margin:0px;"> | <pre style="margin:0px;">station.GetCivilianItems();</pre> | | ||
Returns IDs of items with xml flag "civilian". | |||
}} | }} | ||
{{Scripting_api| | {{Scripting_api|GetRandomTradeRoute| | ||
* int: ship | |||
* int: radus| | |||
<pre style="margin:0px;">var | object: | ||
* int: station_sell_id | |||
* int: station_buy_id | |||
* int: system_sell_id | |||
* int: system__buy_id | |||
* string: station_sell | |||
* string: station_buy | |||
* string: system_sell | |||
* string: system_buy | |||
* string: good | |||
* int: jumps (length of route) | |||
* double: time_left| | |||
<pre style="margin:0px;">var route = station.GetRandomTradeRoute(1324, 4);</pre> | | |||
Returns a trade route for ship withing systems of specified range. | |||
}} | }} |
Latest revision as of 03:57, 5 July 2014
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. |
GenerateStockDistribution | ||
---|---|---|
Arguments | Returns | Example |
|
object: type: quantity |
station.GenerateStockDistribution(12); |
Description | ||
{{{5}}} |
GetCivilianItems | ||
---|---|---|
Arguments | Returns | Example |
void |
arrqy of string IDs |
station.GetCivilianItems(); |
Description | ||
Returns IDs of items with xml flag "civilian". |
GetRandomTradeRoute | ||
---|---|---|
Arguments | Returns | Example |
|
object:
|
var route = station.GetRandomTradeRoute(1324, 4); |
Description | ||
Returns a trade route for ship withing systems of specified range. |