further compatibility, icons

This commit is contained in:
Brevven 2022-01-31 02:42:26 -08:00
parent 6d800abed6
commit 141211e02b
2 changed files with 20 additions and 6 deletions

View file

@ -113,14 +113,27 @@ data:extend({
}) })
if mods.bzcarbon and util.me.founding_plates() then if util.me.founding_plates() then
data:extend({ data:extend({
{ {
type = "technology", type = "technology",
name = "advanced-founding", name = "advanced-founding",
icons = { icons = {
{icon = "__bzfoundry__/graphics/icons/technology/foundry.png", icon_size = 256}, {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 = {}, effects = {},
prerequisites = {"electric-foundry", "utility-science-pack"}, prerequisites = {"electric-foundry", "utility-science-pack"},

View file

@ -103,11 +103,12 @@ function make_recipe(recipe)
icon_size = 64, scale=0.25, icon_mipmaps = 3, shift={8, -8}}) icon_size = 64, scale=0.25, icon_mipmaps = 3, shift={8, -8}})
or (mods.bzzirconium and or (mods.bzzirconium and
{ icon = "__bzzirconium__/graphics/icons/zirconia.png", { 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 or (mods.bzaluminum and
{ icon = "__bzaluminum__/graphics/icons/alumina.png", { icon = "__bzaluminum__/graphics/icons/alumina.png",
icon_size = 128, scale=0.125, icon_mipmaps = 3, shift={8, -8}}) icon_size = 128, scale=0.125, shift={8, -8}})
or nil or { icon = "__base__/graphics/icons/stone-brick.png",
icon_size = 64, scale=0.25, icon_mipmaps = 4, shift={8, -8}}
) )
r.icons = icons r.icons = icons
locale = rusty_locale.of_recipe(data.raw.recipe[recipe.name]) locale = rusty_locale.of_recipe(data.raw.recipe[recipe.name])
@ -194,7 +195,7 @@ function get_probability(n)
return roots[n] return roots[n]
end 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 = {} local new_recipes = {}
for name, recipe in pairs(data.raw.recipe) do for name, recipe in pairs(data.raw.recipe) do
if recipe.category ~= "smelting" then goto continue end if recipe.category ~= "smelting" then goto continue end