From a82696be8d07423334a48fdd631fc67f16e1183e Mon Sep 17 00:00:00 2001 From: Brevven Date: Wed, 8 Mar 2023 02:48:29 -0800 Subject: [PATCH] bobelectronics --- prototypes/cpu.lua | 2 +- prototypes/mainboard.lua | 68 +++++++++++++++++++++++++--------------- 2 files changed, 43 insertions(+), 27 deletions(-) diff --git a/prototypes/cpu.lua b/prototypes/cpu.lua index d1509d3..5337a7d 100644 --- a/prototypes/cpu.lua +++ b/prototypes/cpu.lua @@ -17,7 +17,7 @@ data:extend({ type = "recipe", name = "cpu", category = "crafting-with-fluid", - order = "d[mainboard]", + order = "d[cpu]", enabled = false, energy_required = 50, ingredients = { diff --git a/prototypes/mainboard.lua b/prototypes/mainboard.lua index 56cf03d..1053e3c 100644 --- a/prototypes/mainboard.lua +++ b/prototypes/mainboard.lua @@ -1,30 +1,46 @@ local util = require("data-util"); -data:extend({ - { - type = "item", - name = "mainboard", - icon = "__bzgold__/graphics/icons/mainboard.png", - icon_size = 128, - subgroup = "intermediate-product", - order = "b[mainboard]", - stack_size = util.get_stack_size(200), - }, - { - type = "recipe", - name = "mainboard", - category = "crafting", - order = "d[mainboard]", - enabled = false, - energy_required = 2.5, - ingredients = {{"advanced-circuit", 10}, {"gold-ingot", 1}}, - results = {{"mainboard", 10}}, - }, -}) -if util.me.platinum() then - util.add_ingredient("mainboard", "temperature-sensor", 10, {"force", true}) -end -if util.me.palladium() then - util.add_ingredient("mainboard", "mlcc", 10, {"force", true}) +if not mods.bobelectronics then + data:extend({ + { + type = "item", + name = "mainboard", + icon = "__bzgold__/graphics/icons/mainboard.png", + icon_size = 128, + subgroup = "intermediate-product", + order = "b[mainboard]", + stack_size = util.get_stack_size(200), + }, + { + type = "recipe", + name = "mainboard", + category = "crafting", + order = "d[mainboard]", + enabled = false, + energy_required = 2.5, + ingredients = {{"advanced-circuit", 10}, {"gold-ingot", 1}}, + results = {{"mainboard", 10}}, + }, + }) + if util.me.platinum() then + util.add_ingredient("mainboard", "temperature-sensor", 10, {"force", true}) + end + if util.me.palladium() then + util.add_ingredient("mainboard", "mlcc", 10, {"force", true}) + end +else + util.remove_ingredient("superior-circuit-board", "copper-plate") + util.remove_ingredient("superior-circuit-board", "tin-plate") + util.remove_ingredient("superior-circuit-board", "fibreglass-board") + util.remove_ingredient("superior-circuit-board", "ferric-chloride-solution") + util.multiply_recipe("superior-circuit-board", 10) + util.add_ingredient("superior-circuit-board", "advanced-circuit", 10) + util.add_ingredient("superior-circuit-board", "gold-ingot", 1) + if util.me.platinum() then + util.add_ingredient("superior-circuit-board", "temperature-sensor", 10) + end + if util.me.palladium() then + util.add_ingredient("superior-circuit-board", "mlcc", 10) + end end