Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- m = peripheral.wrap("openblocks_tank_0")
- mon = peripheral.wrap("left")
- -- loop so constantly updates
- while true do
- tanksTable = m.getTankInfo("unknown")
- maintank = tanksTable[1] -- gets data for tank
- -- prints all data to computer
- shell.run('clear')
- for k, v in pairs(maintank) do
- print(tostring(k)..": "..tostring(v))
- end
- -- prints only capacity/amount to monitor
- mon.clear() -- resets monitor
- mon.setCursorPos(1,1)
- mon.write("Liquid: "..maintank.rawName)
- mon.setCursorPos(1,2)
- mon.write("Capacity: "..maintank.capacity)
- mon.setCursorPos(1,3)
- mon.write("Amount: "..maintank.amount)
- -- waits 5 seconds
- sleep(5)
- end
- --pastebin get H6cCFjDR tank
Advertisement
Add Comment
Please, Sign In to add comment