ecco7777

CC Energycore Display

Dec 11th, 2025
14
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.87 KB | None | 0 0
  1. img=paintutils.loadImage("core")
  2. m=peripheral.wrap("back")
  3. d=0.5
  4. x=55
  5. e=peripheral.wrap("draconic_rf_storage_103")
  6. c1=0
  7. c2=0
  8. eMax=e.getMaxEnergyStored()
  9. term.setBackgroundColor(colors.black)
  10. term.clear()
  11. while true do
  12. sleep(d)
  13. paintutils.drawImage(img,1,1)
  14. sleep(d)
  15. paintutils.drawImage(img,1,-33)
  16. term.setTextColor(colors.white)
  17. term.setBackgroundColor(colors.black)
  18. c2=c1
  19. c1=e.getEnergyStored()
  20. term.setCursorPos(x,5)
  21. term.write("Charged to:")
  22. term.setCursorPos(x,6)
  23. term.write(tostring(math.floor(100/eMax*c1)).."% ")
  24. term.setCursorPos(x,1)
  25. term.write("Energy Total:")
  26. term.setCursorPos(x,2)
  27. term.write(tostring(c1))
  28. term.setCursorPos(x,3)
  29. en=(c1-c2)/20
  30. if en>0 then
  31. term.setTextColor(colors.green)
  32. term.write("RF IN ")
  33. else
  34. term.setTextColor(colors.red)
  35. term.write("RF Out ")
  36. end
  37. term.setCursorPos(x,4)
  38. term.write(tostring(en).." ")
  39. end
Add Comment
Please, Sign In to add comment