Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. averageTemperature = 7000
  2. RFIncreaseAmount = 20
  3. RFoffAmount = 1000
  4.  
  5.  
  6. -- I'd recommend not to edit further by yourself.
  7. while true do
  8. reactor = peripheral.wrap("bottom")
  9. local fluxgate = peripheral.find("flux_gate")
  10.  
  11. local ri = reactor.getReactorInfo()
  12. local getFlux = fluxgate.getSignalLowFlow()
  13.  
  14. increaseFlux = getFlux + RFIncreaseAmount
  15. increaseFluxMore = getFlux + RFIncreaseAmount + 5000
  16. decreaseFlux = getFlux - 10000
  17. RegulateFlux = getFlux - RFoffAmount
  18. belowAverage = averageTemperature - 400
  19.  
  20.  
  21. if ri.temperature <= averageTemperature and
  22.   ri.generationRate >= RegulateFlux then
  23.   if ri.temperature <= belowAverage then
  24.   fluxgate.setSignalLowFlow(increaseFluxMore)
  25.   print("Adding a lot of RF")
  26.   else
  27.   fluxgate.setSignalLowFlow(increaseFlux)
  28.   print("adding more RF")
  29.   end
  30. end
  31. sleep(0.1)
  32. end