I've spent some time looking over the documentation, the forum and running commands but I can't seem to work out the quality of an assembly machine's recipe.
I'm aware result_quality will tell me the expected quality of a resource being created, but it feels like .get_recipe() is missing .quality in the LuaRecipe class.
Is anyone able to provide guidance?
[2.0] LuaRecipe missing quality
Re: [2.0] LuaRecipe missing quality
`LuaEntity` defines `get_recipe()` as `get_recipe() → LuaRecipe?, LuaQualityPrototype?`, so it returns two values separately - the recipe and the quality. Something like this should be what you're looking for:
Code: Select all
local assembler = [...]
[...]
local recipe, quality = assembler.get_recipe()
Re: [2.0] LuaRecipe missing quality
Nearly 2 weeks of trying to fix this issue, and it was solely because I didn't understand lua behaviour.
I greatly appreciate your kind and well-put-together response.
I greatly appreciate your kind and well-put-together response.