Page 1 of 1

[1.1.94] Visual inconsistency when layering icons on equipment

Posted: Fri Nov 17, 2023 9:59 pm
by Soul-Burn
In my mod, I add overlays to various icons, including personal equipment.
The icons look OK when viewed on the armor equipment grid, but are completely off when hovering over the armor, which also shows the equipment grid.
Untitled.png
Untitled.png (329.3 KiB) Viewed 607 times
This is the code I have used to layer the icon:

Code: Select all

    if string.find(new_p.type, "-equipment") and new_p.sprite then
        if not new_p.sprite.layers then
            new_p.sprite.layers = { table.deepcopy(new_p.sprite) }
        end
        local layer = new_p.sprite.layers[1]
        table.insert(
                new_p.sprite.layers,
                {
                    filename = quality.icon, height = 32, width = 32, scale = 0.5,
                    shift = { -(layer.size or layer.width) / 2, (layer.size or layer.height) / 2 }
                }
        )
    end
The "quality.icon" image is 32x32.

Re: [1.1.94] Visual inconsistency when layering icons on equipment

Posted: Thu Oct 17, 2024 5:27 pm
by Rseding91
Thanks for the report. I believe this may be fixed in 2.0 however if it's not please let us know.