From 0e51848fcdf23eb9db3fd805b0d0d3c927836f9c Mon Sep 17 00:00:00 2001 From: Peter Date: Mon, 14 Jan 2019 11:10:40 +0800 Subject: [PATCH] another science-gen fix --- 017_science/data-updates.lua | 12 +++++++----- 017_science/info.json | 2 +- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/017_science/data-updates.lua b/017_science/data-updates.lua index 5b6bd63..c4f819b 100644 --- a/017_science/data-updates.lua +++ b/017_science/data-updates.lua @@ -159,11 +159,13 @@ if settings.startup["017-techtree"].value then for _, tech in pairs(data.raw["technology"]) do if tech.effects then for i=1, #tech.effects do - if tech.effects[i].type == "unlock-recipe" then - whitelisted = true - break - else - whitelisted = false + if tech.effects[i].type then + if tech.effects[i].type == "unlock-recipe" then + whitelisted = true + break + else + whitelisted = false + end end end if whitelisted == true then diff --git a/017_science/info.json b/017_science/info.json index e5d97b4..d028587 100644 --- a/017_science/info.json +++ b/017_science/info.json @@ -1,6 +1,6 @@ { "name": "017_science", - "version": "0.0.13", + "version": "0.0.14", "factorio_version": "0.16", "title": "0.17 science conversion", "author": "npc_strider(morley376)",