diff --git a/017_science/data-updates.lua b/017_science/data-updates.lua index c4f819b..1eabc77 100644 --- a/017_science/data-updates.lua +++ b/017_science/data-updates.lua @@ -143,6 +143,8 @@ if settings.startup["017-techtree"].value then elseif valid == false then break end + elseif valid == false then + break end end end @@ -157,25 +159,31 @@ if settings.startup["017-techtree"].value then end for _, tech in pairs(data.raw["technology"]) do - if tech.effects then - for i=1, #tech.effects do - if tech.effects[i].type then - if tech.effects[i].type == "unlock-recipe" then - whitelisted = true - break - else - whitelisted = false + if tech.name ~= ("logistics-science-pack" or "chemical-science-pack" or "production-science-pack" or "utility-science-pack") then + if tech.effects then + if #tech.effects ~= 0 then + for i=1, #tech.effects do + if tech.effects[i] then + if tech.effects[i].type then + if tech.effects[i].type == "unlock-recipe" then + whitelisted = true + break + else + whitelisted = false + end + end + end end end - end - if whitelisted == true then - local valid = compare(tech, "logistics-science-pack", "science-pack-2") - if valid == false then - local valid = compare(tech, "chemical-science-pack", "science-pack-3") end - if valid == false then - local valid = compare(tech, "production-science-pack", "production-science-pack") end - if valid == false then - local valid = compare(tech, "utility-science-pack", "high-tech-science-pack") end + if whitelisted == true then + local valid = compare(tech, "logistics-science-pack", "science-pack-2") + if valid == false then + local valid = compare(tech, "chemical-science-pack", "science-pack-3") end + if valid == false then + local valid = compare(tech, "production-science-pack", "production-science-pack") end + if valid == false then + local valid = compare(tech, "utility-science-pack", "high-tech-science-pack") end + end end end end diff --git a/017_science/info.json b/017_science/info.json index d028587..f5e72a5 100644 --- a/017_science/info.json +++ b/017_science/info.json @@ -1,6 +1,6 @@ { "name": "017_science", - "version": "0.0.14", + "version": "0.0.15", "factorio_version": "0.16", "title": "0.17 science conversion", "author": "npc_strider(morley376)",