Well, in this case I wanted to create “available” crafts for this certain object that will be unchangable, and in widget for example if is clicked button with assigned recipe, we creating object based on this that counts progression, marks as finish etc.
Like that:
TechTree → MultiMap
Holds for Factory 1:
->Recipe_1
->Recipe_2
->Recipe_3
for Factory 2:
->Recipe_15
->Recipe_9
for Factory 3:
->Recipe_99
Then each crafting component have it own array holding these values, if for example we invoke delegate to update and Factory_3 will invoke his function bound to this delegate, so it will hold inside Recipe_99; same scenerio for other objects that will implement crafting, so then widgets have easy access to what can be crafted by this object
That was the idea behind this way of implementation
TechTree and CraftingComponent holds information as UCraftingRecipeSingle class that can be read by rest of functionality like displaying etc