allow productivity modules
This commit is contained in:
parent
3f1c0ada8a
commit
76a64c22db
4 changed files with 27 additions and 3 deletions
18
titanium-recipe-modules.lua
Normal file
18
titanium-recipe-modules.lua
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
|
||||
|
||||
recipes = {"titanium-plate"}
|
||||
if mods["Krastorio2"] then
|
||||
recipes = {"titanium-plate", "enriched-titanium-plate", "enriched-titanium"}
|
||||
end
|
||||
|
||||
for i, recipe in pairs(recipes) do
|
||||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue