It would be nifty if it was possible to supply an icon for the 'nothing' technology effect, be that an `icons` parameter, a reference to some thing that has an icon, or perhaps something completely different.
As an example use-case, specifying that used-up uranium fuel cells become available upon unlocking the nuclear reactor.
Ability to specify icon for 'nothing' technology effect?
Re: Ability to specify icon for 'nothing' technology effect?
This would be very nice.mrudat wrote: Tue Jul 14, 2020 11:03 am It would be nifty if it was possible to supply an icon for the 'nothing' technology effect, be that an `icons` parameter, a reference to some thing that has an icon, or perhaps something completely different.
As an example use-case, specifying that used-up uranium fuel cells become available upon unlocking the nuclear reactor.
Re: Ability to specify icon for 'nothing' technology effect?
Sorry, this isn't going to happen. I looked at implementing this when I added the 'nothing' effect but because effects on technologies aren't linked to any specific prototype (they are just a list of things on a technology prototype - and can have multiple identical ones with different icons) there's no way to take the runtime actual effect instant and know what lua definition it came from to draw the icon.
If you want to get ahold of me I'm almost always on Discord.
Re: Ability to specify icon for 'nothing' technology effect?
What about something on the tech itself, then? Some kind of "effect icon override icon" or something?Rseding91 wrote: Sat Jul 18, 2020 2:46 pm Sorry, this isn't going to happen. I looked at implementing this when I added the 'nothing' effect but because effects on technologies aren't linked to any specific prototype (they are just a list of things on a technology prototype - and can have multiple identical ones with different icons) there's no way to take the runtime actual effect instant and know what lua definition it came from to draw the icon.
Re: Ability to specify icon for 'nothing' technology effect?
That might be possible. I'll look into it and see what limitations and benefits it could have.Reika wrote: Sun Jul 19, 2020 2:13 am What about something on the tech itself, then? Some kind of "effect icon override icon" or something?
If you want to get ahold of me I'm almost always on Discord.
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Ability to specify icon for 'nothing' technology effect?
Did that ever lead anywhere? At least for the addon maybe?Rseding91 wrote: Sun Jul 19, 2020 4:09 pm That might be possible. I'll look into it and see what limitations and benefits it could have.
Now that the vanilla character boni have these nice (unmoddable?) icons, the red cross of the nothing modifier looks even more jarringly out of place.
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Re: Ability to specify icon for 'nothing' technology effect?
It should be possible to specify the icons via the modifier, see https://wiki.factorio.com/Types/ModifierPrototype which Types/NothingModifierPrototype inherits from.eradicator wrote: Tue Jun 08, 2021 3:26 pmDid that ever lead anywhere? At least for the addon maybe?Rseding91 wrote: Sun Jul 19, 2020 4:09 pm That might be possible. I'll look into it and see what limitations and benefits it could have.
Now that the vanilla character boni have these nice (unmoddable?) icons, the red cross of the nothing modifier looks even more jarringly out of place.
As described on Types/ModifierPrototype, if infer_icon is false, the icons come from the utility sprites (so, they are moddable). They are listed at the bottom of https://wiki.factorio.com/Prototype/UtilitySprites.
So, assuming I didn't make a mistake when writing the docs... moving from "Won't implement" to "Implemented" :)
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
- eradicator
- Smart Inserter
- Posts: 5211
- Joined: Tue Jul 12, 2016 9:03 am
- Contact:
Re: Ability to specify icon for 'nothing' technology effect?
Hah! You're too fast. I was just going to report back that it's actually implemented, but you already moved it! Nice to see another "that's never gonna happen" myth-busted !Bilka wrote: Tue Jun 08, 2021 3:47 pm So, assuming I didn't make a mistake when writing the docs... moving from "Won't implement" to "Implemented"
Author of: Belt Planner, Hand Crank Generator, Screenshot Maker, /sudo and more.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.
Mod support languages: 日本語, Deutsch, English
My code in the post above is dedicated to the public domain under CC0.