Advertisement
systox

Reactor

May 12th, 2017
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.80 KB | None | 0 0
  1. local reactor_1
  2. local mon_1
  3.  
  4. reactor_1 = peripheral.wrap("BigReactors-Reactor_1")
  5. mon_1 = peripheral.wrap("monitor_1")
  6.  
  7. while true do
  8. mon_1.clear()
  9. mon_1.setCursorPos(1,1)
  10.  
  11. mon_1.write("Status: ")
  12.  
  13.  if reactor_1.getActive() == true then
  14.  if reactor_1.getCasingTemperature() < 1000 == true then
  15.  if reactor_1.getHotFluidAmount() > 30000 == true then
  16.  mon_1.setCursorPos(1,1)
  17.  mon_1.write("Kein Dapf benoetigt!")
  18.  mon_1.setCursorPos(1,2)
  19.  mon_1.write("ControlRods: 100")
  20.  reactor_1.setAllControlRodLevels(100)
  21.  else
  22.  mon_1.write("An")
  23.  mon_1.setCursorPos(1,2)
  24.  mon_1.write("ControlRods: 0")
  25.  reactor_1.setAllControlRodLevels(0)
  26.  end
  27.  else
  28.  mon_1.setCursorPos(1,2)
  29.  mon_1.write("ControlRods: 10")
  30.  reactor_1.setAllControlRodLevels(10)
  31.  end
  32.  else
  33.  mon_1.write("Aus")
  34.  end
  35.  sleep(0.1)
  36.  end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement