[posila] [0.17.9] technology.icons uses shift incorrectly

This subforum contains all the issues which we already resolved.
Post Reply
User avatar
lovely_santa
Filter Inserter
Filter Inserter
Posts: 502
Joined: Sat Feb 18, 2017 9:41 pm
Contact:

[posila] [0.17.9] technology.icons uses shift incorrectly

Post by lovely_santa »

Hello (Kovarex?)

In a previous bug report (66868) some changes where made to the technology UI and got released in 0.17.9. While checking this out, I noticed that multilayered technology icon (so using technology.icons property) do not use the shift correctly.

The used prototype in the pictures below:

Code: Select all

{
    type = "technology",
    name = "purification-research",
    icons =
    {
      {
        icon = "__MoreScience__/graphics/technology/chemical-plant-tech.png",
        icon_size = 128,
      },
      {
        icon = "__MoreScience__/graphics/technology/water-purification-tech.png",
        icon_size = 64,
        shift = {32, 32},
      },
    },
    ... -- more prototype data
}
The shift i've used in this prototype data is showing up correctly when the prototype is selected (detailed technology UI on the left, and in the technology tree on the right, as shown in the picture below, however in the list of technologies it is showing up with a different shift. (notice the water icon shifted on the chemical plant icon)
Capture1.PNG
Capture1.PNG (2.98 MiB) Viewed 2382 times
And when another technology is selected in the UI, it even shows up wrong in the technology tree as well:
Capture2.PNG
Capture2.PNG (2.51 MiB) Viewed 2382 times

The mod used to take the screenshots can be found here on the mod portal.
The code that makes this technology can be found in the mod location prototypes/technology/science-red.lua, line 5 - 58.

Kind regards,
lovely_santa
You can find all my mods on the mod portal. Also helping on Arch666Angel's mods.
Image

User avatar
Deadlock989
Smart Inserter
Smart Inserter
Posts: 2528
Joined: Fri Nov 06, 2015 7:41 pm

Re: [0.17.9] technology.icons uses shift incorrectly

Post by Deadlock989 »

Confirmed in 0.17.24. Shift and scale work correctly for the full size technology icon, but not when it is scaled down in the tree visualisation or the available technologies list, where the shift is applied at full value instead of also being scaled.

Image Image
Image

posila
Factorio Staff
Factorio Staff
Posts: 5202
Joined: Thu Jun 11, 2015 1:35 pm
Contact:

Re: [posila] [0.17.9] technology.icons uses shift incorrectly

Post by posila »

Thanks for the report.
Fixed for 0.17.40
Fixes also 67458

Post Reply

Return to “Resolved Problems and Bugs”