Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- r = {}
- r[2] = peripheral.wrap("BigReactors-Turbine_2")
- r[3] = peripheral.wrap("BigReactors-Turbine_3")
- r[4] = peripheral.wrap("BigReactors-Turbine_4")
- r[5] = peripheral.wrap("BigReactors-Turbine_5")
- r[6] = peripheral.wrap("BigReactors-Turbine_6")
- r[7] = peripheral.wrap("BigReactors-Turbine_7")
- r[8] = peripheral.wrap("BigReactors-Turbine_8")
- r[9] = peripheral.wrap("BigReactors-Turbine_9")
- r[10] = peripheral.wrap("BigReactors-Turbine_10")
- m = peripheral.wrap("monitor_0")
- m.clear()
- m.setTextScale(2)
- m.setBackgroundColor(colors.black)
- m.write()
- j = 2
- while true do
- for i =2, 10 do
- m.setCursorPos(1,j-1)
- m.write("Turbine "..i-1..": " .. math.floor(r[i].getRotorSpeed() + .5) .. " RPM")
- charge= math.floor(math.floor(r[i].getRotorSpeed()+.5)/18)
- m.setBackgroundColor(colors.black)
- m.setCursorPos(1,j)
- j = j +2
- m.setBackgroundColor(colors.green)
- for i = 0, math.floor(charge/10) do
- m.write(" ")
- end
- m.setBackgroundColor(colors.red)
- for i = 0, 9-math.floor(charge/10) do
- m.write(" ")
- end
- m.setBackgroundColor(colors.black)
- end
- os.sleep(1)
- m.clear()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement