Posted 15 November 2013 - 09:59 PM

Jyzarc, on 15 November 2013 - 05:17 PM, said:

Thank you, I will probably make a spotlight of this in a few days, but I dont really understand the getSlotsFromSide() and pullFromComputerToSide() methods, can you explain those?



As you know, each inventory block has a set of slots representing each space you can put items in. OpenPeripheral gives you some level of access to these by letting you say "Move an item from slot a to slot b of the adjacent inventory." In a sided inventory, each side of the block corresponds to a certain few slots. getSlotsFromSide returns a table with all of those slots for a specified side.With CCTransport, a computer has a small buffer inventory. It fits exactly one itemstack. You use pushToComputer(slot) to push an itemstack from the slot in the inventory to the buffer in the computer. To get it out, any inventory can then use pullFromComputer(slot) to pull the stack from the computer into the slot. In the case of sided inventories, pullFromComputerToSide(side) doesn't specify a slot. It specifies a side, and CCTransport tries its best to push the stack in, similar to piping an item in from that side with BuildCraft or something.