A crafting recipe. Recipes belong to forces (see LuaForce) because some recipes are unlocked by research, and researches are per-force.
stringunknownfalseName of the recipe. This can be different than the name of the result items as there could be more recipes to make the same item.
LocalisedStringunknownfalseLocalised name of the recipe.
LocalisedStringunknownfalseLuaRecipePrototypeunknownfalseThe prototype for this recipe.
booleanbooleanfalseCan the recipe be used?
stringunknownfalseCategory of the recipe.
Array<string>unknownfalseAdditional categories of this recipe.
Array<Ingredient>unknownfalseThe ingredients to this recipe.
Array<Product>unknownfalseThe results/products of this recipe.
booleanunknownfalseIs the recipe hidden? Hidden recipes don't show up in the crafting menu.
booleanbooleanfalseIs the recipe hidden from flow statistics?
doubleunknownfalseEnergy required to execute this recipe. This directly affects the crafting time: Recipe's energy is exactly its crafting time in seconds, when crafted in an assembling machine with crafting speed exactly equal to one.
stringunknownfalseThe string used to alphabetically sort these prototypes. It is a simple string that has no additional semantic meaning.
LuaGroupunknownfalseGroup of this recipe.
LuaGroupunknownfalseSubgroup of this recipe.
LuaForceunknownfalseThe force that owns this recipe.
floatfloatfalseThe productivity bonus for this recipe.
booleanunknownfalseIs this object valid? This Lua object holds a reference to an object within the game engine. It is possible that the game-engine object is removed whilst a mod still holds the corresponding Lua object. If that happens, the object becomes invalid, i.e. this attribute will be false. Mods are advised to check for object validity if any change to the game state might have occurred between the creation of the Lua object and its access.
stringunknownfalseThe class name of this object. Available even when valid is false. For LuaStruct objects it may also be suffixed with a dotted path to a member of the struct.
LuaRecipe.reload()
recipe.reload()
takes_table: falsetable_optional: falseReload the recipe from the prototype.
LuaRecipe.has_category(category: RecipeCategoryID) -> boolean
recipe.has_category(category)
takes_table: falsetable_optional: falseChecks if recipe has given category
category: RecipeCategoryIDboolean — true if recipe has this category.