Advertisement
Guest User

Untitled

a guest
Mar 4th, 2021
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. local charts = require("charts")
  2. local term = require("term")
  3. local event = require("event")
  4. local component = require("component")
  5. local reactor = component.br_reactor
  6. local turbine = component.br_turbine
  7.  
  8. local ctop = charts.Container {
  9. x = 1,
  10. y = 1,
  11. width = 2,
  12. height = 20,
  13. payload = charts.ProgressBar {
  14. direction = charts.sides.TOP,
  15. min = 0,
  16. max = 1800,
  17. value = turbine.getRotorSpeed(),
  18. colorFunc = function(index, norm, value, self, container)
  19. return 0xffffff
  20. end
  21. }
  22. }
  23.  
  24.  
  25. repeat
  26. for i = 0, turbine.getRotorSpeed() do
  27. term.clear()
  28. ctop.gpu.set(5, 10, "Value: " .. turbine.getRotorSpeed())
  29.  
  30. ctop.payload.value = turbine.getRotorSpeed()
  31.  
  32. ctop:draw()
  33.  
  34. if event.pull(0.05, "interrupted") then
  35. term.clear()
  36. os.exit()
  37. end
  38. end
  39. until io.read() == "Stop"
  40.  
  41. term.clear()
  42. os.exit()
  43.  
  44.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement