MigasRocha

Diesel Amount Monitor

Mar 2nd, 2025 (edited)
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. mon.clear()
  2.  
  3. tank = peripheral.wrap("right")
  4.  
  5. mon = peripheral.wrap("back")
  6.  
  7. amount = tank.getStored().amount
  8.  
  9. while true do
  10.  
  11. mon.setCursorPos(1,1)
  12.  
  13. mon.setTextColor(colors.orange)
  14.  
  15. mon.write("Diesel.")
  16.  
  17. mon.setCursorPos(1,3)
  18.  
  19. mon.setTextColor(colors.white)
  20.  
  21. mon.clearLine(1,3)
  22.  
  23. formattedStored = string.format("%.1f",amount/1000)
  24.  
  25. mon.write(formattedStored.."mB")
  26.  
  27. sleep(1)
  28.  
  29. end
  30.  
Advertisement
Add Comment
Please, Sign In to add comment