Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- sideTank = "right"
- delay = 5
- myTimer = os.startTimer(1)
- while true do
- local event, timerID = os.pullEvent("timer")
- if timerID == myTimer then
- term.clear()
- term.setCursorPos(1, 1)
- if peripheral.isPresent(sideTank) == true then
- local tank = peripheral.wrap(sideTank)
- local info = tank.getTankInfo(sideTank)
- local data = info[1]
- if (tostring(data['rawName']) ~= "nil") then
- --print(tostring(data['rawName']).." ["..tostring(data['name']).."] ("..tostring(data['id'])..")")
- --print(tostring(data['amount']).." / "..tostring(data['capacity']))
- print(tostring(data['amount']).." / ")
- print(tostring(data['capacity']))
- else
- print("Empty!")
- end
- else
- print("Empty!")
- end
- myTimer = os.startTimer(delay)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement