daily pastebin goal
26%
SHARE
TWEET

reactor

a guest Aug 10th, 2018 63 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
 
  1. local reactor = peripheral.wrap("back")
  2. local monitor = peripheral.wrap("left")
  3.  
  4.  
  5. local action = ""
  6. while action ~= "exit" do
  7.   term.write("[enable|disable|status|setrods]: ")
  8.   action = read()
  9.  
  10.   if action ~= "exit" then
  11.      
  12.      if action == "status" then
  13.      
  14.        term.write("Active: ")
  15.        print(reactor.getActive())
  16.        
  17.        term.write("RF/t: ")
  18.        print(reactor.getEnergyProducedLastTick())
  19.      elseif action == "setrods" then
  20.        term.write("[0-100]: ")
  21.        local newRods = tonumber(read())
  22.        
  23.        reactor.setAllControlRodLevels(newRods)
  24.        term.write("Set Control Rods = ")
  25.        print(newRods)
  26.      elseif action == "enable" then
  27.        reactor.setActive(true)
  28.        print("Reactor activated")
  29.      elseif action == "disable" then
  30.        reactor.setActive(false)
  31.        print("Reactor deactivated")
  32.      end
  33.      
  34.   end
  35. end
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top