Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- credits to:
- -- https://youtu.be/sHN-KQKUkaY
- -- for an api reference, I use and recommend:
- -- http://ftbwiki.org/Reactor_Computer_Port
- -- http://ftbwiki.org/Turbine_Computer_Port
- local reactor1 = peripheral.wrap("BigReactors-Reactor_1")
- local mon = peripheral.wrap("monitor_1")
- local turbine1 = peripheral.wrap("BigReactors-Turbine_1")
- local turbine2 = peripheral.wrap("BigReactors-Turbine_2")
- local turbine3 = peripheral.wrap("BigReactors-Turbine_3")
- local turbine4 = peripheral.wrap("BigReactors-Turbine_4")
- local capacitor1 = peripheral.wrap("tile_blockcapacitorbank_name_1")
- local tspeed = 0
- -- basic capacitor low, 10k of 100k capacity
- local low = 10000
- -- turbine high 80k 1000000 capacity
- local high = 80000
- -- turbine full at 1M
- local full = 1000000
- reactor1.setAllControlRodLevels(90)
- while true do
- -- note the rod percentage is dependant upon blades, rotor material, and number of turbines
- -- this number is for 1 80 blade turbine with electrum rotors (37\ blocks)
- if capacitor1.getEnergyStored() <= low then
- reactor1.setAllControlRodLevels(85)
- if reactor1.getActive() == false then
- reactor1.setActive(true)
- end
- end
- if turbine1.getEnergyStored() == full then
- reactor1.setActive(false)
- else
- if turbine1.getEnergyStored() >= high then
- reactor1.setAllControlRodLevels(95)
- reactor1.setActive(true)
- end
- end
- mon.clear()
- mon.setTextScale(1)
- mon.setCursorPos(15,19)
- mon.setTextColor(colors.blue)
- mon.write("pooter stat(os)")
- mon.setCursorPos(1,1)
- mon.setTextColor(colors.white)
- mon.write("Active: ")
- mon.setTextColor(colors.green)
- mon.write(reactor1.getActive())
- mon.setCursorPos(1,2)
- mon.setTextColor(colors.white)
- mon.write("Casing Heat: ")
- mon.setTextColor(colors.green)
- mon.write(math.floor(reactor1.getCasingTemperature()))
- mon.setCursorPos(1,3)
- mon.setTextColor(colors.white)
- mon.write("Fuel Heat: ")
- mon.setTextColor(colors.green)
- mon.write(math.floor(reactor1.getFuelTemperature()))
- mon.setCursorPos(1,4)
- mon.setTextColor(colors.white)
- mon.write("T1-RF: ")
- mon.setTextColor(colors.green)
- mon.write(math.floor(turbine1.getEnergyStored()))
- mon.setCursorPos(1,5)
- mon.setTextColor(colors.white)
- mon.write("C-RF: ")
- mon.setTextColor(colors.green)
- mon.write(math.floor(capacitor1.getEnergyStored()))
- tspeed = math.floor(turbine1.getRotorSpeed())
- mon.setCursorPos(1,6)
- if tspeed>2000 then
- turbine1.setActive(false)
- mon.setTextColor(colors.red)
- sleep(120)
- else
- mon.setTextColor(colors.white)
- turbine1.setActive(true)
- end
- mon.write("T1-RPM: ")
- mon.setTextColor(colors.green)
- mon.write(tspeed)
- mon.setCursorPos(1,7)
- mon.setTextColor(colors.white)
- mon.write("T1-Fin: ")
- mon.setTextColor(colors.green)
- mon.write(math.floor(turbine1.getInputAmount()))
- mon.setCursorPos(1,8)
- mon.setTextColor(colors.white)
- mon.write("T1-Fout: ")
- mon.setTextColor(colors.green)
- mon.write(math.floor(turbine1.getOutputAmount()))
- sleep(10)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement