From a34e7a0b091314b3851db0897812160c3056d903 Mon Sep 17 00:00:00 2001 From: Brevven Date: Sun, 17 Jul 2022 05:42:28 -0700 Subject: [PATCH] modules --- data-final-fixes.lua | 2 +- modules.lua | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 modules.lua diff --git a/data-final-fixes.lua b/data-final-fixes.lua index 6f45edf..4d17659 100644 --- a/data-final-fixes.lua +++ b/data-final-fixes.lua @@ -1,5 +1,5 @@ require("tin-recipe-final-stacking") -require("tin-recipe-modules") +require("modules") -- require("tin-recipe-final-5d") local util = require("data-util"); diff --git a/modules.lua b/modules.lua new file mode 100644 index 0000000..f942126 --- /dev/null +++ b/modules.lua @@ -0,0 +1,15 @@ +recipes = {"bakelite", "phenol"} -- formaldehyde excluded intentionally for theme + +for i, recipe in pairs(recipes) do + if data.raw.recipe[recipe] then + for j, module in pairs(data.raw.module) do + if module.effect then + for effect_name, effect in pairs(module.effect) do + if effect_name == "productivity" and effect.bonus > 0 and module.limitation and #module.limitation > 0 then + table.insert(module.limitation, recipe) + end + end + end + end + end +end