Update to 2.0
This commit is contained in:
parent
126c1bf6b3
commit
06281ea9ca
14 changed files with 196 additions and 341 deletions
13
modules.lua
13
modules.lua
|
@ -1,16 +1,7 @@
|
|||
-- Enable prod modules for some recipes
|
||||
local util = require("data-util")
|
||||
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
|
||||
data.raw.recipe[recipe].allow_productivity = true
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue