Jump to content




Turtle.suck() returning the slot the item was put into.


  • You cannot reply to this topic
5 replies to this topic

#1 Creator

    Mad Dash Victor

  • Members
  • 2,168 posts
  • LocationYou will never find me, muhahahahahaha

Posted 26 May 2016 - 03: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.

#2 Dog

  • Members
  • 1,179 posts
  • LocationEarth orbit

Posted 26 May 2016 - 03:09 PM

That would be very useful!

#3 Creator

    Mad Dash Victor

  • Members
  • 2,168 posts
  • LocationYou will never find me, muhahahahahaha

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.

#4 Bomb Bloke

    Hobbyist Coder

  • Moderators
  • 7,099 posts
  • LocationTasmania (AU)

Posted 27 May 2016 - 12:30 AM

View PostCreator, 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 Sewbacca

  • Members
  • 450 posts
  • LocationStar Wars

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)

Edited by Sewbacca, 29 May 2016 - 01:40 PM.


#6 apemanzilla

  • Members
  • 1,421 posts

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