Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
component:robot [2018/09/27 02:07]
payonel
component:robot [2018/09/27 02:08]
payonel
Line 6: Line 6:
 ====InventoryController Trait API==== ====InventoryController Trait API====
  
-- `inventorySize():number`  ​ +{{page>​component:agent#Robot Component API&​noheader&​nofooter}} 
-  ​Returns the size of the device'​s internal inventory. +{{page>​component:agent#Agent Trait API&​noheader&​nofooter}}
-- `select([slot:number]):​number` ​  +
-  Get the currently selected slot; set the selected slot if specified. +
-- `count([slot:​number]):​number` ​  +
-  Get the number of items in the specified slot, otherwise in the selected slot. +
-- `space([slot:​number]):​number` ​  +
-  Get the remaining space in the specified slot, otherwise in the selected slot. +
-- `compareTo(otherSlot:​number):​boolean` ​  +
-  Compare the contents of the selected slot (in the robot inventory) to the contents of the specified slot (also in the robot inventory). +
-- `transferTo(toSlot:​number[,​ amount:​number]):​boolean` ​  +
-  Move the specified amount of items from the selected slot into the specified slot. If no amount is specified, the entire stack is moved to the target slot. +
  
 ====WorldControl Trait API==== ====WorldControl Trait API====