Advertisement
Tim3Game

BigReactors Reactor Screen 0.2

Jan 21st, 2015
238
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.77 KB | None | 0 0
  1. --[[
  2. BigReactors Reactor Screen 0.2 for 0.3 by Tim3Game (Tested on BigReactors 0.34)
  3. U can use this program, but not the issue for their own
  4. ]]--
  5.  
  6. while true do
  7. mon = peripheral.wrap("monitor_1")
  8. rea1 = peripheral.wrap("BigReactors-Reactor_1")
  9. chat = peripheral.wrap("bottom")
  10. -- Rednet (Computer ID's)
  11. owner = "5"
  12.  
  13. -- Title
  14. mon.clear()
  15. mon.setCursorPos(3,1)
  16. mon.setTextColor(colors.red)
  17. mon.setTextScale(1)
  18. mon.write("BigReactors Reactor Screen")
  19.  
  20. -- Status
  21. mon.setCursorPos(1,2)
  22. mon.setTextColor(colors.white)
  23. mon.write("STATUS: ")
  24. if rea1.getActive()==true then
  25. mon.setTextColor(colors.green)
  26. mon.write("ON")
  27. else
  28. mon.setTextColor(colors.red)
  29. mon.write("OFF")
  30. end
  31.  
  32. -- RF/t
  33. mon.setCursorPos(1,3)
  34. mon.setTextColor(colors.white)
  35. mon.write("RF/t: ")
  36. mon.setTextColor(colors.lime)
  37. mon.write(rea1.getEnergyProducedLastTick())
  38. -- RF/s
  39. mon.setCursorPos(1,4)
  40. mon.setTextColor(colors.white)
  41. mon.write("RF/s: ")
  42. mon.setTextColor(colors.lime)
  43. mon.write(rea1.getEnergyProducedLastTick()*20)
  44.  
  45. -- Stored
  46. mon.setCursorPos(1,5)
  47. mon.setTextColor(colors.white)
  48. mon.write("Stored: ")
  49. mon.setTextColor(colors.lime)
  50. mon.write(rea1.getEnergyStored())
  51. mon.write(" RF")
  52.  
  53. -- Fuel Consume
  54. mon.setCursorPos(1,6)
  55. mon.setTextColor(colors.white)
  56. mon.write("Consumed: ")
  57. mon.setTextColor(colors.lime)
  58. mon.write(rea1.getFuelConsumedLastTick())
  59.  
  60. -- Temperature
  61. mon.setCursorPos(5,7)
  62. mon.setTextColor(colors.red)
  63. mon.write("--- TEMPERATURE ---")
  64. -- Case temperatur
  65. mon.setCursorPos(1,8)
  66. mon.setTextColor(colors.white)
  67. mon.write("Case: ")
  68. mon.setTextColor(colors.lime)
  69. mon.write(rea1.getCasingTemperature())
  70. -- Fuel Temperatur
  71. mon.setCursorPos(1,9)
  72. mon.setTextColor(colors.white)
  73. mon.write("Fuel: ")
  74. mon.setTextColor(colors.lime)
  75. mon.write(rea1.getFuelTemperature())
  76.  
  77. -- Automatic shut-off when the reactor is turned off because it's full
  78. if rea1.getEnergyStored()==10000000 then
  79. rea1.setActive(false)
  80. end
  81. if rea1.getEnergyStored()==9999998 then
  82. chat.say("Reactor1:The reactor is full RF, so automatically turn off.")
  83. rednet.send(owner,"Reactor1:The reactor is full RF, so automatically turn off.")
  84. end
  85.  
  86.  
  87.  
  88. -- Messages for Chatbox (Moar Peripheral)
  89. --Message for: 100k RF Storage
  90. if rea1.getEnergyStored()==100000 then
  91. chat.say("Reactor1: Reactor have 100k RF Stored.")
  92. end
  93. --Message for: 500k RF Storage
  94. if rea1.getEnergyStored()==500000 then
  95. chat.say("Reactor1: Reactor have 500k RF Stored.")
  96. end
  97. --Message for: 1m RF Storage
  98. if rea1.getEnergyStored()==1000000 then
  99. chat.say("Reactor1: Reactor have 1m RF Stored.")
  100. end
  101. --Message for: 5m RF Storage
  102. if rea1.getEnergyStored()==5000000 then
  103. chat.say("Reactor1: Reactor have 5m RF Stored.")
  104. end
  105. --Message for: 10m RF Storage
  106. if rea1.getEnergyStored()==9999998 then
  107. chat.say("Reactor1: Reactor have 10m RF Stored.")
  108. end
  109.  
  110. -- Messages for RedNet (Computercraft)
  111. --Message for: 100k RF Storage
  112. if rea1.getEnergyStored()==100000 then
  113. rednet.send(owner,"Reactor1: Reactor have 100k RF Stored.")
  114. end
  115. --Message for: 500k RF Storage
  116. if rea1.getEnergyStored()==500000 then
  117. rednet.send(owner,"Reactor1: Reactor have 500k RF Stored.")
  118. end
  119. --Message for: 1m RF Storage
  120. if rea1.getEnergyStored()==1000000 then
  121. rednet.send(owner,"Reactor1: Reactor have 1m RF Stored.")
  122. end
  123. --Message for: 5m RF Storage
  124. if rea1.getEnergyStored()==5000000 then
  125. rednet.send(owner,"Reactor1: Reactor have 5m RF Stored.")
  126. end
  127. --Message for: 10m RF Storage
  128. if rea1.getEnergyStored()==9999998 then
  129. rednet.send(owner,"Reactor1: Reactor have 10m RF Stored.")
  130. end
  131. sleep(1)
  132. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement