diff --git a/changelog.txt b/changelog.txt index a8e15b9..0c6e134 100644 --- a/changelog.txt +++ b/changelog.txt @@ -4,6 +4,7 @@ Date: 2022-02-02 Changes: - Refractory recipes: Remove "Imersium Plate" recipe - was not meant for endgame materials. - Refractory recipes: Add "rare-metals" recipes. + - Refractory recipes: Change Space Exploration ore refractory recipes to new tech. --------------------------------------------------------------------------------------------------- Version: 0.0.10 Date: 2022-01-31 diff --git a/locale/en/foundry.cfg b/locale/en/foundry.cfg index a4fca56..d490a94 100644 --- a/locale/en/foundry.cfg +++ b/locale/en/foundry.cfg @@ -27,6 +27,7 @@ solid-fuel-from-coal=Make solid fuel from coal, a wasteful process. foundry=__ITEM__foundry__ electric-foundry=__ITEM__electric-foundry__ advanced-founding=Advanced founding +advanced-founding-space=Advanced founding of offworld materials [technology-description] foundry=Use heat for founding, coking, etc. diff --git a/prototypes/foundry.lua b/prototypes/foundry.lua index bcc9b7d..088c77b 100644 --- a/prototypes/foundry.lua +++ b/prototypes/foundry.lua @@ -114,39 +114,84 @@ data:extend({ }) if util.me.founding_plates() then -data:extend({ - { - type = "technology", - name = "advanced-founding", - icons = { - {icon = "__bzfoundry__/graphics/icons/technology/foundry.png", icon_size = 256}, - (mods.bzcarbon and - { icon = "__bzcarbon__/graphics/icons/graphite-2.png", - icon_size = 128, scale=0.5, shift={32, -32}}) - or (mods.bzsilicon and - { icon = "__bzsilicon__/graphics/icons/silica.png", - icon_size = 64, scale=1, icon_mipmaps = 3, shift={32, -32}}) - or (mods.bzzirconium and - { icon = "__bzzirconium__/graphics/icons/zirconia.png", - icon_size = 128, scale=0.5, shift={32, -32}}) - or (mods.bzaluminum and - { icon = "__bzaluminum__/graphics/icons/alumina.png", - icon_size = 128, scale=0.5, shift={32, -32}}) - or { icon = "__base__/graphics/icons/stone-brick.png", - icon_size = 64, scale=1, icon_mipmaps = 4, shift={32, -32}} - }, - effects = {}, - prerequisites = {"electric-foundry", "utility-science-pack"}, - unit = { - count = 1000, - ingredients = {{"automation-science-pack", 1}, - {"logistic-science-pack", 1}, - {"chemical-science-pack", 1}, - {"production-science-pack", 1}, - {"utility-science-pack", 1}}, - time = 60, - }, - order = "foundry", - } -}) + data:extend({ + { + type = "technology", + name = "advanced-founding", + icons = { + {icon = "__bzfoundry__/graphics/icons/technology/foundry.png", icon_size = 256}, + (mods.bzcarbon and + { icon = "__bzcarbon__/graphics/icons/graphite-2.png", + icon_size = 128, scale=0.5, shift={32, -32}}) + or (mods.bzsilicon and + { icon = "__bzsilicon__/graphics/icons/silica.png", + icon_size = 64, scale=1, icon_mipmaps = 3, shift={32, -32}}) + or (mods.bzzirconium and + { icon = "__bzzirconium__/graphics/icons/zirconia.png", + icon_size = 128, scale=0.5, shift={32, -32}}) + or (mods.bzaluminum and + { icon = "__bzaluminum__/graphics/icons/alumina.png", + icon_size = 128, scale=0.5, shift={32, -32}}) + or { icon = "__base__/graphics/icons/stone-brick.png", + icon_size = 64, scale=1, icon_mipmaps = 4, shift={32, -32}} + }, + effects = {}, + prerequisites = {"electric-foundry", "utility-science-pack"}, + unit = { + count = 1000, + ingredients = {{"automation-science-pack", 1}, + {"logistic-science-pack", 1}, + {"chemical-science-pack", 1}, + {"production-science-pack", 1}, + {"utility-science-pack", 1}}, + time = 60, + }, + order = "foundry", + } + }) + if mods["space-exploration"] then + data:extend({ + { + type = "technology", + name = "advanced-founding-space", + icons = { + {icon = "__bzfoundry__/graphics/icons/technology/foundry.png", icon_size = 256}, + (mods.bzcarbon and + { icon = "__bzcarbon__/graphics/icons/graphite-2.png", + icon_size = 128, scale=0.5, shift={32, -32}}) + or (mods.bzsilicon and + { icon = "__bzsilicon__/graphics/icons/silica.png", + icon_size = 64, scale=1, icon_mipmaps = 3, shift={32, -32}}) + or (mods.bzzirconium and + { icon = "__bzzirconium__/graphics/icons/zirconia.png", + icon_size = 128, scale=0.5, shift={32, -32}}) + or (mods.bzaluminum and + { icon = "__bzaluminum__/graphics/icons/alumina.png", + icon_size = 128, scale=0.5, shift={32, -32}}) + or { icon = "__base__/graphics/icons/stone-brick.png", + icon_size = 64, scale=1, icon_mipmaps = 4, shift={32, -32}} + }, + effects = {}, + prerequisites = { + "advanced-founding", + "se-processing-holmium", + "se-processing-iridium", + "se-processing-beryllium", + }, + unit = { + count = 1000, + ingredients = { + {"automation-science-pack", 1}, + {"logistic-science-pack", 1}, + {"chemical-science-pack", 1}, + {"production-science-pack", 1}, + {"utility-science-pack", 1}, + {"se-rocket-science-pack", 1}, + }, + time = 60, + }, + order = "foundry", + } + }) + end end diff --git a/refractory-updates.lua b/refractory-updates.lua index 2f1a5e9..4b7de4f 100644 --- a/refractory-updates.lua +++ b/refractory-updates.lua @@ -10,6 +10,14 @@ function has_suffix(s, suffix) return string.sub(s, -string.len(suffix), -1) == suffix end +function has_prefix(s, prefix) + return string.sub(s, 1, string.len(prefix)) == prefix +end + +function is_space(name) + return name:match("holmium") or name:match("beryllium") or name:match("iridium") +end + local suffixes = {"-plate", "-ingot"} function check_name(name) for i, suffix in pairs(suffixes) do @@ -211,7 +219,11 @@ if util.me.founding_plates() then data:extend(new_recipes) for i, recipe in pairs(new_recipes) do -- recipe unlock - util.add_effect("advanced-founding", {type="unlock-recipe", recipe=recipe.name}) + if is_space(recipe.name) and data.raw.technology["advanced-founding-space"] then + util.add_effect("advanced-founding-space", {type="unlock-recipe", recipe=recipe.name}) + else + util.add_effect("advanced-founding", {type="unlock-recipe", recipe=recipe.name}) + end -- prod modules for j, module in pairs(data.raw.module) do