Commit 6266a8a 1 parent ea49208 commit 6266a8a Copy full SHA for 6266a8a
File tree 2 files changed +5
-2
lines changed
2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ function CraftSim.CraftQueue:AddRecipe(options)
31
31
32
32
-- make sure all required reagents are maxed out
33
33
recipeData :SetNonQualityReagentsMax ()
34
- recipeData :SetCheapestQualityReagentsMax ()
34
+ recipeData :SetCheapestQualityReagentsMax (true )
35
35
36
36
local craftQueueItem = self :FindRecipe (recipeData )
37
37
Original file line number Diff line number Diff line change @@ -540,12 +540,15 @@ function CraftSim.RecipeData:HasRequiredSelectableReagent()
540
540
end
541
541
542
542
--- Consideres Order Reagents
543
- function CraftSim .RecipeData :SetCheapestQualityReagentsMax ()
543
+ --- @param nonAllocatedOnly boolean ?
544
+ function CraftSim .RecipeData :SetCheapestQualityReagentsMax (nonAllocatedOnly )
544
545
for _ , reagent in ipairs (self .reagentData .requiredReagents ) do
545
546
local isOrderReagent = reagent :IsOrderReagentIn (self )
546
547
if reagent .hasQuality then
547
548
if not isOrderReagent then
549
+ if not nonAllocatedOnly and reagent :GetTotalQuantity () < reagent .requiredQuantity then
548
550
reagent :SetCheapestQualityMax (self .subRecipeCostsEnabled )
551
+ end
549
552
elseif isOrderReagent then
550
553
for _ , reagentItem in ipairs (reagent .items ) do
551
554
if reagentItem :IsOrderReagentIn (self ) then
You can’t perform that action at this time.
0 commit comments