Add Recipe:addCategory
This commit is contained in:
parent
a6f495af8b
commit
6de1a8f1c7
1 changed files with 11 additions and 0 deletions
|
|
@ -187,6 +187,17 @@ function Recipe:removeResult(resultName)
|
||||||
return self
|
return self
|
||||||
end
|
end
|
||||||
|
|
||||||
|
--- Adds an additional crafting category
|
||||||
|
--- @param categoryName string The name of the crafting category
|
||||||
|
function Recipe:addCategory(categoryName)
|
||||||
|
local categories = self.prototype.additional_categories or {}
|
||||||
|
self.prototype.additional_categories = categories
|
||||||
|
if not table.contains(categories, categoryName) then
|
||||||
|
table.insert(categories, categoryName)
|
||||||
|
end
|
||||||
|
return self
|
||||||
|
end
|
||||||
|
|
||||||
--- Adds the recipe to a technology
|
--- Adds the recipe to a technology
|
||||||
--- @param technology string|table The name of the technology or the technology table
|
--- @param technology string|table The name of the technology or the technology table
|
||||||
function Recipe:unlockedByTechnology(technology)
|
function Recipe:unlockedByTechnology(technology)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue