SHOW:
|
|
- or go back to the newest paste.
| 1 | - | essentiaChest = peripheral.wrap("chest_1")
|
| 1 | + | triggerChest = peripheral.wrap("crystal_2")
|
| 2 | - | pedestalChest = peripheral.wrap("diamond_1")
|
| 2 | + | infusionChest = peripheral.wrap("gold_3")
|
| 3 | - | triggerChest = peripheral.wrap("crystal_0")
|
| 3 | + | |
| 4 | - | infusionChest = peripheral.wrap("gold_0")
|
| 4 | + | |
| 5 | arg = { ... }
| |
| 6 | outputFile = arg[1] | |
| 7 | ||
| 8 | triggerChest.condenseItems() | |
| 9 | infusionChest.condenseItems() | |
| 10 | - | essentiaChest.condenseItems() |
| 10 | + | |
| 11 | - | pedestalChest.condenseItems() |
| 11 | + | |
| 12 | stacks = chest.getAllStacks() | |
| 13 | itemArray = {}
| |
| 14 | for slot,item in ipairs(stacks) do | |
| 15 | table.insert(itemArray, item.all()) | |
| 16 | end | |
| 17 | return itemArray | |
| 18 | end | |
| 19 | ||
| 20 | infusionItems = getItems(infusionChest) | |
| 21 | triggerItems = getItems(triggerChest) | |
| 22 | ||
| 23 | result = { infusionItems = infusionItems,
| |
| 24 | - | essentiaItems = getItems(essentiaChest) |
| 24 | + | |
| 25 | ||
| 26 | - | pedestalItems = getItems(pedestalChest) |
| 26 | + | |
| 27 | file.write(json.encodePretty(result)) | |
| 28 | file.close() |