**This is an old revision of the document!**

Component: Inventory Controller

This component is provided by the inventory controller upgrade.

Component name: inventory_controller.
Callbacks:

  • getInventorySize():number
    Get the number of slots in the inventory on the specified side of the robot. Back refers to the robot's own inventory.
  • getStackInSlot(facing:number, slot:number):table
    Get a description of the stack at the specified index in the the inventory on the specified side of the robot. Back refers to the robot's own inventory.
  • dropIntoSlot(facing:number, slot:number[, count:number]):boolean
    Drops the selected item stack into the specified slot of an inventory.
  • suckFromSlot(facing:number, slot:number[, count:number]):boolean
    Sucks items from the specified slot of an inventory.
  • equip():boolean
    Swaps the equipped tool with the content of the currently selected inventory slot.