Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function main()
- local attachSide = "left"
- local ae2 = attachToAe2(attachSide)
- local items = getAllItems(ae2)
- for i=1, #items do
- item = items[i]
- print("List:")
- for i,v in ipairs(item) do
- print(i .. ": " .. v)
- end
- end
- end
- function attachToAe2(attachSide)
- assert(peripheral.getType(attachSide) == "tileinterface", "The computer must be attached to a full block " ..
- "ME Inteface on the specified side.")
- return peripheral.wrap(attachSide)
- end
- function getAllItems(ae2)
- local outputAllItems = ae2.getAvailableItems()
- assert(outputAllItems ~= nil, "No craftable items found in this AE2 network.")
- assert(#outputAllItems > 0, "No craftable items found in this AE2 network.")
- return outputAllItems
- end
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement