1.7.10 compatibility
This commit is contained in:
@@ -6,7 +6,7 @@ function Adapter.wrap(args)
|
|||||||
'chestAdapter18',
|
'chestAdapter18',
|
||||||
|
|
||||||
-- adapters for version 1.7
|
-- adapters for version 1.7
|
||||||
--'meAdapter',
|
'meAdapter',
|
||||||
'chestAdapter',
|
'chestAdapter',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -224,6 +224,18 @@ function MEAdapter:provide(item, count, slot, direction)
|
|||||||
end)
|
end)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function MEAdapter:eject(item, qty, direction)
|
||||||
|
if not _G.turtle then
|
||||||
|
error('Only a turtle can eject')
|
||||||
|
end
|
||||||
|
|
||||||
|
local s, m = pcall(function()
|
||||||
|
self:provide(item, qty)
|
||||||
|
_G.turtle.emptyInventory()
|
||||||
|
end)
|
||||||
|
return s, m
|
||||||
|
end
|
||||||
|
|
||||||
function MEAdapter:insert(slot, count)
|
function MEAdapter:insert(slot, count)
|
||||||
local s, m = pcall(function() self.pullItem(self.direction, slot, count) end)
|
local s, m = pcall(function() self.pullItem(self.direction, slot, count) end)
|
||||||
if not s and m then
|
if not s and m then
|
||||||
|
|||||||
Reference in New Issue
Block a user