RS485/LogisticsPipes-Dev — pull request #105 by Flow86 (2013-06-28 10:34:41+00:00)
Title: fixes #103 - make CC Interface more informative on requests

makes it possible to get the result of the request (good or bad) like this:

crafting pipe behind computer

```
p = peripheral.wrap("back")

doCrafting = true

if doCrafting then
print("Using Crafting")
items = p.getCraftableItems()
else
print("Using Provider")
items = p.getAvailableItems()
end

for nr,item in ipairs(items) do
if doCrafting then
itemId = item
itemCount = 1
else
itemId = item[1]
itemCount = item[2]
end

name = p.getUnlocalizedName(itemId)

print(itemId, ": ", p.getItemID(itemId), "#", p.getItemDamage(itemId), " = ", name, ": ", itemCount)

result = p.makeRequest(itemId, itemCount, doCrafting)

print(result[1]) -- DONE/MISSING/NO_POWER
for nr,item in ipairs(result[2]) do -- the List of items requested/missing in the same list-format as getAvailableItems.
print(p.getUnlocalizedName(item[1]), ": ", item[2])
end

print("")
print("")
end
```

you can either set "doCrafting" to true or false

WARNING!!!! IT WILL REQUEST ALL ITEMS AVAILABLE!!!! SO ONLY USE IT FOR TESTING IN A SMALL NETWORK!!!

The results are 2 images I'll upload to the above ticket #103