1.7 compability
This commit is contained in:
@@ -509,6 +509,15 @@ local function restock()
|
||||
end
|
||||
end
|
||||
|
||||
local function eject(item, qty)
|
||||
if _G.turtle then
|
||||
local s, m = pcall(function()
|
||||
inventoryAdapter:provide(item, qty)
|
||||
_G.turtle.emptyInventory()
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
local function jobMonitor()
|
||||
local mon = Peripheral.lookup(config.monitor)
|
||||
|
||||
@@ -1211,7 +1220,7 @@ local function learnRecipe(page)
|
||||
listingPage:refresh()
|
||||
listingPage.grid:draw()
|
||||
|
||||
inventoryAdapter:eject(recipe, recipe.count, 'front')
|
||||
eject(recipe, recipe.count)
|
||||
return true
|
||||
end
|
||||
else
|
||||
@@ -1437,15 +1446,6 @@ Event.onInterval(5, function()
|
||||
end
|
||||
end
|
||||
|
||||
local function eject(item, qty)
|
||||
if _G.turtle then
|
||||
local s, m = pcall(function()
|
||||
inventoryAdapter:provide(item, qty)
|
||||
_G.turtle.emptyInventory()
|
||||
end)
|
||||
end
|
||||
end
|
||||
|
||||
for _,key in pairs(Util.keys(demandCrafting)) do
|
||||
local item = demandCrafting[key]
|
||||
if item.crafted then
|
||||
|
||||
Reference in New Issue
Block a user