Add Technology:addEffect
This commit is contained in:
parent
b9b7b515cc
commit
22c5f9ddc7
3 changed files with 31 additions and 20 deletions
|
@ -1,10 +1,15 @@
|
|||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.0.3
|
||||
Date: 02.02.2025
|
||||
Changes:
|
||||
- Prevent duplicate entries when adding a recipe to a technology
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.0.2
|
||||
Date: 07.01.2025
|
||||
Changes:
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.0.4
|
||||
Date: 13.02.2025
|
||||
Changes:
|
||||
- Add Technology:addEffect
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.0.3
|
||||
Date: 02.02.2025
|
||||
Changes:
|
||||
- Prevent duplicate entries when adding a recipe to a technology
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.0.2
|
||||
Date: 07.01.2025
|
||||
Changes:
|
||||
- Add Technology class
|
|
@ -140,6 +140,12 @@ function Technology:addRecipe(recipeName)
|
|||
table.insert(self.prototype.effects, { type = "unlock-recipe", recipe = recipeName })
|
||||
end
|
||||
|
||||
--- Adds an effect to the technology
|
||||
--- @param effect table The effect to add
|
||||
function Technology:addEffect(effect)
|
||||
table.insert(self.prototype.effects, effect)
|
||||
end
|
||||
|
||||
--- Removes a recipe unlock from the technology
|
||||
--- @param recipeName string The name of the recipe to remove
|
||||
function Technology:removeRecipe(recipeName)
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
{
|
||||
"name": "cf-lib",
|
||||
"version": "0.0.3",
|
||||
"title": "cackling fiends library",
|
||||
"description": "Because I'd like to have my own library :-)",
|
||||
"author": "cackling fiend",
|
||||
"homepage": "",
|
||||
"factorio_version": "2.0",
|
||||
"dependencies": [
|
||||
"base"
|
||||
]
|
||||
{
|
||||
"name": "cf-lib",
|
||||
"version": "0.0.4",
|
||||
"title": "cackling fiends library",
|
||||
"description": "Because I'd like to have my own library :-)",
|
||||
"author": "cackling fiend",
|
||||
"homepage": "",
|
||||
"factorio_version": "2.0",
|
||||
"dependencies": [
|
||||
"base"
|
||||
]
|
||||
}
|
Loading…
Add table
Reference in a new issue