Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local generating = false
- while true do
- local reactor = peripheral.wrap("BigReactors-Reactor_2")
- local bat = peripheral.wrap("Induction Matrix_1")
- local mon = peripheral.wrap("top")
- mon.clear()
- mon.setCursorPos(1,1)
- if reactor.getActive() == true then
- mon.write("Reactor Activated.")
- else
- mon.write("Reactor Deactivated.")
- end
- mon.setCursorPos(1,2)
- mon.write("RF/t:"..string.format(math.floor(bat.getInput())))
- mon.setCursorPos(1,3)
- mon.write("CONTROL ROD STATISTICS:")
- mon.setCursorPos(1,4)
- mon.write("Control Rods Insertion: ".. math.floor(reactor.getControlRodLevel(0)).."%")
- mon.setCursorPos(1,6)
- local targetRodPosition = (bat.getEnergy() / bat.getMaxEnergy()) * 100
- mon.write("Target Rod Position: ".. math.floor(targetRodPosition).."%")
- mon.setCursorPos(1,7)
- if targetRodPosition > reactor.getControlRodLevel(0) then
- reactor.setAllControlRodLevels(reactor.getControlRodLevel(0) + 1)
- end
- if targetRodPosition < reactor.getControlRodLevel(0) then
- reactor.setAllControlRodLevels(reactor.getControlRodLevel(0) - 1)
- end
- sleep(0.25)
- end
Add Comment
Please, Sign In to add comment