@@ -340,6 +340,16 @@ function CraftSim.RECIPE_SCAN.UI:CreateProfessionTabContent(row, content)
340
340
end
341
341
})
342
342
343
+ content .concentrationToggleCB = GGUI .Checkbox {
344
+ parent = content , anchorParent = content .cancelScanButton .frame , anchorA = " LEFT" , anchorB = " RIGHT" ,
345
+ labelOptions = { text = GUTIL :IconToText (CraftSim .CONST .CONCENTRATION_ICON , 20 , 20 ) .. " Concentration" },
346
+ tooltip = " Toggle Concentration" ,
347
+ initialValue = CraftSim .DB .OPTIONS :Get (" RECIPESCAN_ENABLE_CONCENTRATION" ),
348
+ clickCallback = function (_ , checked )
349
+ CraftSim .DB .OPTIONS :Save (" RECIPESCAN_ENABLE_CONCENTRATION" , checked )
350
+ end
351
+ }
352
+
343
353
content .resultAmount = GGUI .Text {
344
354
parent = content , anchorParent = content .scanButton .frame , anchorA = " RIGHT" , anchorB = " LEFT" ,
345
355
offsetX = - 15 , justifyOptions = { type = " H" , align = " RIGHT" }, text = " " ,
@@ -477,12 +487,16 @@ function CraftSim.RECIPE_SCAN.UI:CreateProfessionTabContent(row, content)
477
487
parent = concentrationCostColumn ,
478
488
anchorParent = concentrationCostColumn ,
479
489
anchorA = " LEFT" ,
480
- anchorB = " LEFT"
490
+ anchorB = " LEFT" ,
491
+ scale = 0.95 ,
481
492
})
482
493
483
- --- @type GGUI.Text
484
494
averageProfitColumn .text = GGUI .Text ({
485
- parent = averageProfitColumn , anchorParent = averageProfitColumn , anchorA = " LEFT" , anchorB = " LEFT"
495
+ parent = averageProfitColumn ,
496
+ anchorParent = averageProfitColumn ,
497
+ anchorA = " LEFT" ,
498
+ anchorB = " LEFT" ,
499
+ scale = 0.95 ,
486
500
})
487
501
488
502
topGearColumn .gear2Icon = GGUI .Icon ({
@@ -800,6 +814,8 @@ function CraftSim.RECIPE_SCAN.UI:AddRecipe(row, recipeData)
800
814
801
815
row .recipeData = recipeData
802
816
817
+ local enableConcentration = CraftSim .DB .OPTIONS :Get (" RECIPESCAN_ENABLE_CONCENTRATION" )
818
+
803
819
local recipeRarity = recipeData .resultData .expectedItem :GetItemQualityColor ()
804
820
805
821
local cooldownInfoText = " "
@@ -811,27 +827,39 @@ function CraftSim.RECIPE_SCAN.UI:AddRecipe(row, recipeData)
811
827
" (" .. currentCharges .. " /" .. cooldownData .maxCharges .. " )"
812
828
end
813
829
814
-
815
830
recipeColumn .text :SetText (recipeRarity .hex .. recipeData .recipeName .. " |r" .. cooldownInfoText )
816
831
817
832
learnedColumn :SetLearned (recipeData .learned )
818
833
819
- expectedResultColumn .itemIcon :SetItem (recipeData .resultData .expectedItem )
834
+ if enableConcentration then
835
+ expectedResultColumn .itemIcon :SetItem (recipeData .resultData .expectedItemConcentration )
836
+ else
837
+ expectedResultColumn .itemIcon :SetItem (recipeData .resultData .expectedItem )
838
+ end
839
+
820
840
821
- local averageProfit = recipeData :GetAverageProfit ()
822
841
local relativeTo = nil
823
842
if showProfit then
824
843
relativeTo = recipeData .priceData .craftingCosts
825
844
end
826
- averageProfitColumn .text :SetText (GUTIL :FormatMoney (averageProfit , true , relativeTo , true ))
845
+
846
+ local averageProfit = recipeData :GetAverageProfit ()
847
+ row .concentrationWeight , row .concentrationProfit = CraftSim .AVERAGEPROFIT :GetConcentrationWeight (recipeData ,
848
+ averageProfit )
849
+
850
+ if enableConcentration and row .concentrationProfit then
851
+ averageProfit = row .concentrationProfit
852
+ end
853
+
827
854
row .averageProfit = averageProfit
828
855
row .relativeProfit = GUTIL :GetPercentRelativeTo (averageProfit , recipeData .priceData .craftingCosts )
829
- row .concentrationWeight = CraftSim .AVERAGEPROFIT :GetConcentrationWeight (recipeData , averageProfit )
830
856
recipeData .resultData :Update () -- switch back
831
857
row .concentrationCost = recipeData .concentrationCost
832
858
concentrationCostColumn .text :SetText (row .concentrationCost )
833
859
concentrationValueColumn .text :SetText (GUTIL :FormatMoney (row .concentrationWeight , true ))
834
860
861
+ averageProfitColumn .text :SetText (GUTIL :FormatMoney (averageProfit , true , relativeTo , true ))
862
+
835
863
if CraftSim .DB .OPTIONS :Get (" RECIPESCAN_OPTIMIZE_PROFESSION_TOOLS" ) then
836
864
if recipeData .professionGearSet :IsEquipped () then
837
865
topGearColumn .equippedText :Show ()
0 commit comments