Marlingaming

CC Tweaked PowerPlant Reactor Control Terminal

Feb 15th, 2022 (edited)
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. local ReactorStatus = {{false,0,0},{false,0,0},{false,0,0}}
  2. local w, h = term.getSize()
  3. local function Clear()
  4. term.clear()
  5. term.setCursorPos(1,1)
  6. end
  7.  
  8. function CheckReactors()
  9.  
  10. end
  11.  
  12. function ReactorControl(i)
  13. Clear()
  14. print("Reactor ",i)
  15. print("fuel ,ReactorStatus[i][2])
  16. print("Online? ",ReactorStatus[i][1])
  17. print("Temperature ",ReactorStatus[i][3])
  18. print("=options=")
  19. local options = {"Stop/Start","Release Water","return"}
  20. local n = CUI(options,6)
  21. if options[n] == "Stop/Start" then
  22. ReactorControl(i)
  23. elseif options[n] == "Release Water" then
  24. ReactorControl(i)
  25. elseif options[n] == "Return" then
  26.  
  27. end
  28. end
  29.  
  30. function Menu()
  31. CheckReactors()
  32. term.setBackgroundColor(colors.lightBlue)
  33. Clear()
  34. print("Reactor Control Terminal")
  35. print("=Reactors=")
  36. if ReactorStatus[1][1] == true then print("Reactor 1 Running") else print("Reactor 1 Offline") end
  37. if ReactorStatus[2][1] == true then print("Reactor 2 Running") else print("Reactor 2 Offline") end
  38. if ReactorStatus[3][1] == true then print("Reactor 3 Running") else print("Reactor 3 Offline") end
  39. print("=Options=")
  40. local options = {"Reactor 1","Reactor 2","Reactor_2"}
  41. local n = CUI(options,7)
  42. ReactorControl(n)
  43. Menu()
  44. end
  45.  
  46. Menu()
Add Comment
Please, Sign In to add comment