The logic behind the function is that you pass it an "inputs" table with an icon
field which is either a string, or a table of IconData field(s) and a tier_labels
field (which is a boolean, true/false), so for example:
inputs = {
tier_labels = true,
icon = {
{
icon = "filename.png",
icon_size = 64,
icon_mipmaps = 4,
}
}
}
reskins.lib.append_tier_labels(1, inputs)
data.raw.item["your-item-name"].icons = inputs.icon
Is one way to use it. The function doesn't return anything, just inserts the tier labels into whatever icons
table you feed it. If you don't feed it an icons table, e.g. you feed it a string, it'll convert it into the icons
format. The library can be used by anyone but the design philosophy was around how my setup functions pass IconData to each other and then everything is assigned by assign_icons
. I'd personally recommend using the assign_icons
function as doing so guarantees fully and correctly defined icons
fields.