:3
This commit is contained in:
parent
491112768c
commit
68ec37f994
66 changed files with 6591 additions and 10096 deletions
|
@ -116,11 +116,23 @@ end
|
|||
|
||||
function emptyInventory()
|
||||
for i = 1, 16 do
|
||||
if turtle.getItemCount(i) ~= 0 then
|
||||
local item = turtle.getItemDetail(i);
|
||||
if item then
|
||||
turtle.select(i)
|
||||
chest_items = pFront("items")
|
||||
|
||||
turtle.drop()
|
||||
local chest_items = pFront("list")
|
||||
local done = false
|
||||
for slot, citem in pairs(chest_items) do
|
||||
if citem.name == item.name and pFront("getItemLimit", slot) - citem.count >= item.count then
|
||||
turtle.dropDown()
|
||||
pFront("pullItems", "bottom", 1, 64, slot)
|
||||
done = true
|
||||
break
|
||||
end
|
||||
end
|
||||
if not done then
|
||||
turtle.drop()
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue