milo: cleanup
This commit is contained in:
@@ -205,7 +205,7 @@ function Craft.craftRecipeInternal(recipe, count, storage, origItem)
|
||||
|
||||
_G._debug({'eval', recipe.result, count })
|
||||
|
||||
local maxCount = recipe.maxCount or math.floor(64 / recipe.count)
|
||||
local maxCount = math.floor((recipe.maxCount or 64) / recipe.count)
|
||||
|
||||
for key,icount in pairs(Craft.sumIngredients(recipe)) do
|
||||
local itemCount = Craft.getItemCount(origItem.ingredients, key)
|
||||
@@ -1,5 +1,5 @@
|
||||
local Config = require('config')
|
||||
local Craft = require('turtle.craft')
|
||||
local Craft = require('craft2')
|
||||
local itemDB = require('itemDB')
|
||||
local Util = require('util')
|
||||
|
||||
|
||||
@@ -287,20 +287,6 @@ function Storage:export(target, slot, count, item)
|
||||
-- If no slot and full amount is not exported, then no need to check rest of adapters
|
||||
-- ... so should not reach here
|
||||
|
||||
|
||||
--[[
|
||||
-- not found - scan all others
|
||||
for _, adapter in self:onlineAdapters() do
|
||||
if not adapter.cache or not adapter.cache[key] then
|
||||
provide(adapter)
|
||||
if count <= 0 then
|
||||
_G._debug('STORAGE: FOUND: %s - %d', key, count)
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
--]]
|
||||
|
||||
return total
|
||||
end
|
||||
|
||||
@@ -368,7 +354,7 @@ function Storage:import(source, slot, count, item)
|
||||
if count <= 0 then
|
||||
return total
|
||||
end
|
||||
if adapter.cache and adapter.cache[key] and not node.lock then
|
||||
if not node.lock and adapter.cache and adapter.cache[key] then
|
||||
insert(adapter)
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user