forked from brevven/tungsten
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodules.lua
More file actions
30 lines (28 loc) · 989 Bytes
/
Copy pathmodules.lua
File metadata and controls
30 lines (28 loc) · 989 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
-- Enable prod modules for all tungsten plate and ore recipes
recipes = {"tungsten-plate", "tungsten-carbide", "rocket-engine-nozzle"}
if mods["Krastorio2"] then
table.insert(recipes, "enriched-tungsten-plate")
table.insert(recipes, "enriched-tungsten")
end
if mods["space-exploration"] then
table.insert(recipes, "tungsten-smelting-vulcanite")
if mods["Krastorio2"] then
table.insert(recipes, "enriched-tungsten-smelting-vulcanite")
end
end
if data.raw.recipe["tungsten-carbide-coal"] then
table.insert(recipes, "tungsten-carbide-coal")
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