This is a read-only snapshot of the ComputerCraft forums,
taken in April 2020.
Logistics Pipes API
Started by MrabEzreb, 18 May 2014 - 11:55 PMPosted 19 May 2014 - 01:55 AM
How does this work? http://rs485.thezorro266.com/wiki/ComputerCraft_API
Posted 19 May 2014 - 04:16 AM
Can you elaborate a bit more?
What is your problem with it… etc…
What is your problem with it… etc…
Edited on 19 May 2014 - 02:16 AM
Posted 19 May 2014 - 01:25 PM
I want to request items using a request pipe.
Posted 19 May 2014 - 01:30 PM
pipe = peripheral.wrap( "left" ) --#wraps the pipe
pipe.makeRequest( 1, 64 ) --#gets 1 stack of the item with the item ID 1. In this case, stone.
*note: I have no experience doing this, this is just my understanding of the wiki page.
Edited on 19 May 2014 - 11:30 AM
Posted 19 May 2014 - 01:54 PM
Okay. Ill check. It seemed like it wanted special ids
Posted 19 May 2014 - 02:02 PM
plus how do u use damage values?
Posted 19 May 2014 - 02:09 PM
and also, it doesnt work :P/>
Posted 19 May 2014 - 10:07 PM
Well, since the individual functions are not documented… I can't understand this much.
returns function
number peripheral.getItemDamage( number )
inferred usage:
peripheral.getItemDamage( number )
where peripheral is the appropriate wrapped peripheral.
additionally,
peripheral.call( side, "getItemDamage", "number" )
will most likely work.
check if you are actually getting the pipe as a peripheral
open lua prompt
lua> peripheral.getMethods( side )
should print a list of stuff you can do with that peripheral.
returns function
number peripheral.getItemDamage( number )
inferred usage:
peripheral.getItemDamage( number )
where peripheral is the appropriate wrapped peripheral.
additionally,
peripheral.call( side, "getItemDamage", "number" )
will most likely work.
check if you are actually getting the pipe as a peripheral
open lua prompt
lua> peripheral.getMethods( side )
should print a list of stuff you can do with that peripheral.
Posted 19 May 2014 - 11:32 PM
I think it's an openperipheral thing, since I just added that, but now none of those methods are there. :P/>
Posted 02 June 2014 - 12:59 AM
Yeah, OpenPeripherals override the Pipes' default methods.
You will need to add LogisticsPipe in the blacklist in "OpenPeripheralCore.cfg"
You will need to add LogisticsPipe in the blacklist in "OpenPeripheralCore.cfg"
Posted 02 June 2014 - 10:06 AM
In v0.3.3 you indeed need to add the pipes to the blacklist. My program Computed Magic (can be found here) uses that API to request mana beans. As far as I understand my own code, it requests the NBT tag because that is the Unique Item Identifier that you need to request it. That program was built around version 0.13 in which this problem does not exist.
Edited on 02 June 2014 - 08:06 AM