Hi!
I'm trying to find the ingredients of items in control.lua and can't figure out how to do that. I see that the game object allows me to get prototypes for items and entities, but what about recipes? I tried querying data.raw only to find out that data is a nil value at this point.
Thanks!
How to retrieve a recipe prototype by name
Re: How to retrieve a recipe prototype by name
You can't get ingredients from the recipes for now, only this parameters are available.
Re: How to retrieve a recipe prototype by name
Thanks for the reply. I know only these properties are available on the object, my hope was that I could get the prototype somehow. Oh well...
Re: How to retrieve a recipe prototype by name
Re: How to retrieve a recipe prototype by name
I thought you could get the prototype of trees from game.entityprototypes, but it seems that's not actually a Prototype/Entity but a Lua/EntityPrototype with only a few properties.
Re: How to retrieve a recipe prototype by name
that's the problem, with recipe's ingredient is the same
Re: How to retrieve a recipe prototype by name
From my understanding a recipe is not an entity though. It's not an item either, which are the two entity functions available on the game object.