Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- turbine = peripheral.wrap("bottom")
- while true do
- turbine.setActive(true)
- speed = turbine.getRotorSpeed()
- state = turbine.getActive()
- term.clear()
- term.setCursorPos(1,1)
- term.write(math.floor(speed))
- sleep(0.15)
- turbine.setFluidFlowRateMax(2000)
- stringSpeed = tostring(math.floor(speed))
- shell.run("label", "set", stringSpeed)
- if speed <= 1846 then
- term.setTextColor(colors.red)
- elseif speed >= 1847 and speed < 1850 then
- term.setTextColor(colors.lime)
- elseif speed >= 1850 then
- term.setTextColor(colors.red)
- end
- if speed < 1846 then
- turbine.setInductorEngaged(false)
- elseif speed > 1848 then
- turbine.setInductorEngaged(true)
- elseif speed < 1850 then
- turbine.setFluidFlowRateMax(2000)
- end
- if speed > 1850 then
- turbine.setFluidFlowRateMax(0)
- elseif speed < 1845 then
- turbine.setVentOverflow()
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement