Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- tank = peripheral.wrap('back')
- function printTankInfo()
- tankInfo = tank.getTankInfo()
- contents = tankInfo[1].contents
- print('Capacity: '..tankInfo[1].capacity)
- if contents then
- print('Name:'..contents.name)
- print('Raw Name: '..contents.rawName)
- print('Amount: '..contents.amount)
- else
- print('The tank is empty.')
- end
- end
- printTankInfo()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement