So to go a bit more in depth, inIn my game, you can combine a variety of ingredients to make a product. For example, you could combine water and dirt to make mud.
What I am currently doing to achieve this is by listing each combination possibility that a particular ingredient has. The one thing iI managed to do to make it a little more efficient is that I managed to remove duplicates (So for example, if iI have coded ingredientA + IngredientB = Cheese, there isn't another entry for IngredientB + Ingredient A = Cheese).
The problem I have with my method is that it is very annoying adding new ingredients. If iI do so, I have to go back to every previous ingredient iI have coded, and add it's interaction with the ingredient(s) iI want to add.
The amount of ingredients I have means this is becoming increasingly time consuming.
Is there a better way to do this?
This is a Unity game, coded in C#. Let me know if you need any further info.