From 38e83dc75474c95d98d1a805726456758f85304a Mon Sep 17 00:00:00 2001 From: Brevven Date: Wed, 4 Jan 2023 23:42:30 -0800 Subject: [PATCH] many intermediates --- prototypes/cpu.lua | 34 ++++++++++++++ prototypes/mainboard.lua | 30 +++++++++++++ prototypes/mlcc.lua | 74 +++++++++++++++++++++++++++++++ prototypes/silver.lua | 10 +++-- prototypes/tech-updates.lua | 26 +++++++++++ prototypes/temperature-sensor.lua | 61 +++++++++++++++++++++++++ 6 files changed, 232 insertions(+), 3 deletions(-) create mode 100644 prototypes/cpu.lua create mode 100644 prototypes/mainboard.lua create mode 100644 prototypes/mlcc.lua create mode 100644 prototypes/tech-updates.lua create mode 100644 prototypes/temperature-sensor.lua diff --git a/prototypes/cpu.lua b/prototypes/cpu.lua new file mode 100644 index 0000000..1c6abc5 --- /dev/null +++ b/prototypes/cpu.lua @@ -0,0 +1,34 @@ +local util = require("data-util"); + +if mods.bzsilicon then +local silicon = data.raw.item["silicon-wafer"] and {"silicon-wafer", 30} or {"silicon", 15} +local spreader = data.raw.item["cuw"] and {"cuw", 1} or {"copper-plate", 1} +data:extend({ + { + type = "item", + name = "cpu", + icon = "__base__/graphics/technology/advanced-electronics-2.png", + icon_size = 256, + subgroup = "intermediate-product", + order = "b[cpu]", + stack_size = util.get_stack_size(200), + }, + { + type = "recipe", + name = "cpu", + category = "crafting-with-fluid", + order = "d[mainboard]", + enabled = false, + energy_required = 50, + ingredients = { + silicon, + {"gold-ingot", 1}, + {"copper-plate", 1}, + {"electronic-circuit", 10}, + {type="fluid", name="sulfuric-acid", amount=50}, + }, + results = {{"cpu", 10}}, + }, +}) +util.replace_ingredient("cpu", "electronic-circuit", "pcb", 10, {"force", true}) +end diff --git a/prototypes/mainboard.lua b/prototypes/mainboard.lua new file mode 100644 index 0000000..56cf03d --- /dev/null +++ b/prototypes/mainboard.lua @@ -0,0 +1,30 @@ +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}) +end diff --git a/prototypes/mlcc.lua b/prototypes/mlcc.lua new file mode 100644 index 0000000..16a440c --- /dev/null +++ b/prototypes/mlcc.lua @@ -0,0 +1,74 @@ +local util = require("data-util"); + +if util.me.palladium() then + +local ingredients = {{"palladium-ingot", 1}, {"stone", 2}} +if mods.bzzirconium and mods.bzaluminum then + ingredients = {{"palladium-ingot", 1}, {"zirconia", 1}, {"alumina", 1}} +elseif mods.bzzirconium then + ingredients = {{"palladium-ingot", 1}, {"zirconia", 2}} +elseif mods.bzaluminum then + ingredients = {{"palladium-ingot", 1}, {"alumina", 2}} +elseif mods.bzsilicon then + ingredients = {{"palladium-ingot", 1}, {"silica", 3}} +elseif mods.Krastorio2 or mods["aai-industry"] or mods["sand-and-glass"] then + ingredients = {{"palladium-ingot", 1}, {"sand", 2}} +end + +data:extend({ + { + type = "item", + name = "mlcc", + icon = "__bzgold__/graphics/icons/mlcc.png", + icon_size = 128, + pictures = { + {filename="__bzgold__/graphics/icons/mlcc.png", size=128, scale=0.09375}, + {filename="__bzgold__/graphics/icons/mlcc-1.png", size=128, scale=0.09375}, + {filename="__bzgold__/graphics/icons/mlcc-2.png", size=128, scale=0.09375}, + {filename="__bzgold__/graphics/icons/mlcc-3.png", size=128, scale=0.09375}, + {filename="__bzgold__/graphics/icons/mlcc-4.png", size=128, scale=0.09375}, + -- {filename="__bzgold__/graphics/icons/mlcc.png", size=128, scale=0.0625}, + -- {filename="__bzgold__/graphics/icons/mlcc-1.png", size=128, scale=0.0625}, + -- {filename="__bzgold__/graphics/icons/mlcc-2.png", size=128, scale=0.0625}, + -- {filename="__bzgold__/graphics/icons/mlcc-3.png", size=128, scale=0.0625}, + -- {filename="__bzgold__/graphics/icons/mlcc-4.png", size=128, scale=0.0625}, + }, + subgroup = "intermediate-product", + order = "b[gold-ingot]", + stack_size = util.get_stack_size(100), + }, + { + type = "recipe", + name = "mlcc", + category = "crafting", + order = "d[mlcc]", + enabled = false, + energy_required = 4, + ingredients = ingredients, + results = {{"mlcc", 10}}, + }, + { + type = "technology", + name = "advanced-capacitors", + icons = { + { + icon = "__bzgold__/graphics/technology/mlcc.png", + icon_size = 256, + }, + }, + effects = { + { type = "unlock-recipe", recipe = "mlcc" }, + }, + unit = { + count = 50, time = 15, + ingredients = { + {"automation-science-pack", 1}, + {"logistic-science-pack", 1}, + {"chemical-science-pack", 1}, + }, + }, + prerequisites = {"palladium-processing"}, + order = "b-b", + }, +}) +end diff --git a/prototypes/silver.lua b/prototypes/silver.lua index 9d28ac4..7fbe769 100644 --- a/prototypes/silver.lua +++ b/prototypes/silver.lua @@ -7,6 +7,13 @@ if util.me.silver() then name = "silver-ore", icon = "__bzgold__/graphics/icons/silver-ore.png", icon_size = 128, + pictures = { + {filename="__bzgold__/graphics/icons/silver-ore.png", size=128, scale=0.125}, + {filename="__bzgold__/graphics/icons/silver-ore-1.png", size=128, scale=0.125}, + {filename="__bzgold__/graphics/icons/silver-ore-2.png", size=128, scale=0.125}, + {filename="__bzgold__/graphics/icons/silver-ore-3.png", size=128, scale=0.125}, + {filename="__bzgold__/graphics/icons/silver-ore-4.png", size=128, scale=0.125}, + }, subgroup = "raw-resource", order = "b[silver-plate]", stack_size = util.get_stack_size(200), @@ -85,7 +92,4 @@ if util.me.silver() then order = "b-b", }, }) - - util.add_prerequisite("advanced-electronics", "silver-processing") - util.add_prerequisite("solar-energy", "silver-processing") end diff --git a/prototypes/tech-updates.lua b/prototypes/tech-updates.lua new file mode 100644 index 0000000..4b147b8 --- /dev/null +++ b/prototypes/tech-updates.lua @@ -0,0 +1,26 @@ +local util = require("data-util") + +util.add_prerequisite("advanced-electronics", "silver-processing") +util.add_prerequisite("solar-energy", "silver-processing") +if mods.Krastorio2 or mods["aai-industry"] then + util.add_prerequisite("oil-processing", "silver-processing") +else + util.add_prerequisite("oil-processing", "silver-processing") +end + +util.add_prerequisite("advanced-electronics-2", "gold-processing") +util.remove_prerequisite("advanced-electronics-2", "chemical-science-pack") +util.add_prerequisite("advanced-electronics-2", "temperature-regulation") +util.add_prerequisite("advanced-electronics-2", "advanced-capacitors") +util.add_prerequisite("nuclear-power", "palladium-processing") + +if mods["aai-industry"] then + util.add_prerequisite("industrial-furnace", "temperature-regulation") +else + util.add_prerequisite("advanced-material-processing-2", "temperature-regulation") +end + +if mods.bzsilicon then + util.add_unlock("advanced-electronics-2", "cpu") +end +util.add_unlock("advanced-electronics-2", "mainboard") diff --git a/prototypes/temperature-sensor.lua b/prototypes/temperature-sensor.lua new file mode 100644 index 0000000..ab0963f --- /dev/null +++ b/prototypes/temperature-sensor.lua @@ -0,0 +1,61 @@ +local util = require("data-util"); + +if util.me.platinum() then + +local base = "stone" +if mods.bzzirconium then + base = "zirconia" +elseif mods.bzaluminum then + base = "alumina" +elseif mods.bzsilicon then + base = "silica" +elseif mods.Krastorio2 or mods["aai-industry"] or mods["sand-and-glass"] then + base = "glass" +end + + +data:extend({ + { + type = "item", + name = "temperature-sensor", + icon = "__bzgold__/graphics/icons/temperature-sensor.png", + icon_size = 128, + subgroup = "intermediate-product", + order = "b[gold-ingot]", + stack_size = util.get_stack_size(100), + }, + { + type = "recipe", + name = "temperature-sensor", + category = "crafting", + order = "d[temperature-sensor]", + enabled = false, + energy_required = 4, + ingredients = {{"platinum-ingot", 1}, {base, 2}}, + results = {{"temperature-sensor", 10}}, + }, + { + type = "technology", + name = "temperature-regulation", + icons = { + { + icon = "__bzgold__/graphics/technology/temperature-sensor.png", + icon_size = 256, + }, + }, + effects = { + { type = "unlock-recipe", recipe = "temperature-sensor" }, + }, + unit = { + count = 50, time = 15, + ingredients = { + {"automation-science-pack", 1}, + {"logistic-science-pack", 1}, + {"chemical-science-pack", 1}, + }, + }, + prerequisites = {"platinum-processing"}, + order = "b-b", + }, +}) +end