Don't compute missing number of items for recipes

This commit is contained in:
Gabriel Tofvesson 2025-05-15 23:45:59 +02:00
parent fcad8c6141
commit e6d598a05c

View File

@ -27,10 +27,6 @@ function prototype:canAfford(chests)
for item,cost in pairs(costs) do
local group = storage:findAllGroups({ item = item, total = function(checkTotal) return checkTotal >= cost end })
if #group == 0 then
local totalMissing = cost
if group ~= nil then
totalMissing = totalMissing - group.total
end
table.insert(missing, item)
end
end