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