Recipe: addIngredient amount defaults to 1
This commit is contained in:
parent
be0781340a
commit
27d9dd6c68
1 changed files with 2 additions and 1 deletions
|
@ -43,8 +43,9 @@ end
|
|||
|
||||
--- Adds an ingredient to the recipe
|
||||
--- @param ingredientName string The name of the ingredient
|
||||
--- @param amount number The amount of the ingredient
|
||||
--- @param amount number The amount of the ingredient (default: 1)
|
||||
function Recipe:addIngredient(ingredientName, amount)
|
||||
amount = amount or 1
|
||||
local ingredientType = data.raw.item[ingredientName] and "item"
|
||||
or data.raw.module[ingredientName] and "item"
|
||||
or data.raw.fluid[ingredientName] and "fluid"
|
||||
|
|
Loading…
Add table
Reference in a new issue