This commit is contained in:
Brevven 2022-06-28 03:31:07 -07:00
commit 780d3f2d3d
83 changed files with 1805 additions and 0 deletions

26
tin-recipe-modules.lua Normal file
View file

@ -0,0 +1,26 @@
-- Enable prod modules for all tin plate and ore recipes
recipes = {"tin-plate", "solder", "organotins"}
if mods["Krastorio2"] then
table.insert(recipes, "enriched-tin")
end
if mods["space-exploration"] then
table.insert(recipes, "tin-smelting-vulcanite")
if mods["Krastorio2"] then
table.insert(recipes, "enriched-tin-smelting-vulcanite")
end
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