ingredient max count fix
This commit is contained in:
@@ -156,11 +156,7 @@ end
|
||||
|
||||
function itemDB:getMaxCount(item)
|
||||
local detail = self:get(item)
|
||||
if detail then
|
||||
return detail.maxCount
|
||||
end
|
||||
|
||||
return 64
|
||||
return detail and detail.maxCount or 64
|
||||
end
|
||||
|
||||
function itemDB:load()
|
||||
|
||||
@@ -126,6 +126,7 @@ function Craft.craftRecipe(recipe, count, inventoryAdapter)
|
||||
if recipe.craftingTools and recipe.craftingTools[key] then
|
||||
need = 1
|
||||
end
|
||||
maxCount = math.min(maxCount, itemDB:getMaxCount(key))
|
||||
if itemCount < need then
|
||||
local irecipe = Craft.findRecipe(key)
|
||||
if irecipe then
|
||||
|
||||
Reference in New Issue
Block a user