Advertisement
Parg60

rotorManagment

Dec 23rd, 2020 (edited)
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.69 KB | None | 0 0
  1. local rotor1 = peripheral.wrap("BigReactors-Turbine_2")
  2.  
  3. while true do
  4.    
  5.     if rotor1.getEnergyStored() > 900000 then
  6.         rotor1.setInductorEngaged(false)
  7.  
  8.         if rotor1.getRotorSpeed() < 1700 then
  9.             rotor1.setFluidFlowRateMax(50)
  10.         elseif rotor1.getRotorSpeed() > 1750 then
  11.             rotor1.setFluidFlowRateMax(0)
  12.         end
  13.        
  14.     elseif rotor1.getEnergyStored() < 300000 then
  15.         rotor1.setInductorEngaged(true)
  16.  
  17.         if rotor1.getRotorSpeed() < 1750 then
  18.             rotor1.setFluidFlowRateMax(1400)
  19.         elseif rotor1.getRotorSpeed() > 1825 then
  20.             rotor1.setFluidFlowRateMax(1250)
  21.         end
  22.     end
  23.  
  24.     os.sleep(1)
  25. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement