From ad08431a32bbfca2562215d629cb9ec5f174ca7d Mon Sep 17 00:00:00 2001 From: Brevven Date: Fri, 10 Mar 2023 02:36:47 -0800 Subject: [PATCH] enriched, pyroflux --- prototypes/enriched-gold.lua | 130 +++++++++++++++++++++++++++++ prototypes/enriched-silver.lua | 147 +++++++++++++++++++++++++++++++++ prototypes/pyroflux-gold.lua | 62 ++++++++++++++ prototypes/pyroflux-silver.lua | 84 +++++++++++++++++++ 4 files changed, 423 insertions(+) create mode 100644 prototypes/enriched-gold.lua create mode 100644 prototypes/enriched-silver.lua create mode 100644 prototypes/pyroflux-gold.lua create mode 100644 prototypes/pyroflux-silver.lua diff --git a/prototypes/enriched-gold.lua b/prototypes/enriched-gold.lua new file mode 100644 index 0000000..f3cb056 --- /dev/null +++ b/prototypes/enriched-gold.lua @@ -0,0 +1,130 @@ +local util = require("data-util"); + +if mods.Krastorio2 then + +local enrich_results = + util.me.silver() and { + {type = "item", name = "enriched-gold", amount = 5}, + {type = "item", name = "enriched-silver", amount = 1}, + {type = "fluid", name = "dirty-water", amount = 25, catalyst_amount = 25} + } or { + {type = "item", name = "enriched-gold", amount = 6}, + {type = "fluid", name = "dirty-water", amount = 25, catalyst_amount = 25} + } + +data:extend({ + { + type = "item", + name = "enriched-gold", + icon_size = 128, + icon = "__bzgold__/graphics/icons/enriched-gold.png", + -- pictures = { + -- {filename="__bzgold__/graphics/icons/enriched-gold.png", size=64, scale=0.25}, + -- {filename="__bzgold__/graphics/icons/enriched-gold-2.png", size=64, scale=0.25}, + -- {filename="__bzgold__/graphics/icons/enriched-gold-3.png", size=64, scale=0.25}, + -- {filename="__bzgold__/graphics/icons/enriched-gold-4.png", size=64, scale=0.25}, + -- }, + subgroup = "raw-material", + order = "e05-a[enriched-ores]-a1[enriched-gold]", + stack_size = util.get_stack_size(100), + }, + { + type = "recipe", + name = "enriched-gold", + main_product = "enriched-gold", + icon = "__bzgold__/graphics/icons/enriched-gold.png", + icon_size = 128, + category = "chemistry", + energy_required = 3, + enabled = false, + always_show_made_in = true, + always_show_products = true, + allow_productivity = true, + subgroup = "raw-material", + ingredients = + { + {type = "fluid", name = "chlorine", amount = 15}, + {type = "fluid", name = "water", amount = 25, catalyst_amount = 25}, + {type = "item", name = "gold-ore", amount = 9} + }, + results = enrich_results, + crafting_machine_tint = + { + primary = {r = 0.721, g = 0.525, b = 0.043, a = 0.000}, + secondary = {r = 0.200, g = 0.680, b = 0.300, a = 0.357}, + tertiary = {r = 0.690, g = 0.768, b = 0.870, a = 0.000}, + quaternary = {r = 0.0, g = 0.980, b = 0.603, a = 0.900} + }, + order = "e03[enriched-gold]" + }, + { + type = "recipe", + name = "enriched-gold-ingot", + icons = + { + { icon = "__bzgold__/graphics/icons/gold-ingot.png", icon_size = 128, icon_mipmaps = 3, }, + { icon = "__bzgold__/graphics/icons/enriched-gold.png", icon_size = 128, scale=0.125, shift= {-8, -8}}, + }, + category = "smelting", + energy_required = 8, + enabled = false, + always_show_made_in = true, + always_show_products = true, + allow_productivity = true, + ingredients = + { + {"enriched-gold", 20} + }, + result = "gold-ingot", + result_count = 10, + order = "b[gold-ingot]-b[enriched-gold-ingot]" + }, + { + type = "recipe", + name = "dirty-water-filtration-gold", + category = "fluid-filtration", + icons = + { + { + icon = data.raw.fluid["dirty-water"].icon, + icon_size = data.raw.fluid["dirty-water"].icon_size + }, + { + icon = data.raw.item["gold-ore"].icon, + icon_size = data.raw.item["gold-ore"].icon_size, + scale = 0.20 * (data.raw.fluid["dirty-water"].icon_size/data.raw.item["gold-ore"].icon_size), + shift = {0, 4} + } + }, + icon_size = data.raw.fluid["dirty-water"].icon_size, + energy_required = 2, + enabled = false, + allow_as_intermediate = false, + always_show_made_in = true, + always_show_products = true, + ingredients = + { + {type = "fluid", name = "dirty-water", amount = 100, catalyst_amount = 100}, + }, + results = + { + {type = "fluid", name = "water", amount = 90, catalyst_amount = 90}, + {type = "item", name = "stone", probability = 0.30, amount = 1}, + {type = "item", name = "gold-ore", probability = 0.05, amount = 1} + }, + crafting_machine_tint = + { + primary = {r = 0.60, g = 0.20, b = 0, a = 0.6}, + secondary = {r = 1.0, g = 0.843, b = 0.0, a = 0.9} + }, + subgroup = "raw-material", + order = "w013[dirty-water-filtration-gold]" + } +} +) +util.add_effect("kr-enriched-ores", { type = "unlock-recipe", recipe = "enriched-gold" }) +util.add_effect("kr-enriched-ores", { type = "unlock-recipe", recipe = "enriched-gold-ingot" }) +util.add_effect("kr-enriched-ores", { type = "unlock-recipe", recipe = "dirty-water-filtration-gold" }) + + +end diff --git a/prototypes/enriched-silver.lua b/prototypes/enriched-silver.lua new file mode 100644 index 0000000..4f6d6c7 --- /dev/null +++ b/prototypes/enriched-silver.lua @@ -0,0 +1,147 @@ +local util = require("data-util"); + +if mods.Krastorio2 and util.me.silver() then +data:extend({ + { + type = "item", + name = "enriched-silver", + icon_size = 128, + icon = "__bzgold__/graphics/icons/enriched-silver.png", + -- pictures = { + -- {filename="__bzgold__/graphics/icons/enriched-silver.png", size=64, scale=0.25}, + -- {filename="__bzgold__/graphics/icons/enriched-silver-2.png", size=64, scale=0.25}, + -- {filename="__bzgold__/graphics/icons/enriched-silver-3.png", size=64, scale=0.25}, + -- {filename="__bzgold__/graphics/icons/enriched-silver-4.png", size=64, scale=0.25}, + -- }, + subgroup = "raw-material", + order = "e05-a[enriched-ores]-a1[enriched-silver]", + stack_size = util.get_stack_size(100), + }, +}) + +local enrich_results = {} +if util.me.platinum() and util.me.palladium() then + enrich_results = { + {type = "item", name = "enriched-silver", amount = 5}, + {type = "item", name = "platinum-powder", amount = 1, probability=0.5}, + {type = "item", name = "palladium-powder", amount = 1, probability=0.5}, + {type = "fluid", name = "dirty-water", amount = 25, catalyst_amount = 25} + } +elseif util.me.platinum() then + enrich_results = { + {type = "item", name = "enriched-silver", amount = 5}, + {type = "item", name = "platinum-powder", amount = 1}, + {type = "fluid", name = "dirty-water", amount = 25, catalyst_amount = 25} + } +elseif util.me.palladium() then + enrich_results = { + {type = "item", name = "enriched-silver", amount = 5}, + {type = "item", name = "palladium-powder", amount = 1}, + {type = "fluid", name = "dirty-water", amount = 25, catalyst_amount = 25} + } +else + enrich_results = { + {type = "item", name = "enriched-silver", amount = 6}, + {type = "fluid", name = "dirty-water", amount = 25, catalyst_amount = 25} + } +end + +data:extend({ + { + type = "recipe", + name = "enriched-silver", + main_product = "enriched-silver", + icon = "__bzgold__/graphics/icons/enriched-silver.png", + icon_size = 128, + category = "chemistry", + energy_required = 3, + enabled = false, + always_show_made_in = true, + always_show_products = true, + allow_productivity = true, + subgroup = "raw-material", + ingredients = + { + {type = "fluid", name = "sulfuric-acid", amount = 10}, + {type = "fluid", name = "water", amount = 25, catalyst_amount = 25}, + {type = "item", name = "silver-ore", amount = 9} + }, + results = enrich_results, + crafting_machine_tint = + { + primary = {r = 0.621, g = 0.525, b = 0.743, a = 0.000}, + secondary = {r = 0.200, g = 0.680, b = 0.300, a = 0.357}, + tertiary = {r = 0.690, g = 0.768, b = 0.870, a = 0.000}, + quaternary = {r = 0.0, g = 0.980, b = 0.603, a = 0.900} + }, + order = "e03[enriched-silver]" + }, + { + type = "recipe", + name = "enriched-silver-plate", + icons = + { + { icon = "__bzgold__/graphics/icons/silver-plate.png", icon_size = 128, icon_mipmaps = 3, }, + { icon = "__bzgold__/graphics/icons/enriched-silver.png", icon_size = 128, scale=0.125, shift= {-8, -8}}, + }, + category = "smelting", + energy_required = 8, + enabled = false, + always_show_made_in = true, + always_show_products = true, + allow_productivity = true, + ingredients = + { + {"enriched-silver", 10} + }, + result = "silver-plate", + result_count = 10, + order = "b[silver-plate]-b[enriched-silver-plate]" + }, + { + type = "recipe", + name = "dirty-water-filtration-silver", + category = "fluid-filtration", + icons = + { + { + icon = data.raw.fluid["dirty-water"].icon, + icon_size = data.raw.fluid["dirty-water"].icon_size + }, + { + icon = data.raw.item["silver-ore"].icon, + icon_size = data.raw.item["silver-ore"].icon_size, + scale = 0.20 * (data.raw.fluid["dirty-water"].icon_size/data.raw.item["silver-ore"].icon_size), + shift = {0, 4} + } + }, + icon_size = data.raw.fluid["dirty-water"].icon_size, + energy_required = 2, + enabled = false, + allow_as_intermediate = false, + always_show_made_in = true, + always_show_products = true, + ingredients = + { + {type = "fluid", name = "dirty-water", amount = 100, catalyst_amount = 100}, + }, + results = + { + {type = "fluid", name = "water", amount = 90, catalyst_amount = 90}, + {type = "item", name = "stone", probability = 0.30, amount = 1}, + {type = "item", name = "silver-ore", probability = 0.05, amount = 1} + }, + crafting_machine_tint = + { + primary = {r = 0.60, g = 0.20, b = 0.7, a = 0.6}, + secondary = {r = 1.0, g = 0.843, b = 0.0, a = 0.9} + }, + subgroup = "raw-material", + order = "w013[dirty-water-filtration-silver]" + } +} +) +util.add_effect("kr-enriched-ores", { type = "unlock-recipe", recipe = "enriched-silver" }) +util.add_effect("kr-enriched-ores", { type = "unlock-recipe", recipe = "enriched-silver-plate" }) +util.add_effect("kr-enriched-ores", { type = "unlock-recipe", recipe = "dirty-water-filtration-silver" }) +end diff --git a/prototypes/pyroflux-gold.lua b/prototypes/pyroflux-gold.lua new file mode 100644 index 0000000..1c3ad6d --- /dev/null +++ b/prototypes/pyroflux-gold.lua @@ -0,0 +1,62 @@ +local util = require("data-util"); + + +if util.se6() then + data:extend({ + { + type = "fluid", + name = "molten-gold", + default_temperature = 600, + max_temperature = 600, + base_color = {r=.9, g=.8, b=.3}, + flow_color = {r=.9, g=.8, b=.3}, + icons = {{icon = "__bzgold__/graphics/icons/molten-gold.png", icon_size = 128}}, + order = "a[molten]-a", + pressure_to_speed_ratio = 0.4, + flow_to_energy_ratio = 0.59, + auto_barrel = false, + subgroup = "fluid", + }, + { + type = "recipe", + category = "smelting", + name = "molten-gold", + main_product = "molten-gold", + subgroup = "gold", + results = { + {type = "fluid", name = "molten-gold", amount = mods.Krastorio2 and 750 or 900}, + }, + energy_required = 60, + ingredients = { + {name = mods.Krastorio2 and "enriched-gold" or "gold-ore", amount = 24}, + {type = "fluid", name = "se-pyroflux", amount = 10}, + }, + enabled = false, + always_show_made_in = true, + allow_as_intermediate = false, + order = "a-a" + }, + { + type = "recipe", + name = "gold-ingot-casting", + category = "casting", + results = {{"gold-ingot", 1}}, + energy_required = 2.5, + ingredients = { + {type = "fluid", name = "molten-gold", amount = 50}, + }, + enabled = false, + always_show_made_in = true, + allow_as_intermediate = false, + }, + }) + util.add_effect("se-pyroflux-smelting", {type = "unlock-recipe", recipe= "molten-gold"}) + util.add_effect("se-pyroflux-smelting", {type = "unlock-recipe", recipe= "gold-ingot-casting"}) + if mods["Krastorio2"] then + util.set_item_subgroup("enriched-gold", "lead") + data.raw.recipe["enriched-gold-ingot"].order = "d[gold-ingot]" + se_delivery_cannon_recipes["enriched-gold"] = {name= "enriched-gold"} + else + if util.me.byproduct() then util.add_product("molten-gold", {"silver-ore", 9}) end + end +end diff --git a/prototypes/pyroflux-silver.lua b/prototypes/pyroflux-silver.lua new file mode 100644 index 0000000..4c4fc0d --- /dev/null +++ b/prototypes/pyroflux-silver.lua @@ -0,0 +1,84 @@ +local util = require("data-util"); + +if util.se6() and util.me.silver() then + data:extend({ + { + type = "item", + name = "silver-ingot", + icons = {{icon = "__bzgold__/graphics/icons/silver-ingot.png", icon_size = 128}}, + order = "b-b", + stack_size = 50, + subgroup = "silver", + }, + { + type = "fluid", + name = "molten-silver", + default_temperature = 600, + max_temperature = 600, + base_color = {r=.8, g=.80, b=.80}, + flow_color = {r=.8, g=.80, b=.80}, + icons = {{icon = "__bzgold__/graphics/icons/molten-silver.png", icon_size = 128}}, + order = "a[molten]-a", + pressure_to_speed_ratio = 0.4, + flow_to_energy_ratio = 0.59, + auto_barrel = false, + subgroup = "fluid", + }, + { + type = "recipe", + category = "smelting", + name = "molten-silver", + main_product = "molten-silver", + subgroup = "silver", + results = { + {type = "fluid", name = "molten-silver", amount = mods.Krastorio2 and 750 or 900}, + }, + energy_required = 60, + ingredients = { + {name = mods.Krastorio2 and "enriched-silver" or "silver-ore", amount = 24}, + {type = "fluid", name = "se-pyroflux", amount = 10}, + }, + enabled = false, + always_show_made_in = true, + allow_as_intermediate = false, + order = "a-a" + }, + { + type = "recipe", + name = "silver-ingot", + category = "casting", + results = {{"silver-ingot", 1}}, + energy_required = 25, + ingredients = { + {type = "fluid", name = "molten-silver", amount = 250}, + }, + enabled = false, + always_show_made_in = true, + allow_as_intermediate = false, + }, + { + type = "recipe", + category = "crafting", + name = "silver-ingot-to-plate", + + icons = { + {icon = "__bzgold__/graphics/icons/silver-plate.png", icon_size = 128, icon_mipmaps = 3}, + {icon = "__bzgold__/graphics/icons/silver-ingot.png", icon_size = 128, scale = 0.125, shift = {-8, -8}}, + }, + results = { + {name = "silver-plate", amount = 10}, + }, + energy_required = 5, + ingredients = { + {name = "silver-ingot", amount = 1} + }, + enabled = false, + always_show_made_in = true, + allow_decomposition = false, + order = "a-c-b" + }, + }) + util.add_effect("se-pyroflux-smelting", {type = "unlock-recipe", recipe= "molten-silver"}) + util.add_effect("se-pyroflux-smelting", {type = "unlock-recipe", recipe= "silver-ingot"}) + util.add_effect("se-pyroflux-smelting", {type = "unlock-recipe", recipe= "silver-ingot-to-plate"}) +end