From 141211e02be68b31f541f9504b076aa5ecfb444d Mon Sep 17 00:00:00 2001 From: Brevven Date: Mon, 31 Jan 2022 02:42:26 -0800 Subject: [PATCH] further compatibility, icons --- prototypes/foundry.lua | 17 +++++++++++++++-- refractory-updates.lua | 9 +++++---- 2 files changed, 20 insertions(+), 6 deletions(-) diff --git a/prototypes/foundry.lua b/prototypes/foundry.lua index 0335971..bcc9b7d 100644 --- a/prototypes/foundry.lua +++ b/prototypes/foundry.lua @@ -113,14 +113,27 @@ data:extend({ }) -if mods.bzcarbon and util.me.founding_plates() then +if util.me.founding_plates() then data:extend({ { type = "technology", name = "advanced-founding", icons = { {icon = "__bzfoundry__/graphics/icons/technology/foundry.png", icon_size = 256}, - {icon = "__bzcarbon__/graphics/icons/graphite.png", icon_size = 128, shift={-32, -32}}, + (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"}, diff --git a/refractory-updates.lua b/refractory-updates.lua index e5f6c8c..7ab9398 100644 --- a/refractory-updates.lua +++ b/refractory-updates.lua @@ -103,11 +103,12 @@ function make_recipe(recipe) icon_size = 64, scale=0.25, icon_mipmaps = 3, shift={8, -8}}) or (mods.bzzirconium and { icon = "__bzzirconium__/graphics/icons/zirconia.png", - icon_size = 128, scale=0.125, icon_mipmaps = 3, shift={8, -8}}) + icon_size = 128, scale=0.125, shift={8, -8}}) or (mods.bzaluminum and { icon = "__bzaluminum__/graphics/icons/alumina.png", - icon_size = 128, scale=0.125, icon_mipmaps = 3, shift={8, -8}}) - or nil + icon_size = 128, scale=0.125, shift={8, -8}}) + or { icon = "__base__/graphics/icons/stone-brick.png", + icon_size = 64, scale=0.25, icon_mipmaps = 4, shift={8, -8}} ) r.icons = icons locale = rusty_locale.of_recipe(data.raw.recipe[recipe.name]) @@ -194,7 +195,7 @@ function get_probability(n) return roots[n] end -if util.me.founding_plates() and (mods.bzcarbon or mods.bzsilicon or mods.bzzirconium or mods.bzaluminum) then +if util.me.founding_plates() then local new_recipes = {} for name, recipe in pairs(data.raw.recipe) do if recipe.category ~= "smelting" then goto continue end