Advertisement
RLPGhost

Turbine Big reactor energie

Oct 15th, 2016
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 4.97 KB | None | 0 0
  1. local p0 = peripheral.wrap("BigReactors-Turbine_0")
  2. local p1 = peripheral.wrap("BigReactors-Turbine_1")
  3. local p2 = peripheral.wrap("BigReactors-Turbine_2")
  4. local p3 = peripheral.wrap("BigReactors-Turbine_3")
  5. local p4 = peripheral.wrap("BigReactors-Turbine_4")
  6. local p5 = peripheral.wrap("BigReactors-Turbine_5")
  7. local p6 = peripheral.wrap("BigReactors-Turbine_6")
  8. local p7 = peripheral.wrap("BigReactors-Turbine_7")
  9. local p8 = peripheral.wrap("BigReactors-Turbine_8")
  10. local p9 = peripheral.wrap("BigReactors-Turbine_9")
  11. local p10 = peripheral.wrap("BigReactors-Turbine_10")
  12. local p11 = peripheral.wrap("BigReactors-Turbine_11")
  13. local p12 = peripheral.wrap("BigReactors-Turbine_12")
  14. local p13 = peripheral.wrap("BigReactors-Turbine_13")
  15. local p14 = peripheral.wrap("BigReactors-Turbine_14")
  16. local p15 = peripheral.wrap("BigReactors-Turbine_15")
  17. local mon = peripheral.wrap("left")
  18.  
  19.  
  20. while true do
  21.  
  22. local TotalEnergie = p0.getEnergyProducedLastTick()+p1.getEnergyProducedLastTick()+p2.getEnergyProducedLastTick()+p3.getEnergyProducedLastTick()+p4.getEnergyProducedLastTick()+p5.getEnergyProducedLastTick()+p6.getEnergyProducedLastTick()+p7.getEnergyProducedLastTick()+p8.getEnergyProducedLastTick()+p9.getEnergyProducedLastTick()+p10.getEnergyProducedLastTick()+p11.getEnergyProducedLastTick()+p12.getEnergyProducedLastTick()+p13.getEnergyProducedLastTick()+p14.getEnergyProducedLastTick()+p15.getEnergyProducedLastTick()
  23.  
  24. mon.clear()
  25.  
  26.  
  27. mon.setTextColor(colors.red)
  28. mon.setCursorPos(1,1)
  29. mon.write("Information:")
  30.  
  31. mon.setCursorPos(1,3)
  32. mon.setTextColor(colors.white)
  33. mon.write("Regime des Turbines: ")
  34.  
  35. mon.setTextColor(8)
  36. mon.setCursorPos(1,4)
  37. mon.write("Turbine 1:  ")
  38. mon.setTextColor(colors.green)
  39. mon.write(tostring(p0.getRotorSpeed()))
  40. mon.setTextColor(colors.white)
  41. mon.write(" rpm")
  42.  
  43. mon.setTextColor(8)
  44. mon.setCursorPos(1,5)
  45. mon.write("Turbine 2:  ")
  46. mon.setTextColor(colors.green)
  47. mon.write(tostring(p1.getRotorSpeed()))
  48. mon.setTextColor(colors.white)
  49. mon.write(" rpm")
  50. mon.setTextColor(8)
  51. mon.setCursorPos(1,6)
  52. mon.write("Turbine 3:  ")
  53. mon.setTextColor(colors.green)
  54. mon.write(tostring(p2.getRotorSpeed()))
  55. mon.setTextColor(colors.white)
  56. mon.write(" rpm")
  57. mon.setTextColor(8)
  58. mon.setCursorPos(1,7)
  59. mon.write("Turbine 4:  ")
  60. mon.setTextColor(colors.green)
  61. mon.write(tostring(p3.getRotorSpeed()))
  62. mon.setTextColor(colors.white)
  63. mon.write(" rpm")
  64. mon.setTextColor(8)
  65. mon.setCursorPos(1,8)
  66. mon.write("Turbine 5:  ")
  67. mon.setTextColor(colors.green)
  68. mon.write(tostring(p4.getRotorSpeed()))
  69. mon.setTextColor(colors.white)
  70. mon.write(" rpm")
  71. mon.setTextColor(8)
  72. mon.setCursorPos(1,9)
  73. mon.write("Turbine 6:  ")
  74. mon.setTextColor(colors.green)
  75. mon.write(tostring(p5.getRotorSpeed()))
  76. mon.setTextColor(colors.white)
  77. mon.write(" rpm")
  78. mon.setTextColor(8)
  79. mon.setCursorPos(1,10)
  80. mon.write("Turbine 7:  ")
  81. mon.setTextColor(colors.green)
  82. mon.write(tostring(p6.getRotorSpeed()))
  83. mon.setTextColor(colors.white)
  84. mon.write(" rpm")
  85. mon.setTextColor(8)
  86. mon.setCursorPos(1,11)
  87. mon.write("Turbine 8:  ")
  88. mon.setTextColor(colors.green)
  89. mon.write(tostring(p7.getRotorSpeed()))
  90. mon.setTextColor(colors.white)
  91. mon.write(" rpm")
  92. mon.setTextColor(8)
  93. mon.setCursorPos(1,12)
  94. mon.write("Turbine 9:  ")
  95. mon.setTextColor(colors.green)
  96. mon.write(tostring(p8.getRotorSpeed()))
  97. mon.setTextColor(colors.white)
  98. mon.write(" rpm")
  99. mon.setTextColor(8)
  100. mon.setCursorPos(1,13)
  101. mon.write("Turbine 10: ")
  102. mon.setTextColor(colors.green)
  103. mon.write(tostring(p9.getRotorSpeed()))
  104. mon.setTextColor(colors.white)
  105. mon.write(" rpm")
  106. mon.setTextColor(8)
  107. mon.setCursorPos(1,14)
  108. mon.write("Turbine 11: ")
  109. mon.setTextColor(colors.green)
  110. mon.write(tostring(p10.getRotorSpeed()))
  111. mon.setTextColor(colors.white)
  112. mon.write(" rpm")
  113. mon.setTextColor(8)
  114. mon.setCursorPos(1,15)
  115. mon.write("Turbine 12: ")
  116. mon.setTextColor(colors.green)
  117. mon.write(tostring(p11.getRotorSpeed()))
  118. mon.setTextColor(colors.white)
  119. mon.write(" rpm")
  120. mon.setTextColor(8)
  121. mon.setCursorPos(1,16)
  122. mon.write("Turbine 13: ")
  123. mon.setTextColor(colors.green)
  124. mon.write(tostring(p12.getRotorSpeed()))
  125. mon.setTextColor(colors.white)
  126. mon.write(" rpm")
  127. mon.setTextColor(8)
  128. mon.setCursorPos(1,17)
  129. mon.write("Turbine 14: ")
  130. mon.setTextColor(colors.green)
  131. mon.write(tostring(p13.getRotorSpeed()))
  132. mon.setTextColor(colors.white)
  133. mon.write(" rpm")
  134. mon.setTextColor(8)
  135. mon.setCursorPos(1,18)
  136. mon.write("Turbine 15: ")
  137. mon.setTextColor(colors.green)
  138. mon.write(tostring(p14.getRotorSpeed()))
  139. mon.setTextColor(colors.white)
  140. mon.write(" rpm")
  141. mon.setTextColor(8)
  142. mon.setCursorPos(1,19)
  143. mon.write("Turbine 16: ")
  144. mon.setTextColor(colors.green)
  145. mon.write(tostring(p15.getRotorSpeed()))
  146. mon.setTextColor(colors.white)
  147. mon.write(" rpm")
  148.  
  149. mon.setCursorPos(1,21)
  150. mon.setTextColor(colors.white)
  151. mon.write("Energie: ")
  152.  
  153. mon.setTextColor(8)
  154. mon.setCursorPos(1,22)
  155. mon.write("Turbine Production: ")
  156. mon.setTextColor(colors.green)
  157. mon.write(tostring(math.floor(TotalEnergie)))
  158. mon.setTextColor(colors.white)
  159. mon.write(" RF/t")
  160.  
  161. sleep(2)
  162.  
  163. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement