Don't accept the same locked item result twice
This commit is contained in:
1 parent
86ad6de500
commit
41d0e721f8
1 file changed
+1
-1
@@ -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
|
||||
|
||||
Reference in new issue
Block a user