Don't compute missing number of items for recipes
This commit is contained in:
parent
fcad8c6141
commit
e6d598a05c
@ -27,10 +27,6 @@ function prototype:canAfford(chests)
|
|||||||
for item,cost in pairs(costs) do
|
for item,cost in pairs(costs) do
|
||||||
local group = storage:findAllGroups({ item = item, total = function(checkTotal) return checkTotal >= cost end })
|
local group = storage:findAllGroups({ item = item, total = function(checkTotal) return checkTotal >= cost end })
|
||||||
if #group == 0 then
|
if #group == 0 then
|
||||||
local totalMissing = cost
|
|
||||||
if group ~= nil then
|
|
||||||
totalMissing = totalMissing - group.total
|
|
||||||
end
|
|
||||||
table.insert(missing, item)
|
table.insert(missing, item)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user