diff --git a/MDbobelectronics2/prototypes/MDrecipes.lua b/MDbobelectronics2/prototypes/MDrecipes.lua index 6ebc09e..64703c8 100644 --- a/MDbobelectronics2/prototypes/MDrecipes.lua +++ b/MDbobelectronics2/prototypes/MDrecipes.lua @@ -24,9 +24,7 @@ if mods["bzsilicon"] then bobmods.lib.recipe.add_ingredient("optical-fiber", {type="item", name="insulated-cable", amount=1}) --seems that new version of bzsilicon adds this ingredient which interfears - if data.raw.item["silicon"] then - bobmods.lib.recipe.remove_ingredient("processing-unit", "silicon") - end + bobmods.lib.recipe.remove_ingredient("processing-unit", mods["Krastorio2"] and "kr-silicon" or "silicon") end ------------------------------------------------------------------------------------------------------------------------------------------------ diff --git a/MDbobelectronics2/prototypes/recipe-updates.lua b/MDbobelectronics2/prototypes/recipe-updates.lua index ff32493..31c8983 100644 --- a/MDbobelectronics2/prototypes/recipe-updates.lua +++ b/MDbobelectronics2/prototypes/recipe-updates.lua @@ -39,10 +39,10 @@ if data.raw.item["silicon-wafer"] then bobmods.lib.recipe.add_ingredient("intergrated-electronics", {type="item", name="silicon-wafer", amount=4}) bobmods.lib.recipe.add_ingredient("processing-electronics", {type="item", name="silicon-wafer", amount=6}) else - if data.raw.item["silicon"] then - bobmods.lib.recipe.add_ingredient("BOBMD-electronic-components", {type="item", name="silicon", amount=1}) - bobmods.lib.recipe.add_ingredient("intergrated-electronics", {type="item", name="silicon", amount=2}) - bobmods.lib.recipe.add_ingredient("processing-electronics", {type="item", name="silicon", amount=3}) + if data.raw.item[mods["Krastorio2"] and "kr-silicon" or "silicon"] then + bobmods.lib.recipe.add_ingredient("BOBMD-electronic-components", {type="item", name=mods["Krastorio2"] and "kr-silicon" or "silicon", amount=1}) + bobmods.lib.recipe.add_ingredient("intergrated-electronics", {type="item", name=mods["Krastorio2"] and "kr-silicon" or "silicon", amount=2}) + bobmods.lib.recipe.add_ingredient("processing-electronics", {type="item", name=mods["Krastorio2"] and "kr-silicon" or "silicon", amount=3}) else bobmods.lib.recipe.add_ingredient("BOBMD-electronic-components", {type="item", name="copper-plate", amount=1}) bobmods.lib.recipe.add_ingredient("intergrated-electronics", {type="item", name="copper-plate", amount=2}) diff --git a/MDbobelectronics2/prototypes/resource.lua b/MDbobelectronics2/prototypes/resource.lua index 29592a5..3bdf22c 100644 --- a/MDbobelectronics2/prototypes/resource.lua +++ b/MDbobelectronics2/prototypes/resource.lua @@ -78,7 +78,7 @@ data:extend( if not data.raw.item["silicon-wafer"] then - if data.raw.item["silicon"] or data.raw.item["silicon-plate"] then + if data.raw.item["kr-silicon"] or data.raw.item["silicon"] or data.raw.item["silicon-plate"] then data:extend( { { @@ -106,7 +106,9 @@ if not data.raw.item["silicon-wafer"] then } ) - if data.raw.item["silicon"] then + if data.raw.item["kr-silicon"] then + table.insert(data.raw.recipe["silicon-wafer"].ingredients ,{type="item", name="kr-silicon", amount=1}) + elseif data.raw.item["silicon"] then table.insert(data.raw.recipe["silicon-wafer"].ingredients ,{type="item", name="silicon", amount=1}) else table.insert(data.raw.recipe["silicon-wafer"].ingredients ,{type="item", name="silicon-plate", amount=1})