IconData icon_size not marked optional

User avatar
BrainGamer_
Long Handed Inserter
Long Handed Inserter
Posts: 93
Joined: Sun Nov 14, 2021 9:52 pm
Contact:

IconData icon_size not marked optional

Post by BrainGamer_ »

The icon_size property on IconData should be marked optional since it is not always required (as mentioned in its description)
Bilka
Factorio Staff
Factorio Staff
Posts: 3310
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: IconData icon_size not marked optional

Post by Bilka »

To summarize what we talked about on discord a few days ago:

There is no system to indicate conditionally mandatory properties so we're doing best guesses at the moment as to whether marking a conditional property as optional is better or not.

Keeping it mandatory means that FMTK will always complain if you use the outer size instead of the inner one.
Marking it optional means that FMTK never complain even when the outer icon size is missing.

This means this is a game of tradeoffs, false positive vs false negative.

I've considered for a few days and will mark the inner icon_size optional for now (so do this request). This is mostly based on consistency with other conditionally mandatory properties. So, fixed for the next release (1.1.102).
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.
Post Reply

Return to “Resolved Requests”