Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- chestOne=peripheral.wrap("left")
- chestTwo=peripheral.wrap("right")
- function getItems()
- items={}
- allItems=chestOne.getAllStacks()
- for nothing,itemData in pairs(allItems) do
- items[itemData['id']]={itemData['name'],itemData['qty']}
- end
- allItems=chestTwo.getAllStacks()
- for nothing,itemData in pairs(allItems) do
- if items[itemData['id']]==nil then
- items[itemData['id']]={itemData['name'],itemData['qty']+items[itemData['id']]['qty']}
- else
- items[itemData['id']]={itemData['name'],itemData['qty']}
- end
- end
- for id,data in pairs(items) do
- print(id.." ("..data['name']..") : "..data['count'])
- end
- end
- function getSpecificItemCount(id)
- end
- function pullItem(id,count)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement