2679 posts
Location
You will never find me, muhahahahahaha
Posted 26 May 2016 - 04:03 PM
It would make programing management systems that utilize turtles so much easier.
turtle.suck and the like should return true and the the slot number.
1220 posts
Location
Earth orbit
Posted 26 May 2016 - 04:09 PM
That would be very useful!
2679 posts
Location
You will never find me, muhahahahahaha
Posted 26 May 2016 - 04:11 PM
However, brainderp! Just realized items are put into the selected slot.
My suggestion then would be to put it into the next empty slot and return the slot number.
7083 posts
Location
Tasmania (AU)
Posted 27 May 2016 - 01:30 AM
My suggestion then would be to put it into the next empty slot and return the slot number.
That sounds like a massive backwards compatibility issue to me. And what if there
is no empty slot, but there
are some half-filled ones?
Heck, even if you stick with the current system, there's no guarantee that the items won't be distributed over
multiple slots.
I'm also not seeing the benefit here, either. It's already far easier to rig things so you know exactly where the sucked items will go, then it would ever be to try and figure that out after the fact.
463 posts
Location
Star Wars
Posted 29 May 2016 - 02:37 PM
Whats like this:
turtle.suck(side)
returns string what, table successful{
[slot] = count,
…
}, number failed (– 1 by sucking 64*16+1 stones)
Edited on 29 May 2016 - 12:40 PM
1610 posts
Posted 29 May 2016 - 04:35 PM
All of this can be emulated with the functions available. You can loop throughout the turtle's inventory before and after sucking up items and check what slots changed. There's no need to alter existing functions in a way that would cause compatibility issues.