update
This commit is contained in:
parent
2987ebcf7e
commit
195dc3739e
1 changed files with 6 additions and 1 deletions
|
|
@ -89,8 +89,13 @@ function util.add_effect(technology_name, effect)
|
|||
local technology = data.raw.technology[technology_name]
|
||||
if technology then
|
||||
if not technology.effects then technology.effects = {} end
|
||||
if effect and effect.type == "unlock-recipe" then
|
||||
if not data.raw.recipe[effect.recipe] then
|
||||
return
|
||||
end
|
||||
table.insert(technology.effects, effect)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
-- remove recipe unlock effect from a given technology
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue