diff --git a/cf-lib/data/Technology.lua b/cf-lib/data/Technology.lua index f30d739..bf950c8 100644 --- a/cf-lib/data/Technology.lua +++ b/cf-lib/data/Technology.lua @@ -140,6 +140,15 @@ function Technology:removeIngredient(ingredientName) return self end +--- Sets the ingredients for the technology +--- @param ingredientNames table The names of the ingredients +function Technology:setIngredients(ingredients) + self.prototype.unit = self.prototype.unit or {} + self.prototype.unit.ingredients = {} + self:addIngredients(ingredients) + return self +end + --- Adds a recipe unlock to the technology --- @param recipeName string The name of the recipe to unlock function Technology:addRecipe(recipeName)