VoidExpanse/scope-items: Difference between revisions
Ai enabled (talk | contribs) |
Ai enabled (talk | contribs) |
||
Line 19: | Line 19: | ||
* int objId| | * int objId| | ||
ID of the container|| | ID of the container|| | ||
Get container for any space object (currently it works for ship and crate containers) | Get container for any space object (currently it works for ship and crate containers). | ||
}} | }} | ||
Line 26: | Line 26: | ||
ID of the container|| | ID of the container|| | ||
Returns array of items and cargo of the container. Array contains of objects with fields "item_id", "xml_id", "quantity". | Returns array of items and cargo of the container. Array contains of objects with fields "item_id", "xml_id", "quantity". | ||
}} | |||
{{Scripting_api|GetShipInventoryContainerId| | |||
* int shipID| | |||
ID of the container|| | |||
Returns ID of the ship inventory and cargo container. You can get it also by the GetGameObjectContainerId() function. | |||
}} | |||
{{Scripting_api|GetStationShopContainerId| | |||
* int stationID| | |||
ID of the container|| | |||
Returns ID of the station shop container, which contains all the items available for sale on the station. | |||
}} | }} |
Revision as of 09:15, 20 April 2015
Items scope
Used to access items containers, add or remove items.
Visibility: Global.
List of functions
AddItem | ||
---|---|---|
Arguments | Returns | Example |
|
object with fields: item_id, xml_id, type, quantity |
|
Description | ||
Add item of specific type and quantity to the specified container ID. Returned object contains "type" field, which can have "item" or "resource" value. |
GetGameObjectContainerId | ||
---|---|---|
Arguments | Returns | Example |
|
ID of the container |
|
Description | ||
Get container for any space object (currently it works for ship and crate containers). |
GetItemsAndCargo | ||
---|---|---|
Arguments | Returns | Example |
|
ID of the container |
|
Description | ||
Returns array of items and cargo of the container. Array contains of objects with fields "item_id", "xml_id", "quantity". |
GetShipInventoryContainerId | ||
---|---|---|
Arguments | Returns | Example |
|
ID of the container |
|
Description | ||
Returns ID of the ship inventory and cargo container. You can get it also by the GetGameObjectContainerId() function. |
GetStationShopContainerId | ||
---|---|---|
Arguments | Returns | Example |
|
ID of the container |
|
Description | ||
Returns ID of the station shop container, which contains all the items available for sale on the station. |