Advertisement
aidenmagrath

Process

Jul 24th, 2014
231
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.94 KB | None | 0 0
  1. inputDirection = 4
  2. macerateDirection = 1
  3. furnaceDirection = 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. furnace = Set {197311, 709385, 774921, 807689, 840457, 9368761, 971529, 7918345, 7951113, 7983881, 8016649, 8049417, 8082185, 20257, 53025, 1068833, 1101601, 1134369, 1167137}
  15. macerate = Set {14, 15, 16, 21, 244, 33012, 245, 248, 249, 33017, 65785, 688, 33471, 66239, 230079, 262847, 295615, 361151, 313919, 2001, 34769, 67537, 100305, 133073}
  16.  
  17. while true do
  18.   sleep(0)
  19.   for uuid, amount in pairs(sorter.list(inputDirection)) do
  20.     if macerate[uuid] then
  21.       sorter.extract(inputDirection, uuid, macerateDirection, amount)
  22.     elseif furnace[uuid] then
  23.       sorter.extract(inputDirection, uuid, furnaceDirection, amount)
  24.     else
  25.       sorter.extract(inputDirection, uuid, sortDirection, amount)
  26.     end
  27.   end
  28. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement