From 1e58f0f3235491577b38ad9aaa80bff666ee8851 Mon Sep 17 00:00:00 2001 From: npc-strider Date: Tue, 8 Jan 2019 13:36:47 +0800 Subject: [PATCH] added LDS to disable old option --- 017_science/data.lua | 14 ++++++++++++-- 017_science/info.json | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/017_science/data.lua b/017_science/data.lua index d516f6d..ed5a388 100644 --- a/017_science/data.lua +++ b/017_science/data.lua @@ -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 \ No newline at end of file diff --git a/017_science/info.json b/017_science/info.json index a9da72d..4706e12 100644 --- a/017_science/info.json +++ b/017_science/info.json @@ -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)",