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