Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- rewrite for newer bigger reactors
- local reactor = peripheral.wrap("back")
- local low = 4500000
- local high = 8000000
- local full = 9500000
- reactor.setActive(true)
- while true do
- if reactor.battery().stored() <= low then -- .getEnergyStored() <= low then
- reactor.setAllControlRodLevels(60)
- -- if reactor.active() == false then
- reactor.setActive(true)
- -- end
- else
- if reactor.battery().stored() < high then
- reactor.setAllControlRodLevels(90)
- reactor.setActive(true)
- end
- end
- if reactor.battery().stored() >= full then
- reactor.setActive(false)
- end
- if reactor.active() then
- write("True:")
- else
- write("False:")
- end
- print("10 second update: ",reactor.battery().stored())
- sleep(10)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement