This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Czarified's profile picture

Turtle.suck()

Started by Czarified, 01 March 2013 - 09:44 AM
Czarified #1
Posted 01 March 2013 - 10:44 AM
I have a turtle chopping wood and detecting when the trees are grown to start chopping. I'd like to be able to have him deposit and withdraw items from the same chest. How can I specify the turtle.suck() to pull out only saplings, or only charcoal? I know to deposit I just select the slot and turtle.drop() but if i have more than 1 different item available, I don't know how to only pull the specified item.
OmegaVest #2
Posted 01 March 2013 - 10:56 AM
You can't. The easiest thing, I would say, is to use a two-chest system. One that remains empty so you can sort what stacks are what and consolidate. The other is your deposit chest. I know you want a one-chest system, but turtles are blind, and there's no way to know what is in a chest's item slots without a separate peripheral, like Misc. Peripherals.
Czarified #3
Posted 01 March 2013 - 12:41 PM
I have misc. peripherals installed, what peripheral will get the job done? and how do I use the command?

EDIT: I assume it's the inventory module? I guess for now I can just modify my setup to include two chests.
Buho #4
Posted 01 March 2013 - 01:20 PM
Czarified, make sure in your code that you keep at least one sapling and one charcoal in specific slots. Then when you suck to, say, slot 3, compare it with slots 1 and 2 to identify what you got. If you can't find what you need in the chest in 14 sucks, well, not sure how to help you there. A 2-chest system (input and output) is easier, but bulkier.