Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -- definition
- local function unload(_bKeepOneFuelStack)
- print("Unloading items...")
- for n = 1, 16 do
- local nCount = turtle.getItemCount(n)
- if nCount > 0 then
- turtle.select(n)
- local bDrop = true
- if _bKeepOneFuelStack and turtle.refuel(0) then
- bDrop = false
- _bKeepOneFuelStack = false
- end
- if bDrop then
- turtle.drop()
- unloaded = unloaded + nCount
- end
- end
- end
- collected = 0
- turtle.select(1)
- end
- -- export
- return { unload = unload }
Advertisement
Add Comment
Please, Sign In to add comment