Pralexio

Big Reactor Fuel Controller 1.10.2

Feb 27th, 2021 (edited)
1,139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.37 KB | None | 0 0
  1. local component = require("component")
  2.  
  3. local rc = component.br_reactor
  4.  
  5. local FAM = rc.getFuelAmount()
  6.    
  7. local function nv()
  8.         local FM = rc.getFuelAmount()
  9.         ptt = (FM * 100) / FAM
  10.     end
  11.  
  12. while true do
  13.     nv()
  14.    
  15.     if ptt < 50 then
  16.         rc.setActive(false)
  17.     elseif ptt >= 51 then
  18.         rc.setActive(true)
  19.         os.sleep(1)
  20.      end
  21.  end
Add Comment
Please, Sign In to add comment