Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- laser = peripheral.wrap("right")
- reactor = peripheral.wrap("fusionReactorLogicAdapter_0")
- local function reactorIsReady()
- while true do
- if reactor.getHohlraum().count>0 and reactor.isFormed() and not reactor.isIgnited() then
- break
- end
- end
- end
- local function laserIsCharged()
- while true do
- if laser.getEnergy()/2.5 >= 400000000 then
- break
- end
- end
- end
- local function recharge()
- while laser.getEnergy()/2.5 < 400000000 do
- redstone.setOutput("left",true)
- end
- redstone.setOutput("left",false)
- end
- local function fire()
- redstone.setOutput("right",true)
- sleep(1)
- redstone.setOutput("right",false)
- end
- parallel.waitForAll(reactorIsReady,laserIsCharged)
- fire()
- recharge()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement