From 5edc6a0bb33d771bc646037c56466575401f1435 Mon Sep 17 00:00:00 2001 From: Brevven Date: Sun, 17 Jul 2022 05:20:56 -0700 Subject: [PATCH] fix unlocks --- prototypes/phenol.lua | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/prototypes/phenol.lua b/prototypes/phenol.lua index 0bc7305..2a2d079 100644 --- a/prototypes/phenol.lua +++ b/prototypes/phenol.lua @@ -24,13 +24,10 @@ if data.raw.item["coke"] then local cat if mods.Krastorio2 then cat = "smelting" - util.add_effect("steel-processing", {type="recipe-unlock", name="phenol"}) elseif data.raw.item["foundry"] then cat = "founding" - util.add_effect("foundry", {type="recipe-unlock", name="phenol"}) else cat = "advanced-crafting" - util.add_effect("automation", {type="recipe-unlock", name="phenol"}) end data:extend({ @@ -48,6 +45,13 @@ if data.raw.item["coke"] then }, } }) + if mods.Krastorio2 then + util.add_effect("steel-processing", {type="unlock-recipe", recipe="phenol"}) + elseif data.raw.item["foundry"] then + util.add_effect("foundry", {type="unlock-recipe", recipe="phenol"}) + else + util.add_effect("automation", {type="unlock-recipe", recipe="phenol"}) + end else data:extend({ { @@ -63,6 +67,6 @@ else }, } }) - util.add_effect("automation", {type="recipe-unlock", name="phenol"}) + util.add_effect("automation", {type="unlock-recipe", recipe="phenol"}) end end