CapsAdmin

Untitled

Nov 14th, 2013
125
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.64 KB | None | 0 0
  1. local col_offset = 2
  2.  
  3. local tanks = {
  4.     peripheral.wrap("rcirontankvalvetile_0"), -- MFR Bio Fuel
  5.     peripheral.wrap("rcirontankvalvetile_1"), -- Honey
  6.     peripheral.wrap("rcirontankvalvetile_2"), -- Ethanol
  7.     peripheral.wrap("rcirontankvalvetile_3"), -- Oil
  8.     peripheral.wrap("rcirontankvalvetile_4"), -- Fuel
  9. }
  10.  
  11. function displayTank(data, i)
  12.     for _, tank in pairs(data.getTankInfo("unknown")) do
  13.         mon2.setCursorPos(rowPos, i + col_offset)
  14.         mon2.clearLine()
  15.         mon2.write("Iron Tank " .. i .. " (" .. tank.name .. ") : " .. tank.amount)
  16.     end
  17. end
  18.  
  19. function dispTanks()
  20.     for i, tank in pairs(tanks) do
  21.         displayTank(irontank0, i - 1)
  22.     end
  23. end
Advertisement
Add Comment
Please, Sign In to add comment