This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
component:inventory_controller [2015/02/07 01:28] shawniac |
component:inventory_controller [2015/04/05 15:37] rashy Added missing functions. |
||
---|---|---|---|
Line 46: | Line 46: | ||
**Returns:** `true` if the items were swapped, `false` otherwise. This operation usually succeeds. | **Returns:** `true` if the items were swapped, `false` otherwise. This operation usually succeeds. | ||
Note that you can put any kind of item into the robot's tool slot, not only tools, even items that the robot cannot use at all. | Note that you can put any kind of item into the robot's tool slot, not only tools, even items that the robot cannot use at all. | ||
+ | - `store(side:number, slot:number, dbAddress:string, dbSlot:number):boolean` | ||
+ | Stores the Itemstack description of the item from the specified slot in an inventory on the specified side, into a specified database slot with the specified address. | ||
+ | - `storeInternal(slot:number, dbAddress:string, dBslot:number):boolean` | ||
+ | Stores Itemstack description of item in specified robot inventory slot into specified database slot with the specified database address. | ||
+ | - `compareToDatabase(slot:number, dBaddress:string, dBslot:number):boolean` | ||
+ | Compare Itemstack description in specified slot with one in specified slot of a database with specified address. Returns **true** if items match. | ||
+ | - `compareStacks(side:number, slotA:number, slotB:number):boolean` | ||
+ | Checks to see if Itemstack descriptions in specified slotA and slotB of inventory on specified side match. Returns **true** if identical. | ||
+ | - `getSlotMaxStackSize(side:number, slot:number):number` | ||
+ | Gets maximum number of items in specified slot in inventory on the specified side. | ||
+ | - `getSlotStackSize(side:number, slot:number):number` | ||
+ | Gets number of items in specified slot in inventory on the specified side. | ||
+ | - `getStackInInternalSlot(slot:number):table` | ||
+ | Gets Itemstack description of item in specified or selected slot (if no input provided) or robot inventory. | ||
Example: | Example: |