modules
This commit is contained in:
parent
5edc6a0bb3
commit
a34e7a0b09
2 changed files with 16 additions and 1 deletions
|
@ -1,5 +1,5 @@
|
||||||
require("tin-recipe-final-stacking")
|
require("tin-recipe-final-stacking")
|
||||||
require("tin-recipe-modules")
|
require("modules")
|
||||||
-- require("tin-recipe-final-5d")
|
-- require("tin-recipe-final-5d")
|
||||||
|
|
||||||
local util = require("data-util");
|
local util = require("data-util");
|
||||||
|
|
15
modules.lua
Normal file
15
modules.lua
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
recipes = {"bakelite", "phenol"} -- formaldehyde excluded intentionally for theme
|
||||||
|
|
||||||
|
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
|
Loading…
Add table
Add a link
Reference in a new issue