canidae/factorio

Auto Research: Compatibility science tool icons in UI

LovelySanta opened this issue · 5 comments

Hi,

@dz9c92 Opened an issue (LovelySanta/FactorioMod-MoreScience#1) in my MoreScience mod about the science pack tools not showing up in your ui. This is becose in auto-research/data-final-fixes.lua#7 you only check the icon. An icon can also be made out of multiple files, so it requires the icons atribute instead. This is what my tools aka science packs are using.

Kind regards,
lovely_santa

Heya. Thanks for the report.
I can't guarantee I'll fix this anytime soon, not actively playing Factorio at the moment and development of my mods suffer a bit from this :\

I've added a fix for this in 4.2.0, although it'll just pick the first icon file (I'm not sure if it's possible to add multiple icon files the way I've done it, but I didn't spend much time researching it either). I've tested with your mod and it seems to display the icons just fine.

It is displaying the icons (without the cork on top). This was also the quick fix I gave to people asking me about it. Since multilayered icons are bugged anyway in 0.16. (Should be fixed in 0.17).

One note I'm not sure about: Don't you have to change the width and height to icon_size at auto-research/data-final-fixes.lua#L10-L11.

Kind regards,
lovely_santa

Honestly, I'm not sure about that either. I remember I had troubles displaying the icons properly (scaling them), eventually I gave up and just accepted that they were a bit cropped in the UI (as they are now). I've not bothered to look into it again.

I know there are some bugs with icon scaling in 0.16. That should be fixed in 0.17 and the GUI should also be more open for modding too. Maybe another review on 0.17 might give a suitable sollution.

Kind regards,
lovely_santa