bzgas2/modules.lua
2023-01-16 19:22:37 -08:00

15 lines
471 B
Lua

local util = require("data-util");
for i, recipe in pairs(util.me.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