Guest User

MiscPeripheralsBug

a guest
Dec 31st, 2012
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.44 KB | None | 0 0
  1. m = peripheral.wrap("bottom")
  2. while true do
  3.   --flush anything out of the interactive sorter
  4.   m.sort(3)
  5.   --get a new item
  6.   rs.setOutput("left",true)
  7.   sleep(0.1)
  8.   rs.setOutput("left",false)
  9.   --wait for the item
  10.   event, param = os.pullEvent("isort_item")
  11.   --print the new item ID
  12.   print("Got item with ID "..param)
  13.   --here check if we have some already
  14.   --if not lets add it to the list
  15.  
  16.   --chuck it out
  17.   m.sort(3)
  18. end
Advertisement
Add Comment
Please, Sign In to add comment