diff --git a/017_science/data-updates.lua b/017_science/data-updates.lua index 6732b7c..0070aad 100644 --- a/017_science/data-updates.lua +++ b/017_science/data-updates.lua @@ -10,6 +10,7 @@ for _, mod in pairs(data.raw.module) do table.insert(limitation, "17-chemical-science-pack") table.insert(limitation, "17-production-science-pack") table.insert(limitation, "17-utility-science-pack") + table.insert(limitation, "17-low-density-structure") end end end diff --git a/017_science/data.lua b/017_science/data.lua index e94e019..01e0c83 100644 --- a/017_science/data.lua +++ b/017_science/data.lua @@ -4,4 +4,13 @@ table.insert(data.raw["technology"]["military-2"].effects, {type = "unlock-recip table.insert(data.raw["technology"]["advanced-electronics"].effects, {type = "unlock-recipe",recipe = "17-chemical-science-pack"}) table.insert(data.raw["technology"]["advanced-material-processing-2"].effects, {type = "unlock-recipe",recipe = "17-production-science-pack"}) table.insert(data.raw["technology"]["advanced-electronics-2"].effects, {type = "unlock-recipe",recipe = "17-utility-science-pack"}) -table.insert(data.raw["technology"]["advanced-electronics-2"].effects, {type = "unlock-recipe",recipe = "low-density-structure"}) --LDS unlock for pre-rocket bases \ No newline at end of file + +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 + +local effects = data.raw["technology"]["rocket-silo"].effects --remove the duplicate LDS effect in rocket-silo research +for _=1, #effects do + if effects[_].type == "unlock-recipe" and effects[_].recipe == "low-density-structure" then + effects[_] = nil + end +end \ No newline at end of file diff --git a/017_science/graphics/icons/LDS.png b/017_science/graphics/icons/LDS.png new file mode 100644 index 0000000..3327afb Binary files /dev/null and b/017_science/graphics/icons/LDS.png differ diff --git a/017_science/info.json b/017_science/info.json index fc02c4d..75d3095 100644 --- a/017_science/info.json +++ b/017_science/info.json @@ -1,6 +1,6 @@ { "name": "017_science", - "version": "0.0.3", + "version": "0.0.4", "factorio_version": "0.16", "title": "0.17 science conversion", "author": "npc_strider(morley376)", diff --git a/017_science/migrations/2019-01-03_017_science_0.0.4.lua b/017_science/migrations/2019-01-03_017_science_0.0.4.lua new file mode 100644 index 0000000..2471261 --- /dev/null +++ b/017_science/migrations/2019-01-03_017_science_0.0.4.lua @@ -0,0 +1,14 @@ +for i, force in pairs(game.forces) do + if force.technologies["advanced-electronics-2"].researched then + force.recipes["low-density-structure"].enabled = true + force.recipes["17-low-density-structure"].enabled = true + end +end + +for i, force in pairs(game.forces) do + force.reset_recipes() +end + +for i, force in pairs(game.forces) do + force.reset_technologies() +end \ No newline at end of file diff --git a/017_science/migrations/migrations.lua b/017_science/migrations/migrations.lua index a5c0820..50b1310 100644 --- a/017_science/migrations/migrations.lua +++ b/017_science/migrations/migrations.lua @@ -18,6 +18,7 @@ for i, force in pairs(game.forces) do end if force.technologies["advanced-electronics-2"].researched then force.recipes["low-density-structure"].enabled = true + force.recipes["17-low-density-structure"].enabled = true force.recipes["17-utility-science-pack"].enabled = true end end \ No newline at end of file diff --git a/017_science/recipe.lua b/017_science/recipe.lua index e5dc7de..cd7a2c4 100644 --- a/017_science/recipe.lua +++ b/017_science/recipe.lua @@ -91,11 +91,11 @@ data:extend( --LDS changes { type = "recipe", - name = "low-density-structure", + name = "17-low-density-structure", category = "crafting", normal = { - energy_required = 30, + energy_required = 20, --30 enabled = false, ingredients = { @@ -107,7 +107,7 @@ data:extend( }, expensive = { - energy_required = 30, + energy_required = 20, --30 enabled = false, ingredients = { @@ -116,6 +116,8 @@ data:extend( {"plastic-bar", 10} }, result= "low-density-structure" - } + }, + icon = "__017_science__/graphics/icons/LDS.png", + icon_size = 32 } }) \ No newline at end of file diff --git a/017_science_migration/migrations/migrations.json b/017_science_migration/migrations/migrations.json index 60fd79c..9cc5f3a 100644 --- a/017_science_migration/migrations/migrations.json +++ b/017_science_migration/migrations/migrations.json @@ -5,5 +5,6 @@ ["17-chemical-science-pack", "chemical-science-pack"], ["17-production-science-pack", "production-science-pack"], ["17-utility-science-pack", "utility-science-pack"] + ["17-low-density-structure", "low-density-structure"] ] } \ No newline at end of file diff --git a/mod-list.json b/mod-list.json index e8c7c66..6bd0812 100644 --- a/mod-list.json +++ b/mod-list.json @@ -10,7 +10,7 @@ }, { "name": "017_science_migration", - "enabled": true + "enabled": false } ] }