diff --git a/changelog.txt b/changelog.txt index e5c1830..5abfc30 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,16 @@ --------------------------------------------------------------------------------------------------- +Version: 0.4.5 +Date: 2022-08-18 + Fixes: + - Fix multiple prerequisite issue +--------------------------------------------------------------------------------------------------- +Version: 0.4.4 +Date: 2022-08-17 + Fixes: + - SE: Disable matter recipes at start + Changes: + - Minor tech tree tweak for nanobots +--------------------------------------------------------------------------------------------------- Version: 0.4.3 Date: 2022-08-16 Features: diff --git a/data-final-fixes.lua b/data-final-fixes.lua index b98a912..3717753 100644 --- a/data-final-fixes.lua +++ b/data-final-fixes.lua @@ -110,6 +110,8 @@ if mods["aai-industry"] then util.set_tech_recipe("steam-power", {{"automation-science-pack", 1}}) end +util.add_prerequisite("nanobots", "electronics") + if not mods.bzaluminum then util.replace_ingredients_prior_to("electronics", "electronic-circuit", "copper-cable", 2) end diff --git a/data-util.lua b/data-util.lua index 37e901a..b0fb612 100644 --- a/data-util.lua +++ b/data-util.lua @@ -89,6 +89,34 @@ function util.contains(table, sought) return false end + +-- se landfill +-- params: ore, icon_size +function util.se_landfill(params) + if mods["space-exploration"] then + if not params.icon_size then params.icon_size = 64 end + local lname="landfill-"..params.ore + data:extend({ + { + type = "recipe", + icons = { + { icon = "__base__/graphics/icons/landfill.png", icon_size = 64, icon_mipmaps = 3 }, + { icon = "__"..me.name.."__/graphics/icons/"..params.ore..".png", icon_size = params.icon_size, scale = 0.33*64/params.icon_size}, + }, + energy_required = 1, + enabled=false, + name = lname, + category = "hard-recycling", + order = "z-b-"..params.ore, + subgroup = "terrain", + result = "landfill", + ingredients = {{params.ore, 50}}, + } + }) + util.add_unlock("se-recycling-facility", lname) + end +end + -- se matter -- params: ore, energy_required, quant_out, quant_in, icon_size, stream_out function util.se_matter(params) @@ -117,6 +145,7 @@ function util.se_matter(params) icon_size = 64, scale = 0.5}, }, energy_required = params.energy_required, + enabled = false, ingredients = { {sedata, 1}, {type="fluid", name="se-particle-stream", amount=50}, @@ -136,6 +165,7 @@ function util.se_matter(params) if mods.Krastorio2 then local lname = params.ore.."-to-particle-stream" data:extend({ + enabled = false, { type = "recipe", name = lname, @@ -154,6 +184,7 @@ function util.se_matter(params) icon_size = 64, scale = 0.5}, }, energy_required = 30, + enabled = false, ingredients = { {"se-kr-matter-liberation-data", 1}, {params.ore, params.quant_in}, @@ -221,6 +252,9 @@ function util.add_prerequisite(technology_name, prerequisite) local technology = data.raw.technology[technology_name] if technology and data.raw.technology[prerequisite] then if technology.prerequisites then + for i, pre in pairs(technology.prerequisites) do + if pre == prerequisite then return end + end table.insert(technology.prerequisites, prerequisite) else technology.prerequisites = {prerequisite} diff --git a/info.json b/info.json index ed7fa9c..876e1b6 100644 --- a/info.json +++ b/info.json @@ -1,6 +1,6 @@ { "name": "bzcarbon", - "version": "0.4.3", + "version": "0.4.5", "factorio_version": "1.1", "title": "Graphite & Diamonds", "author": "Brevven",