While I was writing my own custom api to detect if a list of features is present ona computer, I noticed that there really isn't a good way to detect what a turtle currently has equipped to the left and right side unless you unequip it, check it, and then reequip it. I was wondering if it would be possible to add 2 slots to the turtle where it could keep the left and right equipped items that could be accessed through getEquippedLeft and getEquippedRight.
Turtle equipment slots and getEquippedSlots
Started by Blitzsy, Jan 07 2016 01:07 AM
5 replies to this topic
#1
Posted 07 January 2016 - 01:07 AM
#2
Posted 07 January 2016 - 08:13 AM
What the turtle has equipped are normal peripherals, there is a function in the peripheral API which shows the names of the equipped/attched peripherals.
#3
Posted 07 January 2016 - 11:35 AM
Lupus590, on 07 January 2016 - 08:13 AM, said:
What the turtle has equipped are normal peripherals, there is a function in the peripheral API which shows the names of the equipped/attched peripherals.
This doesn't account for things like tools, it only really works on a few upgrades, It would be nice if everything attached would show up there.
Edited by Blitzsy, 07 January 2016 - 11:36 AM.
#4
Posted 07 January 2016 - 11:39 AM
I guess they are not quite normal peripherals then, perhaps the peripheral API should be updated to provide this.
#5
Posted 20 January 2016 - 04:12 AM
Bump
It's a major flaw, since picks, axes, ect must be unequipped to get their name, but this requires a free slot
It's a major flaw, since picks, axes, ect must be unequipped to get their name, but this requires a free slot
#6
Posted 20 January 2016 - 06:20 AM
IIRC, having a tool equipped on a side means that you cannot use a peripheral on that side, so it would seem logical for the peripheral getType call to return a string provided by the tool.
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users











