Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local turbine_1
- local mon_1
- turbine_1 = peripheral.wrap("BigReactors-Turbine_0")
- mon_1 = peripheral.wrap("monitor_0")
- mon_1.clear()
- mon_1.setCursorPos(1,1)
- while true do
- mon_1.write("Status: ")
- if turbine_1.getActive() == true then
- if turbine_1.getRotorSpeed() < 1700 == true then
- mon_1.write("Startet")
- turbine_1.setFluidFlowRateMax(2000)
- turbine_1.setInductorEngaged(false)
- else
- if turbine_1.getFluidFlowRateMax() == 0 == true then
- mon_1.write("Ideling")
- else
- mon_1.write("Aktiviert")
- turbine_1.setInductorEngaged(true)
- end
- end
- else
- mon_1.write("De-Akiviert")
- turbine_1.setFluidFlowRateMax(2000)
- if turbine_1.getEnergyStored() < 990000 == true then
- turbine_1.setInductorEngaged(true)
- end
- end
- if turbine_1.getEnergyStored() > 800000 == true then
- if turbine_1.getRotorSpeed() < 1800 == true then
- turbine_1.setInductorEngaged(false)
- else
- if turbine_1.getEnergyStored() == 1000000 == false then
- turbine_1.setInductorEngaged(true)
- else
- turbine_1.setInductorEngaged(false)
- turbine_1.setFluidFlowRateMax(700)
- end
- end
- else
- turbine_1.setActive(true)
- end
- if turbine_1.getEnergyStored() > 800000 == true then
- turbine_1.setVentAll()
- mon_1.setCursorPos(1,2)
- mon_1.write("Ventil: ")
- mon_1.write("Alles")
- elseif turbine_1.getActive() == true then
- if turbine_1.getRotorSpeed() < 1700 == true then
- turbine_1.setVentAll()
- mon_1.setCursorPos(1,2)
- mon_1.write("Ventil: ")
- mon_1.write("Alles")
- else
- mon_1.setCursorPos(1,2)
- turbine_1.setVentAll()
- mon_1.write("Ventil: ")
- mon_1.write("Alles")
- end
- else
- turbine_1.setVentNone()
- mon_1.setCursorPos(1,2)
- mon_1.write("Ventil: ")
- mon_1.write("Nichts")
- end
- mon_1.setCursorPos(1,3)
- mon_1.write("Energie: ")
- mon_1.write(math.floor(turbine_1.getEnergyProducedLastTick()))
- mon_1.write(" RF/t")
- mon_1.setCursorPos(1,4)
- mon_1.write("Energie-Buffer: ")
- mon_1.write(math.floor(turbine_1.getEnergyStored()))
- mon_1.write(" RF")
- mon_1.setCursorPos(1,5)
- mon_1.write("Rotor-Speed: ")
- mon_1.write(math.floor(turbine_1.getRotorSpeed()))
- mon_1.write(" RPM")
- mon_1.setCursorPos(1,6)
- mon_1.write("Rate: ")
- mon_1.write(turbine_1.getFluidFlowRateMax())
- mon_1.write(" mb")
- mon_1.setCursorPos(1,7)
- mon_1.write("Coils: ")
- if turbine_1.getInductorEngaged() == false then
- mon_1.write("Aus")
- else
- mon_1.write("An")
- end
- if turbine_1.getRotorSpeed() > 1801 == true then
- mon_1.setCursorPos(1,19)
- mon_1.write("Senkt RPM ...")
- turbine_1.setVentNone()
- turbine_1.setFluidFlowRateMax(1000)
- else
- turbine_1.setVentOverflow()
- end
- if turbine_1.getEnergyStored() == 1000000 == true then
- turbine_1.setFluidFlowRateMax(0)
- else
- turbine_1.setFluidFlowRateMax(1020)
- end
- if turbine_1.getRotorSpeed() < 1800 == true then
- if turbine_1.getRotorSpeed() > 1700 == true then
- turbine_1.setFluidFlowRateMax(1850)
- else
- turbine_1.setFluidFlowRateMax(2000)
- end
- end
- sleep(0.1)
- mon_1.clear()
- mon_1.setCursorPos(1,1)
- end
Add Comment
Please, Sign In to add comment