Advertisement
aidenmagrath

Process 2

Jul 28th, 2014
246
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. inputDirection = 4
  2. extractDirection = 1
  3. compressDirectoin = 0
  4. sortDirection = 5
  5.  
  6. sorter = peripheral.wrap("back")
  7.  
  8. function Set (list)
  9.   local set = {}
  10.   for _, l in ipairs(list) do set[l] = true end
  11.   return set
  12. end
  13.  
  14. compress = Set {545545,30243, 302455, 30151}
  15. extractor = Set {627, 30217}
  16.  
  17. while true do
  18.   sleep(0)
  19.   event, uuid, amount = os.pullEvent("isort_item")
  20.   if compress[uuid] then
  21.     sorter.sort(compressDirection)
  22.   elseif extractor[uuid] then
  23.     sorter.sort(extractDirection)
  24.   else
  25.     sorter.sort(sortDirection)
  26.   end
  27. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement