Could icons be expanded to allow icon_size per given icon?
Code: Select all
icons =
{
{
icon = large-icon.png,
icon_size = 128
},
{
icon = small-icon.png,
icon_size = 32
}
}
Code: Select all
icons =
{
{
icon = large-icon.png,
icon_size = 128
},
{
icon = small-icon.png,
icon_size = 32
}
}
Code: Select all
local function generate_barrel_item_icons(fluid)
return
{
{
icon = "__boblibrary__/graphics/icons/cylinder/gas-canister.png",
},
{
icon = "__boblibrary__/graphics/icons/cylinder/cylinder-top.png",
tint = fluid.flow_color
},
{
icon = "__boblibrary__/graphics/icons/cylinder/cylinder-mid.png",
tint = fluid.base_color
}
}
end
-- Generates the icons definition for a fill-barrel recipe with the provided barrel name and fluid definition
local function generate_fill_barrel_icons(fluid)
local icon = generate_barrel_item_icons(fluid)
table.insert(icon, { icon = fluid.icon, scale = 0.5, shift = {4, -8}})
return icon
end
-- Generates the icons definition for a empty-barrel recipe with the provided barrel name and fluid definition
local function generate_empty_barrel_icons(fluid)
local icon = generate_barrel_item_icons(fluid)
table.insert(icon, {icon = fluid.icon, scale = 0.5, shift = {7, 8}})
return icon
end
Why is this not reliable?Optera wrote:That way overlays could be created without including overlay icons of all possible icon sizes, which isn't reliable to begin with,
Code: Select all
icons =
{
{
icon = large-icon.png,
icon_size = 128
},
{
icon = small-icon.png,
icon_size = 32
}
}
icon_size = ???