Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function getReactorHandle()
- local pList = peripheral.getNames()
- local i, name
- for i, name in pairs(pList) do
- if peripheral.getType(name) == "BigReactors-Reactor" then
- return peripheral.wrap(name)
- end
- end
- end
- reactor = getReactorHandle()
- 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
- reactor = getTurbineHandle()
- while true do
- sleep(0)
- if reactor.getFuelTemperature() < 750 then
- reactor.setActive(true)
- end
- if reactor.getFuelTemperature() > 1200 then
- reactor.setActive(false)
- end
- 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