diff --git a/tweaks/bobsmods/1_update.lua b/tweaks/bobsmods/1_update.lua index 75b2d37..d016d1d 100644 --- a/tweaks/bobsmods/1_update.lua +++ b/tweaks/bobsmods/1_update.lua @@ -6,18 +6,26 @@ if mods["bobelectronics"] or mods["boblogistics"] or mods["bobplates"] then end if mods["boblibrary"] then - if data.raw["recipe-category"]["bob-electronics"] then - sctm.set_category("sct-t2-instruments", "bob-electronics") - sctm.set_category("sct-t2-wafer-stamp", "bob-electronics") - sctm.set_category("sct-mil-circuit1", "bob-electronics") - sctm.set_category("sct-mil-circuit2", "bob-electronics") - sctm.set_category("sct-mil-circuit3", "bob-electronics") - sctm.set_category("sct-prod-bioprocessor", "bob-electronics") - end - - if data.raw["recipe-category"]["bob-electronics-with-fluid"] then - sctm.set_category("sct-prod-overclocker", "bob-electronics-with-fluid") - sctm.set_category("sct-prod-chipcase", "bob-electronics-with-fluid") + if data.raw["recipe-category"]["electronics"] then + sctm.set_category("sct-t2-instruments", "electronics") + sctm.set_category("sct-t2-wafer-stamp", "electronics") + sctm.set_category("sct-mil-circuit1", "electronics") + sctm.set_category("sct-mil-circuit2", "electronics") + sctm.set_category("sct-mil-circuit3", "electronics") + sctm.set_category("sct-prod-bioprocessor", "electronics") + + --add additional categories for handcrafting + data.raw.recipe["sct-t2-instruments"].additional_categories = {"crafting"} + data.raw.recipe["sct-t2-wafer-stamp"].additional_categories = {"crafting"} + data.raw.recipe["sct-mil-circuit1"].additional_categories = {"crafting"} + data.raw.recipe["sct-mil-circuit2"].additional_categories = {"crafting"} + data.raw.recipe["sct-mil-circuit3"].additional_categories = {"crafting"} + data.raw.recipe["sct-prod-bioprocessor"].additional_categories = {"crafting"} + end + + if data.raw["recipe-category"]["electronics-with-fluid"] then + sctm.set_category("sct-prod-overclocker", "electronics-with-fluid") + sctm.set_category("sct-prod-chipcase", "electronics-with-fluid") end end @@ -342,18 +350,29 @@ if mods["bobelectronics"] then sctm.recipe_ingredient_replace("sct-htech-injector", "copper-cable", "bob-insulated-cable") end - if data.raw["recipe-category"]["bob-electronics"] then - data.raw.recipe["sct-t1-ironcore"].category = "bob-electronics" - data.raw.recipe["sct-t1-magnet-coils"].category = "bob-electronics" - data.raw.recipe["sct-t2-microcircuits"].category = "bob-electronics" - data.raw.recipe["sct-t2-micro-wafer"].category = "bob-electronics" - data.raw.recipe["sct-t2-reaction-nodes"].category = "bob-electronics" - data.raw.recipe["sct-mil-circuit3"].category = "bob-electronics" - data.raw.recipe["sct-mil-circuit2"].category = "bob-electronics" - data.raw.recipe["sct-mil-circuit1"].category = "bob-electronics" + if data.raw["recipe-category"]["electronics"] then + data.raw.recipe["sct-t1-ironcore"].category = "electronics" + data.raw.recipe["sct-t1-magnet-coils"].category = "electronics" + data.raw.recipe["sct-t2-microcircuits"].category = "electronics" + data.raw.recipe["sct-t2-micro-wafer"].category = "electronics" + data.raw.recipe["sct-t2-reaction-nodes"].category = "electronics" + data.raw.recipe["sct-mil-circuit3"].category = "electronics" + data.raw.recipe["sct-mil-circuit2"].category = "electronics" + data.raw.recipe["sct-mil-circuit1"].category = "electronics" if data.raw.recipe["sct-logistic-memory-unit"] then - data.raw.recipe["sct-logistic-memory-unit"].category = "bob-electronics" + data.raw.recipe["sct-logistic-memory-unit"].category = "electronics" + data.raw.recipe["sct-logistic-memory-unit"].additional_categories = {"crafting"} end + + --add additional categories for handcrafting + data.raw.recipe["sct-t1-ironcore"].additional_categories = {"crafting"} + data.raw.recipe["sct-t1-magnet-coils"].additional_categories = {"crafting"} + data.raw.recipe["sct-t2-microcircuits"].additional_categories = {"crafting"} + data.raw.recipe["sct-t2-micro-wafer"].additional_categories = {"crafting"} + data.raw.recipe["sct-t2-reaction-nodes"].additional_categories = {"crafting"} + data.raw.recipe["sct-mil-circuit1"].additional_categories = {"crafting"} + data.raw.recipe["sct-mil-circuit2"].additional_categories = {"crafting"} + data.raw.recipe["sct-mil-circuit3"].additional_categories = {"crafting"} end end