Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local t1 = peripheral.wrap("BigReactors-Turbine_0")
- local t2 = peripheral.wrap("BigReactors-Turbine_1")
- local m = peripheral.wrap("monitor_0")
- local status1 = ""
- local status2 = ""
- local engaged1 = ""
- local engaged2 = ""
- local rpm1 = 0
- local rpm2 = 0
- local energy1 = 0
- local energy2 = 0
- local energyProd1 = 0
- local energyProd2 = 0
- while true do
- -- Getting and setting status vars.--
- local status1 = "Offline"
- local status2 = "Offline"
- local engaged1 = "Not Engaged"
- local engaged2 = "Not Engaged"
- energyProd1 = t1.getEnergyProducedLastTick()
- energyProd2 = t2.getEnergyProducedLastTick()
- energy1 = t1.getEnergyStored()
- energy2 = t1.getEnergyStored()
- rpm1 = t1.getRotorSpeed()
- rpm2 = t1.getRotorSpeed()
- if t1.getInductorEngaged() then engaged1 = "Engaged" end
- if t2.getInductorEngaged() then engaged2 = "Engaged" end
- if t1.getActive() then status1 = "Online" end
- if t2.getActive() then status2 = "Online" end
- --Displaying status vars.--
- m.clear()
- --Turbine 1--
- m.setCursorPos(1,1)
- m.setTextColor(colors.cyan)
- m.write("Turbine 1")
- m.setCursorPos(1,2)
- m.setTextColor(colors.white)
- m.write("Turbine Status: ")
- m.setCursorPos(20,2)
- m.setTextColor(colors.red)
- m.write(status1)
- m.setCursorPos(1,3)
- m.setTextColor(colors.white)
- m.write("Induction Coils: ")
- m.setCursorPos(20,3)
- m.setTextColor(colors.red)
- m.write(engaged1)
- m.setCursorPos(1,4)
- m.setTextColor(colors.white)
- m.write("RF/T: ")
- m.setCursorPos(20,4)
- m.setTextColor(colors.red)
- m.write(energyProd1)
- m.setCursorPos(1,5)
- m.setTextColor(colors.white)
- m.write("RF Stored: ")
- m.setCursorPos(20,5)
- m.setTextColor(colors.red)
- m.write(energy1)
- m.setCursorPos(1,6)
- m.setTextColor(colors.white)
- m.write("RPM: ")
- m.setCursorPos(20,6)
- m.setTextColor(colors.red)
- m.write(rpm1)
- --Turbine 2--
- m.setCursorPos(1,7)
- m.setTextColor(colors.cyan)
- m.write("Turbine 2")
- m.setCursorPos(1,8)
- m.setTextColor(colors.white)
- m.write("Turbine Status: ")
- m.setCursorPos(20,8)
- m.setTextColor(colors.red)
- m.write(status2)
- m.setCursorPos(1,9)
- m.setTextColor(colors.white)
- m.write("Induction Coils: ")
- m.setCursorPos(20,9)
- m.setTextColor(colors.red)
- m.write(engaged2)
- m.setCursorPos(1,10)
- m.setTextColor(colors.white)
- m.write("RF/T: ")
- m.setCursorPos(20,10)
- m.setTextColor(colors.red)
- m.write(energyProd2)
- m.setCursorPos(1,11)
- m.setTextColor(colors.white)
- m.write("RF Stored: ")
- m.setCursorPos(20,11)
- m.setTextColor(colors.red)
- m.write(energy2)
- m.setCursorPos(1,12)
- m.setTextColor(colors.white)
- m.write("RPM: ")
- m.setCursorPos(20,12)
- m.setTextColor(colors.red)
- m.write(rpm2)
- --Redo every 0.1 sec.--
- os.sleep(0.1)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement