Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --By planty for JLI
- term.clear()
- print('Turbine & Reactor Monitor engaged.')
- emptyflag=0
- offlineflag=0
- flashflag=0
- -- List Turbines variables
- reactor1=peripheral.wrap('BigReactors-Reactor_0')
- turbine1=peripheral.wrap('BigReactors-Turbine_1')
- turbine2=peripheral.wrap('BigReactors-Turbine_2')
- turbine3=peripheral.wrap('BigReactors-Turbine_3')
- turbine4=peripheral.wrap('BigReactors-Turbine_4')
- monitor=peripheral.wrap('monitor_0')
- monitor.setTextScale(1)
- monitor.setBackgroundColor(colors.black)
- while true do
- monitor.clear()
- monitor.setTextColor(colors.lightBlue)
- monitor.setTextScale(1)
- monitor.setCursorPos(16,1)
- monitor.write('Turbine Monitoring')
- -- Headline
- monitor.setCursorPos(6,3)
- monitor.setTextColor(colors.white)
- monitor.write('RPM')
- monitor.setCursorPos(16,3)
- monitor.setTextColor(colors.white)
- monitor.write('STEAM')
- monitor.setCursorPos(26,3)
- monitor.setTextColor(colors.white)
- monitor.write('RF/T')
- monitor.setCursorPos(38,3)
- monitor.setTextColor(colors.white)
- monitor.write('PSU')
- -- Turbine List
- monitor.setCursorPos(1,4)
- monitor.setTextColor(colors.white)
- monitor.write('T1')
- monitor.setCursorPos(1,5)
- monitor.setTextColor(colors.white)
- monitor.write('T2')
- monitor.setCursorPos(1,6)
- monitor.setTextColor(colors.white)
- monitor.write('T3')
- monitor.setCursorPos(1,7)
- monitor.setTextColor(colors.white)
- monitor.write('T4')
- -- Turbine RPM
- monitor.setCursorPos(6,4)
- if turbine1.getRotorSpeed()>800 and turbine1.getRotorSpeed()<1000 then
- monitor.setTextColor(colors.green)
- elseif turbine1.getRotorSpeed()>1840 and turbine1.getRotorSpeed()<1842 then
- monitor.setTextColor(colors.green)
- else
- monitor.setTextColor(colors.red)
- end
- monitor.write((math.floor(turbine1.getRotorSpeed()+0.1))..' RPM')
- monitor.setCursorPos(6,5)
- if turbine2.getRotorSpeed()>800 and turbine2.getRotorSpeed()<1000 then
- monitor.setTextColor(colors.green)
- elseif turbine2.getRotorSpeed()>1840 and turbine2.getRotorSpeed()<1842 then
- monitor.setTextColor(colors.green)
- else
- monitor.setTextColor(colors.red)
- end
- monitor.write((math.floor(turbine2.getRotorSpeed()+0.1))..' RPM')
- monitor.setCursorPos(6,6)
- if turbine3.getRotorSpeed()>800 and turbine3.getRotorSpeed()<1000 then
- monitor.setTextColor(colors.green)
- elseif turbine3.getRotorSpeed()>1840 and turbine3.getRotorSpeed()<1842 then
- monitor.setTextColor(colors.green)
- else
- monitor.setTextColor(colors.red)
- end
- monitor.write((math.floor(turbine3.getRotorSpeed()+0.1))..' RPM')
- monitor.setCursorPos(6,7)
- if turbine4.getRotorSpeed()>800 and turbine4.getRotorSpeed()<1000 then
- monitor.setTextColor(colors.green)
- elseif turbine4.getRotorSpeed()>1840 and turbine4.getRotorSpeed()<1842 then
- monitor.setTextColor(colors.green)
- else
- monitor.setTextColor(colors.red)
- end
- monitor.write((math.floor(turbine4.getRotorSpeed()+0.1))..' RPM')
- monitor.setCursorPos(6,8)
- -- Turbine STEAM
- monitor.setCursorPos(16,4)
- if turbine1.getFluidFlowRate()>940 and turbine1.getFluidFlowRate()<970 then
- monitor.setTextColor(colors.green)
- else
- monitor.setTextColor(colors.red)
- end
- monitor.write(turbine1.getFluidFlowRate().. ' mB/t')
- monitor.setCursorPos(16,5)
- if turbine2.getFluidFlowRate()>940 and turbine2.getFluidFlowRate()<970 then
- monitor.setTextColor(colors.green)
- else
- monitor.setTextColor(colors.red)
- end
- monitor.write(turbine2.getFluidFlowRate().. ' mB/t')
- monitor.setCursorPos(16,6)
- if turbine3.getFluidFlowRate()>940 and turbine3.getFluidFlowRate()<970 then
- monitor.setTextColor(colors.green)
- else
- monitor.setTextColor(colors.red)
- end
- monitor.write(turbine3.getFluidFlowRate().. ' mB/t')
- monitor.setCursorPos(16,7)
- if turbine4.getFluidFlowRate()>940 and turbine4.getFluidFlowRate()<970 then
- monitor.setTextColor(colors.green)
- else
- monitor.setTextColor(colors.red)
- end
- monitor.write(turbine4.getFluidFlowRate().. ' mB/t')
- -- Turbine RFT
- monitor.setCursorPos(26,4)
- if turbine1.getEnergyProducedLastTick()>10360 and turbine1.getEnergyProducedLastTick()<10500 then
- monitor.setTextColor(colors.green)
- else
- monitor.setTextColor(colors.red)
- end
- monitor.write(math.floor((turbine1.getEnergyProducedLastTick()+0.5)).. ' RF/t')
- monitor.setCursorPos(26,5)
- if turbine2.getEnergyProducedLastTick()>10360 and turbine2.getEnergyProducedLastTick()<10500 then
- monitor.setTextColor(colors.green)
- else
- monitor.setTextColor(colors.red)
- end
- monitor.write(math.floor((turbine2.getEnergyProducedLastTick()+0.5)).. ' RF/t')
- monitor.setCursorPos(26,6)
- if turbine3.getEnergyProducedLastTick()>10360 and turbine3.getEnergyProducedLastTick()<10500 then
- monitor.setTextColor(colors.green)
- else
- monitor.setTextColor(colors.red)
- end
- monitor.write(math.floor((turbine3.getEnergyProducedLastTick()+0.5)).. ' RF/t')
- monitor.setCursorPos(26,7)
- if turbine4.getEnergyProducedLastTick()>10360 and turbine4.getEnergyProducedLastTick()<10500 then
- monitor.setTextColor(colors.green)
- else
- monitor.setTextColor(colors.red)
- end
- monitor.write(math.floor((turbine4.getEnergyProducedLastTick()+0.5)).. ' RF/t')
- monitor.setCursorPos(26,8)
- -- Turbine PSU
- monitor.setCursorPos(38,4)
- if turbine1.getEnergyStored()>900000 then
- monitor.setTextColor(colors.green)
- else
- monitor.setTextColor(colors.red)
- end
- monitor.write(math.floor((turbine1.getEnergyStored()+0.1))..' RF')
- monitor.setCursorPos(38,5)
- if turbine2.getEnergyStored()>900000 then
- monitor.setTextColor(colors.green)
- else
- monitor.setTextColor(colors.red)
- end
- monitor.write(math.floor((turbine2.getEnergyStored()+0.1))..' RF')
- monitor.setCursorPos(38,6)
- if turbine3.getEnergyStored()>900000 then
- monitor.setTextColor(colors.green)
- else
- monitor.setTextColor(colors.red)
- end
- monitor.write(math.floor((turbine3.getEnergyStored()+0.1))..' RF')
- monitor.setCursorPos(38,7)
- if turbine4.getEnergyStored()>900000 then
- monitor.setTextColor(colors.green)
- else
- monitor.setTextColor(colors.red)
- end
- monitor.write(math.floor((turbine4.getEnergyStored()+0.1))..' RF')
- monitor.setCursorPos(38,8)
- -- Reactor Monitor
- monitor.setTextColor(colors.lightBlue)
- monitor.setTextScale(1)
- monitor.setCursorPos(16,20)
- monitor.write('Reactor Monitoring')
- monitor.setCursorPos(6,22)
- monitor.setTextColor(colors.white)
- monitor.write('FUEL')
- monitor.setCursorPos(16,22)
- monitor.setTextColor(colors.white)
- monitor.write('STEAM')
- monitor.setCursorPos(26,22)
- monitor.setTextColor(colors.white)
- monitor.write('C.TEMP')
- monitor.setCursorPos(38,22)
- monitor.setTextColor(colors.white)
- monitor.write('ROD')
- -- Reactor List
- monitor.setCursorPos(1,23)
- monitor.setTextColor(colors.white)
- monitor.write('R1')
- -- Reactor Fuel
- monitor.setCursorPos(6,23)
- monitor.setTextColor(colors.green)
- monitor.write(math.floor(((reactor1.getFuelAmount()/reactor1.getFuelAmountMax())*100)+0.5)..'%')
- -- Reactor Steam
- monitor.setCursorPos(16,23)
- monitor.setTextColor(colors.green)
- monitor.write((math.floor(reactor1.getEnergyProducedLastTick()+0.5)).. ' mb/t')
- -- Reactor C.Temp
- monitor.setCursorPos(26,23)
- monitor.setTextColor(colors.green)
- monitor.write((math.floor(reactor1.getFuelTemperature()+0.1))..' C')
- -- Reactor1 Rod
- monitor.setCursorPos(38,23)
- monitor.setTextColor(colors.green)
- monitor.write((reactor1.getControlRodLevel(0))..'% Depth')
- sleep(1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement