From 8def50f752b5a0a3cc32c46e72a7ac6daadcfee1 Mon Sep 17 00:00:00 2001 From: Brevven Date: Mon, 6 Mar 2023 02:00:58 -0800 Subject: [PATCH] k2 rare metals --- prototypes/palladium.lua | 1 - prototypes/platinum.lua | 1 - prototypes/rich-copper.lua | 58 ++++++++++++++++++++++++-------------- 3 files changed, 37 insertions(+), 23 deletions(-) diff --git a/prototypes/palladium.lua b/prototypes/palladium.lua index 56e646f..81269a2 100644 --- a/prototypes/palladium.lua +++ b/prototypes/palladium.lua @@ -48,7 +48,6 @@ data:extend({ }, effects = { { type = "unlock-recipe", recipe = "palladium-ingot" }, - { type = "unlock-recipe", recipe = "rich-copper" }, }, unit = { count = 50, time = 30, diff --git a/prototypes/platinum.lua b/prototypes/platinum.lua index 9400255..da973f6 100644 --- a/prototypes/platinum.lua +++ b/prototypes/platinum.lua @@ -48,7 +48,6 @@ data:extend({ }, effects = { { type = "unlock-recipe", recipe = "platinum-ingot" }, - { type = "unlock-recipe", recipe = "rich-copper" }, }, unit = { count = 50, time = 30, diff --git a/prototypes/rich-copper.lua b/prototypes/rich-copper.lua index c692b59..4e22ec9 100644 --- a/prototypes/rich-copper.lua +++ b/prototypes/rich-copper.lua @@ -4,6 +4,21 @@ local noise = require('noise'); local util = require("data-util"); if util.me.platinum() or util.me.palladium() then +if mods.Krastorio2 then + util.multiply_recipe("rare-metals", 2) + util.multiply_recipe("rare-metals-2", 2) + + util.set_main_product("rare-metals", "rare-metals") + util.set_main_product("rare-metals-2", "rare-metals") + + if util.me.platinum() and util.me.palladium() then + util.replace_some_product("rare-metals", "rare-metals", 2, "platinum-powder", 2, {force=true}) + util.replace_some_product("rare-metals", "rare-metals", 2, "palladium-powder", 2, {force=true}) + util.replace_some_product("rare-metals-2", "rare-metals", 3, "platinum-powder", 3, {force=true}) + util.replace_some_product("rare-metals-2", "rare-metals", 3, "palladium-powder", 3, {force=true}) + end + +else local results = {} if util.me.silver() and util.me.platinum() and util.me.palladium() then @@ -107,7 +122,7 @@ data:extend({ order = "b-z", base_density = 4, base_spots_per_km2 = 1, - has_starting_area_placement = false, + has_starting_area_placement = true, -- TODO CHANGE THIS regular_rq_factor_multiplier = 1, starting_rq_factor_multiplier = 1, }, @@ -152,26 +167,27 @@ data:extend({ }) -if not mods.Krastorio2 then - data:extend({ - { - type = "recipe", - name = "rich-copper", - category = "smelting", - main_product = "copper-plate", - order = "d[copper-plate]", - enabled = false, - icons = { - {icon = "__base__/graphics/icons/copper-plate.png", icon_size = 64, icon_mipmaps=4}, - {icon = "__bzgold__/graphics/icons/rich-copper-ore.png", icon_size = 64, scale=0.25, 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", 2}}, - results = results, +data:extend({ + { + type = "recipe", + name = "rich-copper", + category = "smelting", + main_product = "copper-plate", + order = "d[copper-plate]", + enabled = false, + icons = { + {icon = "__base__/graphics/icons/copper-plate.png", icon_size = 64, icon_mipmaps=4}, + {icon = "__bzgold__/graphics/icons/rich-copper-ore.png", icon_size = 64, scale=0.25, 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", 2}}, + results = results, + }, +}) +util.add_unlock("platinum-processing", "rich-copper") +util.add_unlock("palladium-processing", "rich-copper") end end