Bug: incorrect profit calculation when pressing "Use Best Quality Reagents"
kylejrp opened this issue ยท 5 comments
This bug has been occurring where the profit calculation doesn't update when checking "Use Best Quality Reagents" and ends up showing a stale profit despite having new materials assigned.
Steps to reproduce:
- Open up a material to craft
- View the CraftSim Average Profit (104g 20s 43c)
- Press "Use Best Quality Reagents"
- Compare the CraftSim Average Profit
Expected:
CraftSim Average Profit should immediately update (-120g 27s 93c)
Actual:
CraftSim Average Profit is stuck on the old value (104g 20s 43c).
- Now that the profit is out of sync, uncheck "Use Best Quality Reagents"
- Compare the CraftSim Average Profit
Expected:
CraftSim Average Profit should be the same as when we first saw it in step 2 (104g 20s 43c)
Actual:
CraftSim Average Profit shows the old value that should have shown in step 4 (-120g 27s 93c)
Workaround:
Reassigning any of the reagent qualities by clicking on a reagent then pressing accept will properly recalculate the CraftSim Average Profit. It will however break again if you repeat the reproduction steps again.
I just tried to reproduce it but it actually updates fine!
Please also check the behavior in the latest version and tell me if this still occurs
Will do! Some other factors that might be impacting it would be that sometimes I use TSM as a price source with a long-running price string, so it's possible that there's a race condition there? I'll see if I an reproduce after the maintenance today though.
Hm so I could reproduce it when fresh logging in but it seems to go away after clicking to other recipes and coming back huh
@derfloh205 Oh yeah, if you have "Use Best Quality Reagents" already selected when you're switching between recipes, it works fine. It's only when you toggle it on or off that it breaks. I can still reproduce it after switching recipes and toggling "Use Best Quality Reagents" for a recipe where that changes the reagent qualities.