SHOW:
|
|
- or go back to the newest paste.
| 1 | - | --File: /testMoves |
| 1 | + | --File: /showInventory |
| 2 | ||
| 3 | local moves = require("cattech.moves")
| |
| 4 | - | dofile("/cattech/turtle.lua")
|
| 4 | + | dofile("/cattech/common.lua")
|
| 5 | - | dofile("/cattech/file.lua")
|
| 5 | + | |
| 6 | inventory = scanInventory(); | |
| 7 | - | displayHash(moves) |
| 7 | + | |
| 8 | ||
| 9 | - | moves.up() |
| 9 | + | for name, count in pairs(inventory) do |
| 10 | - | moves.turnRight() |
| 10 | + | print(name .. ": " .. count) |
| 11 | - | moves.forward() |
| 11 | + | end |