diff --git a/changelog.txt b/changelog.txt index b44ac83..31b6e72 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,9 @@ --------------------------------------------------------------------------------------------------- +Version: 0.5.2 +Date: 2021-03-11 + Changes: + - Enable prod modules on all recipes +--------------------------------------------------------------------------------------------------- Version: 0.5.1 Date: 2021-03-11 Changes: diff --git a/data-final-fixes.lua b/data-final-fixes.lua index 5189dc2..79bca8f 100644 --- a/data-final-fixes.lua +++ b/data-final-fixes.lua @@ -1 +1,2 @@ require("deadlock-stacking") +require("modules") diff --git a/info.json b/info.json index fa78f00..e8eda18 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "bzsilicon", - "version": "0.5.1", + "version": "0.5.2", "factorio_version": "1.1", "title": "Silica & Silicon", "author": "Brevven", diff --git a/modules.lua b/modules.lua new file mode 100644 index 0000000..a5b342e --- /dev/null +++ b/modules.lua @@ -0,0 +1,25 @@ +local util = require("__bzsilicon__.util"); + +recipes = {"silica", "silicon"} +if util.more_intermediates() then + table.insert(recipes, "silicon-wafer") + table.insert(recipes, "solar-cell") +end + +if mods["space-exploration"] then + table.insert(recipes, "silicon-smelting-vulcanite") +end + +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