Advertisement
HiggsBroson

Untitled

Dec 8th, 2020
443
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. local reactor = peripheral.wrap ("back")
  2.  
  3. local MAX_RF = 10000000
  4.  
  5. local MIN_LEVEL = 0.2
  6. local MAX_LEVEL = 0.8
  7.  
  8. while true do
  9. local rf = reactor.getEnergyStored ()
  10.  
  11. local percent = rf / MAX_RF
  12. if percent < MIN_LEVEL then
  13. reactor.setActive (true)
  14. elseif percent > MAX_LEVEL then
  15. reactor.setActive (false)
  16. end
  17.  
  18. sleep (1)
  19. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement