Advertisement
Guest User

Untitled

a guest
Sep 20th, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. local tank = peripheral.wrap("openblocks_tank_1")
  2. local mon = peripheral.wrap("monitor_1")
  3. local max = 16000
  4.  
  5. local tankInfo = tank.getTankInfo()[1]
  6.  
  7. local fuel = tankInfo.contents.amount
  8. local lastTickFuel = fuel
  9.  
  10. while true do
  11.  
  12. tank = peripheral.wrap("openblocks_tank_1")
  13. mon = peripheral.wrap("monitor_1")
  14. tankInfo = tank.getTankInfo()[1]
  15. fuel = tankInfo.contents.amount
  16.  
  17. mon.clear()
  18. mon.setCursorPos(1,1)
  19. mon.setTextColor(colors.white)
  20. mon.write("Fuel P/S: ")
  21. mon.setTextColor(colors.purple)
  22. mon.write((fuel - lastTickFuel) / 10)
  23. mon.setCursorPos(1,2)
  24. mon.setTextColor(colors.white)
  25. mon.write("Current UU Matter: ")
  26. mon.setCursorPos(1,3)
  27. mon.setTextColor(colors.purple)
  28. mon.write(fuel)
  29. mon.setTextColor(colors.white)
  30. mon.write("/")
  31. mon.setTextColor(colors.purple)
  32. mon.write(max)
  33. mon.setCursorPos(1,4)
  34. mon.setTextColor(colors.white)
  35. mon.write("Tank will be filled in: ")
  36. mon.setTextColor(colors.red)
  37. mon.setCursorPos(1,5)
  38. mon.write((16000 - fuel) / ((fuel - lastTickFuel) / 10))
  39. mon.setCursorPos(1,6)
  40. mon.setTextColor(colors.white)
  41. mon.write(" seconds")
  42.  
  43.  
  44. lastTickFuel = fuel
  45. sleep(10)
  46.  
  47. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement