Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getTurbineHandle()
- local pList = peripheral.getNames()
- local i, name
- for i, name in pairs(pList) do
- if peripheral.getType(name) == "BigReactors-Turbine" then
- return peripheral.wrap(name)
- end
- end
- end
- turbine = getTurbineHandle()
- while true do
- sleep(0)
- if turbine.getEnergyStored() > 900000 then
- turbine.setActive(false)
- end
- if turbine.getEnergyStored() < 750000 then
- turbine.setActive(true)
- end
- if turbine.getRotorSpeed() < 1850 then
- turbine.setInductorEngaged(false)
- end
- if turbine.getRotorSpeed() > 1750 then
- turbine.setInductorEngaged(true)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement