Advertisement
nobotious

uranium depletion

Jul 23rd, 2016
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. reactor = peripheral.wrap("left")
  2. chest = peripheral.wrap("right")
  3. while rs.getInput("bottom") do
  4. local i = 1
  5. rs.setOutput("top", true)
  6. repeat
  7. print("Checking slot: ")
  8. sleep(1)
  9. print(i)
  10. if reactor.getStackInSlot(i)~=nill then
  11. if reactor.getStackInSlot(i).name=="reactorUraniumSimple" then
  12. print("FILLED")
  13. sleep(1)
  14. end
  15.  
  16. if reactor.getStackInSlot(i).name=="reactorUraniumSimpledepleted" then
  17. print("DEPLETED")
  18. sleep(1)
  19. print("REMOVING DEPLETED")
  20. reactor.pushItem("down",i)
  21. sleep(1)
  22. print("REPLACING WITH FRESH CELL")
  23. reactor.pullItem("up",2,1,i)
  24. sleep(1)
  25. end
  26. end
  27. if reactor.getStackInSlot(i)==nill then
  28. print("EMPTY")
  29. sleep(1)
  30. print("REPLACING WITH FRESH CELL")
  31. reactor.pullItem("up",2,1,i)
  32. sleep(1)
  33. end
  34.  
  35.  
  36. i = i + 2
  37. until i == 55
  38. end
  39. rs.setOutput("top",false)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement