Page 1 of 1

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

Posted: Sat Mar 09, 2019 10:54 am
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 2384 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 2384 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

Re: [0.17.9] technology.icons uses shift incorrectly

Posted: Thu Apr 04, 2019 1:57 pm
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

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

Posted: Wed May 15, 2019 1:15 pm
by posila
Thanks for the report.
Fixed for 0.17.40
Fixes also 67458