Sometimes it's incredibly better to buy an item instead of crafting it (e.g., because of the price of sunstone lump, it's 10 times more convienient to buy Opal Orbs instead of following the complete crafting tree).
Add a choice mechanism to the recipe recursive algorithm so that it removes a branch if crafting costs more than buying. Maybe add a visual indication of the fact?
Sometimes it's incredibly better to buy an item instead of crafting it (e.g., because of the price of sunstone lump, it's 10 times more convienient to buy Opal Orbs instead of following the complete crafting tree).
Add a choice mechanism to the recipe recursive algorithm so that it removes a branch if crafting costs more than buying. Maybe add a visual indication of the fact?