CC: Tweaked

CC: Tweaked

65M Downloads

Turtle API does not include the ability to push/pull Items

z256z opened this issue ยท 5 comments

commented

Going into lua and wrapping any turtle you see this:

Image There appears to not be an option for "pullItems() or pushItems()" despite having an inventory of their own. Unless I have missed it somewhere.... is there a way to push/pull items from a turtle to say... another turtle? without using a peripheral in between like a barrel or chest?
commented

Use turtle.select and turtle.drop

commented

No. Turtle > Modem > Turtle.
There is no way of transfering items this was

commented

add a chest or other compatible inventory to the network and use it as an in-between for moving things between the two turtles
turtles can be the target of a push and pull method even though they don't have the method on them

chest.pullItems("turtle_1", ...)
chest.pushItems("turtle_2", ...)
commented

Wouldn't it make more sense to just add pull/push to turtles to avoid adding another inventory to the network? Seems a bit odd that a turtle has the perfect inventory for this and yet cannot pass items through itself...

commented

The source of this issue is how generic peripherals interact with regular ones.
Basically, if you implement regular peripheral for anything, generic peripheral is overwritten and get lost. And CC:T currently doesn't provide any simple way to just attach inventory methods back