Advertisement
william200027

BigReactorReceiveInfo

Nov 25th, 2016
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.71 KB | None | 0 0
  1. rednet.open("right")
  2. Lunette = peripheral.wrap("top")
  3. IdSender = 416
  4. while true do
  5.  
  6. id, msg = rednet.receive()
  7. table = textutils.unserialize(msg)
  8.  
  9.  
  10. Reactor1Active = table[1]
  11. Reactor1Reactivity = table[2]
  12. Reactor1Connected = table[3]
  13.  
  14. Reactor2Active = table[4]
  15. Reactor2Reactivity = table[5]
  16. Reactor2Connected = table[6]
  17.  
  18. Turbine1EnergyStored = table[7]
  19. Turbine1EnergyProduite = table[8]
  20. Turbine1Active = table[9]
  21. Turbine1RotorSpeed = table[10]
  22. Turbine1Connected = table[11]
  23.  
  24. Turbine2EnergyStored = table[12]
  25. Turbine2EnergyProduite = table[13]
  26. Turbine2Active = table[14]
  27. Turbine2RotorSpeed = table[15]
  28. Turbine2Connected = table[16]
  29.  
  30. Turbine3EnergyStored = table[17]
  31. Turbine3EnergyProduite = table[18]
  32. Turbine3Active = table[19]
  33. Turbine3RotorSpeed = table[20]
  34. Turbine3Connected = table[21]
  35.  
  36. Turbine4EnergyStored = table[22]
  37. Turbine4EnergyProduite = table[23]
  38. Turbine4Active = table[24]
  39. Turbine4RotorSpeed = table[25]
  40. Turbine4Connected = table[26]
  41.  
  42. Turbine5EnergyStored = table[27]
  43. Turbine5EnergyProduite = table[28]
  44. Turbine5Active = table[29]
  45. Turbine5RotorSpeed = table[30]
  46. Turbine5Connected = table[31]
  47.  
  48. Turbine6EnergyStored = table[32]
  49. Turbine6EnergyProduite = table[33]
  50. Turbine6Active = table[34]
  51. Turbine6RotorSpeed = table[35]
  52. Turbine6Connected = table[36]
  53.  
  54. Turbine7EnergyStored = table[37]
  55. Turbine7EnergyProduite = table[38]
  56. Turbine7Active = table[39]
  57. Turbine7RotorSpeed = table[40]
  58. Turbine7Connected = table[41]
  59.  
  60. Turbine8EnergyStored = table[42]
  61. Turbine8EnergyProduite = table[43]
  62. Turbine8Active = table[44]
  63. Turbine8RotorSpeed = table[45]
  64. Turbine8Connected = table[46]
  65.  
  66. Turbine9EnergyStored = table[47]
  67. Turbine9EnergyProduite = table[48]
  68. Turbine9Active = table[49]
  69. Turbine9RotorSpeed = table[50]
  70. Turbine9Connected = table[51]
  71.  
  72. Turbine10EnergyStored = table[52]
  73. Turbine10EnergyProduite = table[53]
  74. Turbine10Active = table[54]
  75. Turbine10RotorSpeed = table[55]
  76. Turbine10Connected = table[56]
  77.  
  78. Turbine11EnergyStored = table[57]
  79. Turbine11EnergyProduite = table[58]
  80. Turbine11Active = table[59]
  81. Turbine11RotorSpeed = table[60]
  82. Turbine11Connected = table[61]
  83.  
  84. Turbine12EnergyStored = table[62]
  85. Turbine12EnergyProduite = table[63]
  86. Turbine12Active = table[64]
  87. Turbine12RotorSpeed = table[65]
  88. Turbine12Connected =  table[67]
  89.  
  90.  
  91. Lunette.clear()
  92.  
  93. Lunette.addText(1, 20, "Reactor 1: ", 0xFF0000)
  94. Lunette.addText(10, 40, Reactor1Active, 0xFF0000)
  95. Lunette.addText(10, 60, Reactor1Reactivity, 0xFF0000)
  96. Lunette.addText(10, 80, Reactor1Connected, 0xFF0000)
  97.  
  98.  
  99.  
  100. Lunette.addText(1, 100, "Reactor 2: ", 0xFF0000)
  101. Lunette.addText(10, 120, Reactor2Active, 0xFF0000)
  102. Lunette.addText(10, 140, Reactor2Reactivity, 0xFF0000)
  103. Lunette.addText(10, 160, Reactor2Connected, 0xFF0000)
  104.  
  105.  
  106.  
  107. Lunette.addText(30, 20, "Turbine 1: ", 0xFF0000)
  108. Lunette.addText(40, 40, Turbine1EnergyStored, 0xFF0000)
  109. Lunette.addText(40, 60, Turbine1EnergyProduite, 0xFF0000)
  110. Lunette.addText(40, 80, Turbine1Active, 0xFF0000)
  111. Lunette.addText(40, 100, Turbine1RotorSpeed, 0xFF0000)
  112. Lunette.addText(40, 120, Turbine1Connected, 0xFF0000)
  113.  
  114.  
  115.  
  116. Lunette.addText(60, 20, "Turbine 2: ", 0xFF0000)
  117. Lunette.addText(80, 40, Turbine2EnergyStored, 0xFF0000)
  118. Lunette.addText(80, 60, Turbine2EnergyProduite, 0xFF0000)
  119. Lunette.addText(80, 80, Turbine2Active, 0xFF0000)
  120. Lunette.addText(80, 100, Turbine2RotorSpeed, 0xFF0000)
  121. Lunette.addText(80, 120, Turbine2Connected, 0xFF0000)
  122.  
  123.  
  124.  
  125. Lunette.addText(100, 20, "Turbine 3: ", 0xFF0000)
  126. Lunette.addText(120, 40, Turbine3EnergyStored, 0xFF0000)
  127. Lunette.addText(120, 60, Turbine3EnergyProduite, 0xFF0000)
  128. Lunette.addText(120, 80, Turbine3Active, 0xFF0000)
  129. Lunette.addText(120, 100, Turbine3RotorSpeed, 0xFF0000)
  130. Lunette.addText(120, 120, Turbine3Connected, 0xFF0000)
  131.  
  132.  
  133.  
  134. Lunette.sync()
  135. sleep(0)
  136. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement