Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local component = require("component")
- local RUNNING = true
- local reactor = component.reactor_logic_adapter
- local laser = component.laser_amplifier
- local sides = require ("sides")
- while RUNNING do
- term.clear()
- user = nil
- user = io.read()
- if user == "start" then
- print("starting the reactor")
- if reactor.isIgnite() == "true" then
- print("reactor is already running!!")
- else
- if reactor.canIgnite() == "false" then
- print("reactor is unable to start reason unknown")
- else
- if laser.getEnergy() =< "1000" then
- component.redstone.setOutput(sides.down,15)
- os.sleep(1)
- component.redstone.setOutput(sides.down,0)
- end
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement