enable modules
This commit is contained in:
parent
49e816e4ae
commit
45e81ad814
4 changed files with 32 additions and 1 deletions
|
|
@ -1,4 +1,9 @@
|
|||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.5.2
|
||||
Date: 2021-03-11
|
||||
Changes:
|
||||
- Enable prod modules on all recipes
|
||||
---------------------------------------------------------------------------------------------------
|
||||
Version: 0.5.1
|
||||
Date: 2021-03-11
|
||||
Changes:
|
||||
|
|
|
|||
|
|
@ -1 +1,2 @@
|
|||
require("deadlock-stacking")
|
||||
require("modules")
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "bzsilicon",
|
||||
"version": "0.5.1",
|
||||
"version": "0.5.2",
|
||||
"factorio_version": "1.1",
|
||||
"title": "Silica & Silicon",
|
||||
"author": "Brevven",
|
||||
|
|
|
|||
25
modules.lua
Normal file
25
modules.lua
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
local util = require("__bzsilicon__.util");
|
||||
|
||||
recipes = {"silica", "silicon"}
|
||||
if util.more_intermediates() then
|
||||
table.insert(recipes, "silicon-wafer")
|
||||
table.insert(recipes, "solar-cell")
|
||||
end
|
||||
|
||||
if mods["space-exploration"] then
|
||||
table.insert(recipes, "silicon-smelting-vulcanite")
|
||||
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
|
||||
Loading…
Add table
Add a link
Reference in a new issue