7 posts
Posted 07 January 2016 - 01:07 AM
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.
2427 posts
Location
UK
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.
7 posts
Posted 07 January 2016 - 11:35 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.
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 on 07 January 2016 - 10:36 AM
2427 posts
Location
UK
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.
957 posts
Location
Web Development
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
8543 posts
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.