Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- print("Input Gate")
- local gate_input = read()
- gate_input = "flux_gate_6"
- local input = peripheral.wrap(gate_input)
- if input==nil then
- error("Gate not found")
- end
- print("Output Gate")
- local gate_output = read()
- gate_output = "flux_gate_7"
- local output = peripheral.wrap(gate_output)
- if output==nil then
- error("Gate not found")
- end
- local reactor = peripheral.find("draconic_reactor")
- if reactor==nil then
- error("no reactor connected to network")
- end
- input.setOverrideEnabled(true)
- output.setOverrideEnabled(true)
- output.setFlowOverride(0)
- input.setFlowOverride(1000000)
- reactor.chargeReactor()
- print("Charging")
- while reactor.activateReactor()==false do
- os.sleep(1)
- write(".")
- end
- input.setFlowOverride(10000)
- print("Charging complete")
- os.sleep(0.2)
- print("press Enter to start")
- read()
- print("reactor starting")
- local fieldperc
- abwsum = 0
- while 1==1 do
- info = reactor.getReactorInfo()
- fieldperc = info.fieldStrength/info.maxFieldStrength
- abw = - fieldperc + 0.3
- abwsum = abwsum + abw
- xe = abw*10000 + abwsum*10000
- if xe<0 then abwsum =0 end
- temp = info.temperature
- abwt = 7000 - temp
- abwsumt = abwsum + abw
- xet = 300000
- if abw<0.1 then
- xet = abw + abwsum
- end
- output.setFlowOverride(xet)
- input.setFlowOverride(xe+1000)
- os.sleep(0.1)
- print(input.getFlow())
- print(abwt)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement