Don't accept the same locked item result twice

This commit is contained in:
Buurazu authored and GitHub committed 2022-03-21 23:06:21 -04:00
1 parent 86ad6de500
commit 41d0e721f8
1 file changed
+1 -1
+1 -1
View File
@@ -465,7 +465,7 @@ function EID:calculateBagOfCrafting(componentsTable)
for k,v in ipairs(itemWeights) do
target = target - v
if target < 0 then
if firstOption then
if firstOption and k ~= firstOption then
calculatedRecipes[componentsAsString] = firstOption
lockedRecipes[componentsAsString] = k
return firstOption, k