From 03f8884093816f94f80df93786102a48d9411d7b Mon Sep 17 00:00:00 2001 From: Brevven Date: Sat, 14 Jan 2023 16:34:34 -0800 Subject: [PATCH] recipe updates --- prototypes/cpu.lua | 6 +-- prototypes/electronic-circuit-final.lua | 20 ++++++++ prototypes/gold.lua | 4 +- prototypes/palladium.lua | 4 +- prototypes/platinum.lua | 4 +- prototypes/recipe-updates.lua | 24 ++++++++++ prototypes/rich-copper.lua | 63 +++++++++++++++++++------ prototypes/silver.lua | 55 +++++++++++++++------ 8 files changed, 143 insertions(+), 37 deletions(-) create mode 100644 prototypes/electronic-circuit-final.lua diff --git a/prototypes/cpu.lua b/prototypes/cpu.lua index 1c6abc5..d1509d3 100644 --- a/prototypes/cpu.lua +++ b/prototypes/cpu.lua @@ -2,7 +2,7 @@ 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} +local spreader = data.raw.item["cuw"] and {"cuw", 2} or {"copper-plate", 2} data:extend({ { type = "item", @@ -22,13 +22,13 @@ data:extend({ energy_required = 50, ingredients = { silicon, + spreader, {"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}) +util.replace_ingredient("cpu", "electronic-circuit", "pcb", 10, false, {"force", true}) end diff --git a/prototypes/electronic-circuit-final.lua b/prototypes/electronic-circuit-final.lua new file mode 100644 index 0000000..ecdc154 --- /dev/null +++ b/prototypes/electronic-circuit-final.lua @@ -0,0 +1,20 @@ +local futil = require("util"); +local util = require("data-util"); + +local ec = futil.table.deepcopy(data.raw.recipe["electronic-circuit"]) +ec.name = "electronic-circuit-silver" +data:extend({ec}) +util.replace_ingredient("electronic-circuit-silver", "copper-cable", "silver-wire") +util.set_icons("electronic-circuit-silver", { + { + icon = "__base__/graphics/icons/electronic-circuit.png", + icon_size = 64, icon_mipmaps = 4 + }, + { + icon = "__bzgold__/graphics/icons/silver-wire.png", + icon_size = 64, icon_mipmaps = 4, scale = 0.25, shift = {8,8} + }, +}) +if util.check_unlock("electronics", "electronic-circuit") then + util.add_unlock("electronics", "electronic-circuit-silver") +end diff --git a/prototypes/gold.lua b/prototypes/gold.lua index 77916f4..6052c4c 100644 --- a/prototypes/gold.lua +++ b/prototypes/gold.lua @@ -25,8 +25,8 @@ data:extend({ name = "gold-processing", icons = { { - icon = "__bzgold__/graphics/icons/gold-ingot.png", - icon_size = 128, + icon = "__bzgold__/graphics/technology/gold-processing.png", + icon_size = 256, }, }, effects = { diff --git a/prototypes/palladium.lua b/prototypes/palladium.lua index 4aa23ca..b44af68 100644 --- a/prototypes/palladium.lua +++ b/prototypes/palladium.lua @@ -36,8 +36,8 @@ data:extend({ name = "palladium-processing", icons = { { - icon = "__bzgold__/graphics/icons/palladium-ingot.png", - icon_size = 128, + icon = "__bzgold__/graphics/technology/palladium-processing.png", + icon_size = 256, }, }, effects = { diff --git a/prototypes/platinum.lua b/prototypes/platinum.lua index ac8fd18..47626bc 100644 --- a/prototypes/platinum.lua +++ b/prototypes/platinum.lua @@ -36,8 +36,8 @@ data:extend({ name = "platinum-processing", icons = { { - icon = "__bzgold__/graphics/icons/platinum-ingot.png", - icon_size = 128, + icon = "__bzgold__/graphics/technology/platinum-processing.png", + icon_size = 256, }, }, effects = { diff --git a/prototypes/recipe-updates.lua b/prototypes/recipe-updates.lua index c4c63c8..b8b9051 100644 --- a/prototypes/recipe-updates.lua +++ b/prototypes/recipe-updates.lua @@ -8,3 +8,27 @@ else util.add_ingredient("steam-turbine", "titanium-palladium-flange", 10) util.add_ingredient("rocket-silo", "titanium-palladium-flange", 100) end + +util.add_ingredient("rocket-control-unit", "temperature-sensor", 1) +if not mods["aai-industry"] then + util.add_ingredient("electric-furnace", "temperature-sensor", 1) +else + util.add_ingredient("industrial-furnace", "temperature-sensor", 2) +end + +util.add_ingredient("speed-module-3", "mlcc", 5) +util.add_ingredient("effectivity-module-3", "mlcc", 5) +util.add_ingredient("productivity-module-3", "mlcc", 5) +util.remove_ingredient("speed-module-3", "cermet") +util.remove_ingredient("effectivity-module-3", "cermet") +util.remove_ingredient("productivity-module-3", "cermet") + +util.replace_ingredient("chemical-plant", "solder", "silver-brazing-alloy") +util.add_ingredient("chemical-plant", "silver-brazing-alloy", 5) +util.add_ingredient("chemical-plant", "silver-plate", 5) +util.replace_ingredient("oil-refinery", "solder", "silver-brazing-alloy") +util.add_ingredient("oil-refinery", "silver-brazing-alloy", 5) + +util.multiply_recipe("solar-cell", 2) +util.replace_ingredient("solar-cell", "lead-plate", "silver-plate", 1) +util.add_ingredient("solar-cell", "silver-plate", 1) diff --git a/prototypes/rich-copper.lua b/prototypes/rich-copper.lua index b7a76b0..0f6e598 100644 --- a/prototypes/rich-copper.lua +++ b/prototypes/rich-copper.lua @@ -5,8 +5,48 @@ local util = require("data-util"); if util.me.platinum() or util.me.palladium() then -local base_density = mods.bzaluminum and 3 or 4 - +local results = {} +if util.me.silver() and util.me.platinum() and util.me.palladium() then + results = { + {type="item", name="copper-plate", amount=1}, + {type="item", name="silver-ore", amount=1, probability=0.5}, + {type="item", name="platinum-powder", amount=1, probability=0.25}, + {type="item", name="palladium-powder", amount=1, probability=0.25}, + } +elseif util.me.silver() and util.me.platinum() then + results = { + {type="item", name="copper-plate", amount=1}, + {type="item", name="silver-ore", amount=1, probability=0.67}, + {type="item", name="platinum-powder", amount=1, probability=0.33}, + } +elseif util.me.silver() and util.me.palladium() then + results = { + {type="item", name="copper-plate", amount=1}, + {type="item", name="silver-ore", amount=1, probability=0.67}, + {type="item", name="palladium-powder", amount=1, probability=0.33}, + } +elseif util.me.platinum() and util.me.palladium() then + results = { + {type="item", name="copper-plate", amount=1}, + {type="item", name="platinum-powder", amount=1, probability=0.5}, + {type="item", name="palladium-powder", amount=1, probability=0.5}, + } +elseif util.me.platinum() then + results = { + {type="item", name="copper-plate", amount=2, probability = 0.75}, + {type="item", name="platinum-powder", amount=1, probability=0.5}, + } +elseif util.me.palladium() then + results = { + {type="item", name="copper-plate", amount=2, probability = 0.75}, + {type="item", name="palladium-powder", amount=1, probability=0.5}, + } +else -- should never happen + results = { + {type="item", name="copper-plate", amount=2}, + } +end + if data.raw.resource["copper-ore"] then if mods["space-exploration"] then @@ -20,7 +60,7 @@ if data.raw.resource["copper-ore"] then data.raw.resource["copper-ore"].autoplace = resource_autoplace.resource_autoplace_settings{ name = "copper-ore", order = "b", - base_density = base_density, + base_density = mods.bzaluminum and 3 or 4, has_starting_area_placement = true, regular_rq_factor_multiplier = 1.1, starting_rq_factor_multiplier = 1.1, @@ -63,7 +103,7 @@ data:extend({ name = "rich-copper-ore", autoplace_control_name = "copper-ore", order = "b-z", - base_density = base_density, + base_density = 4, base_spots_per_km2 = 1, has_starting_area_placement = true, -- TODO CHANGE THIS regular_rq_factor_multiplier = 1, @@ -120,18 +160,13 @@ data:extend({ enabled = false, icons = { {icon = "__base__/graphics/icons/copper-plate.png", icon_size = 64, icon_mipmaps=4}, - {icon = "__bzgold__/graphics/icons/silver-ore.png", icon_size = 128, scale=0.25, shift = {8,8}}, - {icon = "__bzgold__/graphics/icons/platinum-powder.png", icon_size = 64, scale=0.5, shift = {8,-8}}, - {icon = "__bzgold__/graphics/icons/palladium-powder.png", icon_size = 64, scale=0.5, shift = {-8,8}}, + {icon = "__bzgold__/graphics/icons/silver-ore.png", icon_size = 128, scale=0.125, shift = {8,8}}, + {icon = "__bzgold__/graphics/icons/platinum-powder.png", icon_size = 64, scale=0.25, shift = {8,-8}}, + {icon = "__bzgold__/graphics/icons/palladium-powder.png", icon_size = 64, scale=0.25, shift = {-8,-8}}, }, energy_required = 6.4, - ingredients = {{"rich-copper-ore", 1}}, - results = { - {type="item", name="copper-plate", amount=1}, - {type="item", name="silver-ore", amount=1, probability=0.5}, - {type="item", name="platinum-powder", amount=1, probability=0.25}, - {type="item", name="palladium-powder", amount=1, probability=0.25}, - }, + ingredients = {{"rich-copper-ore", 2}}, + results = results, }, }) end diff --git a/prototypes/silver.lua b/prototypes/silver.lua index 7fbe769..3a402d2 100644 --- a/prototypes/silver.lua +++ b/prototypes/silver.lua @@ -37,7 +37,7 @@ if util.me.silver() then enabled = true, energy_required = 1.6, ingredients = {{"silver-ore", 1}}, - results = {{"silver-plate", 4}}, + results = {{"silver-plate", 1}}, }, }) @@ -59,36 +59,63 @@ if util.me.silver() then enabled = true, energy_required = 1, ingredients = {{"silver-plate", 1}}, - results = {{"silver-wire", 4}}, + results = {{"silver-wire", 3}}, }, }) + brazing = mods.BrassTacks and { + {"silver-plate", 2}, + {"zinc-plate", 1}, + {"copper-plate", 1} + } or { + {"silver-plate", 2}, + {"copper-plate", 2} + } + + data:extend({ + { + type = "item", + name = "silver-brazing-alloy", + icon = "__bzgold__/graphics/icons/silver-brazing-alloy.png", + icon_size = 128, + subgroup = "intermediate-product", + order = "b[silver-brazing-alloy]", + stack_size = util.get_stack_size(100), + }, + { + type = "recipe", + name = "silver-brazing-alloy", + category = "crafting", + order = "d[silver-brazing-alloy]", + enabled = true, + energy_required = 1, + ingredients = brazing, + results = {{"silver-brazing-alloy", 4}}, + }, + }) + + + local prereqs= mods.bzaluminum and {"copper-processing"} or {} data:extend({ { type = "technology", name = "silver-processing", icons = { { - icon = "__bzgold__/graphics/icons/silver-plate.png", - icon_size = 128, - }, - { - icon = "__bzgold__/graphics/icons/silver-wire.png", - icon_size = 64, icon_mipmaps=4, + icon = "__bzgold__/graphics/technology/silver-processing.png", + icon_size = 256, }, }, effects = { { type = "unlock-recipe", recipe = "silver-plate" }, { type = "unlock-recipe", recipe = "silver-wire" }, + { type = "unlock-recipe", recipe = "silver-brazing-alloy" }, }, unit = { - count = 40, time = 15, - ingredients = { - {"automation-science-pack", 1}, - {"logistic-science-pack", 1} - }, + count = 10, time = 15, + ingredients = { {"automation-science-pack", 1}, }, }, - prerequisites = {"advanced-material-processing"}, + prerequisites = prereqs, order = "b-b", }, })