hopefully the last fix. added more checks

This commit is contained in:
Peter 2019-01-14 12:19:12 +08:00
parent 0e51848fcd
commit e64db2dfed
2 changed files with 26 additions and 18 deletions

View File

@ -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,8 +159,11 @@ if settings.startup["017-techtree"].value then
end
for _, tech in pairs(data.raw["technology"]) do
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
@ -168,6 +173,8 @@ if settings.startup["017-techtree"].value then
end
end
end
end
end
if whitelisted == true then
local valid = compare(tech, "logistics-science-pack", "science-pack-2")
if valid == false then
@ -180,6 +187,7 @@ if settings.startup["017-techtree"].value then
end
end
end
end
--player equipment changes
--https://forums.factorio.com/viewtopic.php?t=6059

View File

@ -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)",