Advertisement
Guest User

tank.lua

a guest
Jul 24th, 2017
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.36 KB | None | 0 0
  1. component = require("component")
  2. tank = component.tank_controller
  3.  
  4. tInfo = tank.getFluidInTank(4)
  5.  
  6. amount = tInfo[0].amount
  7. capacity = tInfo[0].capacity
  8. label = tInfo[0].label
  9.  
  10. percent = amount/capacity*100
  11.  
  12. math.floor(percent + 0.5)
  13.  
  14. print("Liquid type : "..label)
  15. print("Amount      : "..amount)
  16. print("Tank Cap.   : "..capacity)
  17. print("% Full      : "..percent)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement