Advertisement
Guest User

Untitled

a guest
Mar 4th, 2021
67
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.80 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. for i = 0, turbine.getRotorSpeed() do
  25. term.clear()
  26. ctop.gpu.set(5, 10, "RPM: " .. turbine.getRotorSpeed())
  27.  
  28. ctop.payload.value = turbine.getRotorSpeed()
  29.  
  30. ctop:draw()
  31.  
  32. if event.pull(0.05, "interrupted") then
  33. term.clear()
  34. os.exit()
  35. end
  36. end
  37.  
  38.  
  39. term.clear()
  40. os.exit()
  41.  
  42.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement