reload() | Reload the recipe from the prototype. |
valid :: boolean [R] | Is this object valid? |
enabled :: boolean [RW] | Can the recipe be used? |
name :: string [R] | Name of the recipe. |
category :: string [R] | Category of the recipe. |
ingredients :: array of Ingredient [R] | Ingredients for this recipe. |
products :: array of Product [R] | The results of this recipe. |
hidden :: boolean [R] | Is the recipe hidden? |
energy :: double [R] | Energy required to execute this recipe. |
order :: string [R] | Order string. |
group :: LuaGroup [R] | Group of this recipe. |
subgroup :: LuaGroup [R] | Subgroup of this recipe. |
force :: LuaForce [R] | The force that owns this recipe. |
A crafting recipe. Recipes belong to forces (see LuaForce) because some recipes are unlocked by research, and researches are per-force.
Reload the recipe from the prototype.
Is 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.
Can the recipe be used?
Name 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.
Category of the recipe.
Ingredients for this recipe.
{ {type="item", name="steel-plate", amount=8} }
{ {type="fluid", name="crude-oil", amount=10}, {type="fluid", name="water", amount=5} }
The results of this recipe.
Energy 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.
Order string. This is used to sort the crafting menu.
Group of this recipe.
Subgroup of this recipe.
The force that owns this recipe.