diff --git a/cf-lib/data/Recipe.lua b/cf-lib/data/Recipe.lua index 52e453b..4bbd0f1 100644 --- a/cf-lib/data/Recipe.lua +++ b/cf-lib/data/Recipe.lua @@ -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"