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