VoidExpanse/scope-station

From AtomicTorchWiki
Revision as of 09:32, 13 February 2014 by Damonwall (talk | contribs) (Created page with "<noinclude> Category:VoidExpanse/api_scopes </noinclude> = Scope station = Useful during store generation process. '''Visibility:''' Global. == List of functions == {{...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Scope station

Useful during store generation process.

Visibility: Global.

List of functions

AddItem
Arguments Returns Example
  • int: base_id
  • string: item_type
  • (optional) int: quantity

void

station.AddItem(12, "SomeItemToSell", 10);
Description

Adds item to station's store.


GetBaseByID
Arguments Returns Example
  • int: base_id

object:

  • string: faction
  • int: tech_level
  • string: name
  • double: coord_x
  • double: coord_y
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
  • int: station_id

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
  • string: item_type

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.