This is a read-only snapshot of the ComputerCraft forums,
taken in April 2020.
Item ID/Amount Checker
Started by MadCrayolaz, 10 August 2012 - 03:05 AMPosted 10 August 2012 - 05:05 AM
Wondering if it would be possible for a peripheral to be made that will allow items to be put inside of it, and run a cc program that would get the id's and amount of the item in the stack of each item in it? Context of this would be for making a trade system. They could input, lets say, 2 iron bars, the computer would run to see if it's a valid trade, and then send a request for the trade items.
Posted 10 August 2012 - 07:23 AM
Look at the arp peripherals. They can do that.
Posted 10 August 2012 - 03:14 PM
I tried installing it, but it conflicted with Forestry, and once I tried changing the item id, it would throw me errors from both mods.
Posted 10 August 2012 - 04:31 PM
turtle.compare() is the only way to kind of do this..
http://computercraft.info/wiki/index.php?title=Turtle.compare
http://computercraft.info/wiki/index.php?title=Turtle.compare
Posted 10 August 2012 - 04:34 PM
To be fair, it would actually be trivial to use the turtle API to provide this information. We provide all necessary functions.
Posted 10 August 2012 - 05:23 PM
Any way for a different type of turtle that does offer item IDs? This would help with an automatic warehouse system…
Posted 10 August 2012 - 06:17 PM
Agreed. I need something for ID checking and having to place it wouldn't be ideal.
Posted 10 August 2012 - 06:53 PM
Any way for a different type of turtle that does offer item IDs? This would help with an automatic warehouse system…
Yes - someone could code a turtle peripheral to do this pretty easily.
Posted 10 August 2012 - 10:06 PM
I hope someone does.
Posted 11 August 2012 - 06:42 AM
What exactly should that peipheral do? I don't really get it.
If you had trouble using arp and Forestry, tell me what error you got. maybe I can fix that.
If you had trouble using arp and Forestry, tell me what error you got. maybe I can fix that.
Posted 11 August 2012 - 07:14 AM
I've said it before, the turtles need a way to identify the items in the inventory. I'd do it myself but I have no Java experience whatsoever due to the infernal JVM refusing to create every single time I try to run a Java IDE.
Posted 15 August 2012 - 09:17 PM
I'd have to install it again, but I am also using BuildCraft3 so I had to delete the buildcraft folder.