Closed AVeenstra closed 3 years ago
@Yousei9 This is your function, is this something you're OK with?
No, this will produce problems with incorrect icons definitions from other mods as it just blindly copies whatever crap is in icons.
The only missing property in https://wiki.factorio.com/Types/IconSpecification is icon_mipmaps. Just adding that with proper default fallback to existing tested code is way less prone to break.
Edit: scale and shift are valid too, though only listed in the examples.
I'm not sure if i should default to prototype.icon_mipmaps before defaulting to 0.
From my side this would be ready to squash and merge now.
data-util.create_icons()
did not copy all specifications from theprototype.icons
table.The bug resulted in the following icons:![before](https://user-images.githubusercontent.com/4164107/110131704-bb0d2a00-7dca-11eb-9bf3-fcaaff9d0770.png)
The new code will produce the following icons:![after](https://user-images.githubusercontent.com/4164107/110131799-d4ae7180-7dca-11eb-9786-7771f0393ae6.png)
The following mods where used for the screenshots: