1.7 compability

This commit is contained in:
kepler155c
2018-03-28 18:37:38 -04:00
parent 767efbae7d
commit 55f49a1127

View File

@@ -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