This commit is contained in:
Brevven 2022-01-24 00:22:23 -08:00
parent 274de48840
commit f66669ab53

View file

@ -89,7 +89,12 @@ function util.add_effect(technology_name, effect)
local technology = data.raw.technology[technology_name] local technology = data.raw.technology[technology_name]
if technology then if technology then
if not technology.effects then technology.effects = {} end if not technology.effects then technology.effects = {} end
table.insert(technology.effects, effect) 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
end end