From 3b10b55909f3edf028215b16ecd518a6cd22a2ba Mon Sep 17 00:00:00 2001 From: Brevven Date: Sun, 23 Jan 2022 03:55:29 -0800 Subject: [PATCH] update --- data-util.lua | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/data-util.lua b/data-util.lua index f1815b6..d794286 100644 --- a/data-util.lua +++ b/data-util.lua @@ -89,7 +89,12 @@ 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 - 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