Hello everyone, I am making a recipe system for my game but the problem is that I don’t know how to approach it.
Basically what I’m trying to do is I would have a table called “Recipe” containing other tables which are food containing ingredients, such as
Recipe = [Hamburger = {Bread, Meat, Lettuce}, --Other recipes–]
And then when the player puts ingredients in another table, it would run and check through all the recipe tables and if there’s a food table that match the ingredients table or not kinda like this
For example
{Bread, Meat} or {Bread, Meat, Meat} It would return nothing
But if it was {Bread, Meat, Lettuce} or {Lettuce, Bread, Meat} It would return hamburger
I have searched through the Devforum and found some stuff but it still didn’t get me clear.
I’m sorry if I am asking too much here, I just need a way to approach it, if you guys have any ideas or any useful tips please comment it below, Thanks in advance!