Add Technology:setIngredients

This commit is contained in:
Simon Brodtmann 2025-03-28 18:54:28 +01:00
parent 620c9f48cf
commit c36fd418ab

View file

@ -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)