Advertisement
Guest User

startup

a guest
Sep 15th, 2019
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 1.45 KB | None | 0 0
  1. while true do
  2.  
  3.     local reactor = peripheral.wrap("BigReactors-Reactor_0")
  4.     local mon = peripheral.wrap("left")
  5.     local low = 1000000
  6.     local high = 9000000  
  7.     mon.clear()
  8.    
  9.     if reactor.getEnergyStored() <= low then
  10.     reactor.setAllControlRodLevels(0)
  11.   end
  12.  
  13.   if reactor.getEnergyStored() >= high then
  14.     reactor.setAllControlRodLevels(90)
  15.   end
  16.  
  17.   mon.setCursorPos(1,1)
  18.   mon.setTextColor(colors.white)
  19.   mon.write("Active:     ")
  20.   mon.setTextColor(colors.green)
  21.   mon.write(reactor.getActive())
  22.    
  23.   mon.setCursorPos(1,2)
  24.   mon.setTextColor(colors.white)
  25.   mon.write("RF/T:       ")  
  26.   mon.setTextColor(colors.green)
  27.   mon.write(math.floor(reactor.getEnergyProducedLastTick()))
  28.  
  29.   mon.setCursorPos(1,3)
  30.   mon.setTextColor(colors.white)
  31.   mon.write("RF Stored:   ")
  32.   mon.setTextColor(colors.green)
  33.   mon.write(math.floor(reactor.getEnergyStored()))
  34.  
  35.   mon.setCursorPos(1,4)
  36.   mon.setTextColor(colors.white)
  37.   mon.write("Casing Heat: ")
  38.   mon.setTextColor(colors.green)
  39.   mon.write(math.floor(reactor.getCasingTemperature()))
  40.  
  41.   mon.setCursorPos(1,5)
  42.   mon.setTextColor(colors.white)
  43.   mon.write("Fuel Heat:   ")
  44.   mon.setTextColor(colors.green)
  45.   mon.write(math.floor(reactor.getFuelTemperature()))
  46.  
  47.   mon.setCursorPos(1,6)
  48.   mon.setTextColor(colors.white)
  49.   mon.write("Fuel Reactivity:   ")
  50.   mon.setTextColor(colors.green)
  51.   mon.write(math.floor(reactor.getFuelReactivity()))
  52.   -- End Reactor 1
  53.  
  54.    sleep(2)
  55. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement