Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local com = require("component")
- local chest = com.isAvailable("chest") and com.chest or error("нет сундука")
- local size = chest.getInventorySize()
- local data = chest.getAllStacks(0)
- for slot = 1,size do
- if data[slot] then
- for name, value in pairs(data[slot]) do
- if type(value) == "table" then
- for a, b in pairs(value) do
- print(a,b)
- end
- else
- print(name.." = "..value)
- end
- end
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement