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.
Turtle.suck() returning the slot the item was put into.
Started by Creator, May 26 2016 03:03 PM
5 replies to this topic
#1
Posted 26 May 2016 - 03:03 PM
#2
Posted 26 May 2016 - 03:09 PM
That would be very useful!
#3
Posted 26 May 2016 - 03: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.
My suggestion then would be to put it into the next empty slot and return the slot number.
#4
Posted 27 May 2016 - 12:30 AM
Creator, on 26 May 2016 - 03:11 PM, said:
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.
#5
Posted 29 May 2016 - 01:37 PM
Whats like this:
turtle.suck(side)
returns string what, table successful{
[slot] = count,
...
}, number failed (-- 1 by sucking 64*16+1 stones)
turtle.suck(side)
returns string what, table successful{
[slot] = count,
...
}, number failed (-- 1 by sucking 64*16+1 stones)
Edited by Sewbacca, 29 May 2016 - 01:40 PM.
#6
Posted 29 May 2016 - 03: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.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











