Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local Rea = peripheral.wrap("draconic_reactor_2")
- local Gate = peripheral.wrap("flow_gate_1")
- local function update()
- while true do
- term.clear()
- local ReaInfo = Rea.getReactorInfo()
- local ReaGeneration = ReaInfo.generationRate
- local ReaTemperature = ReaInfo.temperature
- local ReaShield = ReaInfo.fieldStrength
- local ReaSaturation = ReaInfo.energySaturation
- local ReaFuel = ReaInfo.fuelConversion
- local ReaStop = Rea.stopReactor
- local stop = 1
- if ReaTemperature >= 7900.00 then
- stop = 0
- print(ReaTemperature)
- elseif ReaShield <= 28000000 then
- stop = 0
- print(ReaShield)
- elseif ReaFuel >= 10300.00 then
- stop = 0
- print(ReaFuel)
- end
- if stop == 0 then
- ReaStop()
- elseif ReaTemperature > 7600 then
- ReaGeneration = ReaGeneration -300000
- Gate.setSignalLowFlow(ReaGeneration)
- print("La prod diminue !")
- elseif ReaTemperature < 7600 then
- ReaGeneration = ReaGeneration +1000
- Gate.setSignalLowFlow(ReaGeneration)
- print("La prod augment !")
- else
- print("Pas de changement !")
- end
- os.sleep(0.025)
- end
- end
- update()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement