another science-gen fix

This commit is contained in:
Peter 2019-01-14 11:10:40 +08:00
parent 53020fe27c
commit 0e51848fcd
2 changed files with 8 additions and 6 deletions

View File

@ -159,6 +159,7 @@ if settings.startup["017-techtree"].value then
for _, tech in pairs(data.raw["technology"]) do for _, tech in pairs(data.raw["technology"]) do
if tech.effects then if tech.effects then
for i=1, #tech.effects do for i=1, #tech.effects do
if tech.effects[i].type then
if tech.effects[i].type == "unlock-recipe" then if tech.effects[i].type == "unlock-recipe" then
whitelisted = true whitelisted = true
break break
@ -166,6 +167,7 @@ if settings.startup["017-techtree"].value then
whitelisted = false whitelisted = false
end end
end end
end
if whitelisted == true then if whitelisted == true then
local valid = compare(tech, "logistics-science-pack", "science-pack-2") local valid = compare(tech, "logistics-science-pack", "science-pack-2")
if valid == false then if valid == false then

View File

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