Closed hocha113 closed 1 month ago
The current public implementation of the recursion crafting logic calls RecipeLoader.OnCraft()
during the simulations in order to catch items "dropped" by crafting recipes. This, however, leads to what you've observed where any OnCraft logic ends up running just from opening the UI. It has since been changed to use a separate opt-in system for "recipe craft drops" and only calling OnCraft during the actual crafts.
The current public implementation of the recursion crafting logic calls
RecipeLoader.OnCraft()
during the simulations in order to catch items "dropped" by crafting recipes. This, however, leads to what you've observed where any OnCraft logic ends up running just from opening the UI. It has since been changed to use a separate opt-in system for "recipe craft drops" and only calling OnCraft during the actual crafts.
Okay, great fix! Additionally, I submitted a pull request for a localization translation. If you don't have a better Chinese translation for now, you can take a look at this submission
If the value of
MagicStorageConfig.RecipeRecursionDepth
is not 0, issues may occur. For example, if it is set to 1, clicking on any item in the CraftingAccess UI will cause all crafting events to be triggered once. IfMagicStorageConfig.RecipeRecursionDepth
is -1, a callback event will be triggered once. I suspect this is related toOnCraftHooks
. Perhaps the problem lies in the lack of proper conditional checks inRecursiveRecipe.ModifyCraftingTree
?