zodiak707

delete

Jun 21st, 2022 (edited)
26
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.09 KB | None | 0 0
  1. p = peripheral.wrap("back")
  2.  
  3. while true do
  4.  
  5. p.setActive(true)
  6. p.setAllControlRodLevels(100)
  7.  
  8. term.clear()
  9. term.setTextColor(colors.white)
  10. term.setCursorPos(1,1)
  11.  
  12. stored = p.battery().stored()
  13. mEnergy = math.floor(p.battery().capacity())
  14. fuelCon = p.fuelTank().burnedLastTick()
  15. energyGen = math.floor(p.battery().producedLastTick())
  16. efv = math.floor(energyGen/fuelCon/100)
  17. storedP = math.floor(stored/mEnergy*100)
  18.  
  19. print("Energy Buffer: "..storedP.." %")
  20. print("Energy Production "..energyGen.." rf/t")
  21. print("Fuel consumption "..fuelCon.." mb/t")
  22.  
  23. if(fuelCon == 0) then
  24. term.setTextColor(colors.red)
  25. print("Reactor is not running")
  26. else
  27. term.setTextColor(colors.green)
  28. print("Reactor is running")
  29. term.setTextColor(colors.white)
  30. print("Efficieny Value: "..efv)
  31. end
  32.  
  33. if(storedP >= 95) then
  34. p.setAllControlRodLevels(100)
  35. else
  36. p.setAllControlRodLevels(0)
  37. end
  38.  
  39. os.sleep(1)
  40. end
Add Comment
Please, Sign In to add comment