Advertisement
Falax

PrototypeBase

Nov 5th, 2020 (edited)
61
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.54 KB | None | 0 0
  1. glass = peripheral.wrap("left")
  2. local refreshRate = 1
  3. glass.clear()
  4.  
  5. v = peripheral.wrap("draconic_rf_storage_2")
  6. prevVal = 0
  7.  
  8. while true do
  9. glass.clear()
  10. val = v.getEnergyStored()
  11. maxVal = v.getMaxEnergyStored()
  12. rftick = (val-prevVal)/(refreshRate*20)
  13. pourcent = math.ceil((val/maxVal)*100)
  14.  
  15. glass.addBox(1, 200, 100, 50, 0xFFFFFF, 0.2)
  16. glass.addText(5, 210,val .. " RF", 0xBF700F)
  17. glass.addText(5,220,rftick .. " RF/t", Ox000000)
  18. glass.addText(5,230,pourcent .. " %", 0x000000)
  19.  
  20. glass.sync()
  21. sleep(1)
  22. prevVal = val
  23. end
  24.  
  25.  
  26.  
  27.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement