[1.1.94] Visual inconsistency when layering icons on equipment

Bugs that we were not able to reproduce, and/or are waiting for more detailed info.
Soul-Burn
Long Handed Inserter
Long Handed Inserter
Posts: 57
Joined: Sun Jan 31, 2021 9:07 pm
Contact:

[1.1.94] Visual inconsistency when layering icons on equipment

Post 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 608 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.
Rseding91
Factorio Staff
Factorio Staff
Posts: 14798
Joined: Wed Jun 11, 2014 5:23 am
Contact:

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

Post by Rseding91 »

Thanks for the report. I believe this may be fixed in 2.0 however if it's not please let us know.
If you want to get ahold of me I'm almost always on Discord.
Post Reply

Return to “Pending”