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
- -- computer_8, monitor_4, turbine_0, reactor_6, cap3
- function tscram()
- -- a turbine's going to fast, CPO3's yellin' "Shut 'em all down!!"
- turbine1.setActive(false)
- -- turbine2.setActive(false)
- -- turbine3.setActive(false)
- -- turbine4.setActive(false)
- mon.setTextColor(colors.red)
- print("TURBINE SCRAM!!!! (2 min power down)")
- sleep(120)
- end
- local reactor1 = peripheral.wrap("BigReactors-Reactor_58")
- local mon = peripheral.wrap("monitor_86")
- local turbine1 = peripheral.wrap("BigReactors-Turbine_48")
- --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_3")
- local tspeed1 = 0
- local tspeed2 = 0
- local tspeed3 = 0
- local tspeed4 = 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(64)
- -- was 60,60,60,70,70
- 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
- -- just turn it off when the turbine is full
- -- if turbine1.getEnergyStored() >= full then
- -- reactor1.setActive(false)
- -- else
- if turbine1.getEnergyStored() >= high then
- -- reactor1.setAllControlRodLevels(95)
- reactor1.setActive(false)
- 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,2,3,4-RF: ")
- mon.setTextColor(colors.green)
- mon.write(math.floor(turbine1.getEnergyStored())
- --,",",
- -- math.floor(turbine2.getEnergyStored()),",",
- -- math.floor(turbine3.getEnergyStored()),",",
- -- math.floor(turbine4.getEnergyStored())
- )
- mon.setCursorPos(1,5)
- mon.setTextColor(colors.white)
- mon.write("C-RF: ")
- mon.setTextColor(colors.green)
- mon.write(math.floor(capacitor1.getEnergyStored()))
- mon.setCursorPos(1,6)
- tspeed1 = math.floor(turbine1.getRotorSpeed())
- if tspeed1>2000 then
- tscram()
- end
- -- tspeed2 = math.floor(turbine1.getRotorSpeed())
- -- if tspeed2>2000 then
- -- tscram()
- -- end
- -- tspeed3 = math.floor(turbine1.getRotorSpeed())
- -- if tspeed3>2000 then
- -- tscram()
- -- end
- -- tspeed4 = math.floor(turbine1.getRotorSpeed())
- -- if tspeed4>2000 then
- -- tscram()
- -- end
- mon.setCursorPos(1,6)
- mon.setTextColor(colors.white)
- turbine1.setActive(true)
- mon.write("T1-T4 RPM: ")
- mon.setTextColor(colors.green)
- mon.write(tspeed1,tspeed2,tspeed3,tspeed4)
- 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