added LDS to disable old option

This commit is contained in:
Peter 2019-01-08 13:36:47 +08:00
parent 3143e3568b
commit 1e58f0f323
2 changed files with 13 additions and 3 deletions

View File

@ -7,7 +7,6 @@ table.insert(data.raw["technology"]["advanced-electronics-2"].effects, {type = "
table.insert(data.raw["technology"]["advanced-electronics-2"].effects, {type = "unlock-recipe",recipe = "rocket-control-unit"})
table.insert(data.raw["technology"]["advanced-electronics-2"].effects, {type = "unlock-recipe",recipe = "low-density-structure"})
table.insert(data.raw["technology"]["advanced-electronics-2"].effects, {type = "unlock-recipe",recipe = "17-low-density-structure"}) --LDS unlock for pre-rocket bases
table.insert(data.raw["technology"]["advanced-material-processing-2"].effects, {type = "unlock-recipe",recipe = "rocket-fuel"})
@ -41,5 +40,16 @@ if not settings.startup["017-old-science"].value then
data.raw["recipe"]["high-tech-science-pack"].hidden = true
local effects = data.raw["technology"]["advanced-electronics-2"].effects
for _=1, #effects do if effects[_].type == "unlock-recipe" and effects[_].recipe == "high-tech-science-pack" then effects[_] = nil end end
for _=1, #effects do if effects[_].type == "unlock-recipe" and effects[_].recipe == "high-tech-science-pack" then effects[_] = nil end end
data.raw["recipe"]["low-density-structure"].normal.hidden = true
data.raw["recipe"]["low-density-structure"].expensive.hidden = true
elseif settings.startup["017-old-science"].value then
table.insert(data.raw["technology"]["advanced-electronics-2"].effects, {type = "unlock-recipe",recipe = "low-density-structure"})
data.raw["recipe"]["science-pack-3"].hidden = false
data.raw["recipe"]["military-science-pack"].hidden = false
data.raw["recipe"]["production-science-pack"].hidden = false
data.raw["recipe"]["high-tech-science-pack"].hidden = false
data.raw["recipe"]["low-density-structure"].normal.hidden = false
data.raw["recipe"]["low-density-structure"].expensive.hidden = false
end

View File

@ -1,6 +1,6 @@
{
"name": "017_science",
"version": "0.0.7",
"version": "0.0.8",
"factorio_version": "0.16",
"title": "0.17 science conversion",
"author": "npc_strider(morley376)",