From 08cf09c1566af1a5637405021ac08b39043ed6cc Mon Sep 17 00:00:00 2001 From: PreLeyZero Date: Sat, 19 Mar 2022 17:37:21 +0100 Subject: [PATCH] fixed tech card removal in K2 overhal --- scripts/krastorio2/overhaul.lua | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/krastorio2/overhaul.lua b/scripts/krastorio2/overhaul.lua index 2c01b8a..702759b 100644 --- a/scripts/krastorio2/overhaul.lua +++ b/scripts/krastorio2/overhaul.lua @@ -58,10 +58,18 @@ local function remove_tech_card(tech, card) return end + --in data.raw + --[[ + ingredients = { + {'automation-science-pack',1}, + {'logistic-science-pack',1}, + } + ]] + for i,v in ipairs(data.raw.technology[tech].unit.ingredients) do for j,w in ipairs(v) do if w == card then - v = nil + data.raw.technology[tech].unit.ingredients[i] = nil end end end