Advertisement
Deltekkio

ComputerCraft_BigReactor_DS

Jul 15th, 2018
148
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.35 KB | None | 0 0
  1. -------VARIABILI-------
  2.  
  3. local reactor = peripheral.wrap("BigReactors-Reactor_0")
  4. local mon = peripheral.wrap("monitor_0")
  5.  
  6. mon.setTextScale(0.5)
  7.  
  8. local CN = colors.black
  9. local CB = colors.white
  10. local CR = colors.red
  11. local CV = colors.green
  12.  
  13. local AC = false
  14.  
  15. ----------------------
  16.  
  17. mon.setBackgroundColor(CN)
  18.  
  19. mon.clear()
  20.  
  21. --------SCRIPT--------
  22. while true do
  23.  
  24. ------Stato------
  25. mon.setCursorPos(1,1)
  26. mon.setTextColor(CB)
  27.  
  28. AC = reactor.getActive()
  29.  
  30. if(AC == true) then
  31.  
  32. mon.setTextColor(CV)
  33. mon.setCursorPos(1,1)
  34. mon.clearLine()
  35. mon.write("Stato: Attivato")
  36.  
  37. else
  38.  
  39. mon.setTextColor(CR)
  40.  
  41. mon.setCursorPos(1,1)
  42. mon.clearLine()
  43. mon.write("Stato: Disattivato")
  44.  
  45. end
  46.  
  47. -----RF/Tick-----
  48.  
  49. mon.setCursorPos(1,3)
  50. mon.setTextColor(CB)
  51. mon.write("RF/T: ")
  52.  
  53. mon.write(math.floor(reactor.getEnergyProducedLastTick()))
  54.  
  55. ---Energy-Stored---
  56.  
  57. mon.setCursorPos(1,5)
  58. mon.setTextColor(CB)
  59. mon.write("Energia immagazzinata: ")
  60.  
  61. mon.write(math.floor(reactor.getEnergyStored()))
  62.  
  63. ------Calore-------
  64.  
  65. mon.setCursorPos(1,7)
  66. mon.setTextColor(CB)
  67. mon.write("Temperatura del case: ")
  68.  
  69. mon.write(math.floor(reactor.getCasingTemperature()))
  70.  
  71. mon.setCursorPos(1, 9)
  72. mon.setTextColor(CB)
  73. mon.write("Temperatura del carburante: ")
  74.  
  75. mon.write(math.floor(reactor.getFuelTemperature()))
  76.  
  77. -------------------------
  78.  
  79.     os.sleep(3)
  80. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement