Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local reactor = peripheral.wrap("back")
- local monitor = peripheral.wrap("left")
- local action = ""
- while action ~= "exit" do
- term.write("[enable|disable|status|setrods]: ")
- action = read()
- if action ~= "exit" then
- if action == "status" then
- term.write("Active: ")
- print(reactor.getActive())
- term.write("RF/t: ")
- print(reactor.getEnergyProducedLastTick())
- elseif action == "setrods" then
- term.write("[0-100]: ")
- local newRods = tonumber(read())
- reactor.setAllControlRodLevels(newRods)
- term.write("Set Control Rods = ")
- print(newRods)
- elseif action == "enable" then
- reactor.setActive(true)
- print("Reactor activated")
- elseif action == "disable" then
- reactor.setActive(false)
- print("Reactor deactivated")
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement