GameViewSettings slightly incorrect defaults

User avatar
PennyJim
Fast Inserter
Fast Inserter
Posts: 120
Joined: Wed Jan 18, 2023 3:49 am
Contact:

GameViewSettings slightly incorrect defaults

Post by PennyJim »

GameViewSettings.default_show_value very specifically says it is the default for all other values. Yet all other values say `true` is their default. They should probably be changed to "Value of `default_show_value`" just like SpriteSheet.line_length with the default setting having an actual default.

I wouldn't blame you if you want to instead do something along the lines of "Value of `default_show_value` or `true` if unset" for clarity sake, but then I'd recommend you do that for any other instance of "Value of" for consistency.
User avatar
Therenas
Factorio Staff
Factorio Staff
Posts: 323
Joined: Tue Dec 11, 2018 2:10 pm
Contact:

Re: GameViewSettings slightly incorrect defaults

Post by Therenas »

What you're describing isn't quite how it works. First, a couple of them are false, so they aren't all true by default. Second, they are just their default values, unless default_show_value is set, which then overrides all of them. So saying they take their default from default_show_value isn't correct. If default_show_value isn't set, so neither true or false, it doesn't do anything.

I could do "`true` or value of `default_show_value`" I guess, but not sure if that's really clearer.
User avatar
PennyJim
Fast Inserter
Fast Inserter
Posts: 120
Joined: Wed Jan 18, 2023 3:49 am
Contact:

Re: GameViewSettings slightly incorrect defaults

Post by PennyJim »

Therenas wrote: Mon May 26, 2025 8:27 am I could do "`true` or value of `default_show_value`" I guess, but not sure if that's really clearer.
I personally think that's clearer. Though you'd probably want to swap the order so it more clearly uses the value of the field if set and uses a default if unset.
Nidan
Filter Inserter
Filter Inserter
Posts: 313
Joined: Sat Nov 21, 2015 1:40 am
Contact:

Re: GameViewSettings slightly incorrect defaults

Post by Nidan »

Like PennyJim, I'd list the value that takes priority first. In addition, I'd avoid "and" and "or", lest someone attempts to evaluate the expression. How about "Value of `default_show_value` if set, `true` otherwise"?
User avatar
Therenas
Factorio Staff
Factorio Staff
Posts: 323
Joined: Tue Dec 11, 2018 2:10 pm
Contact:

Re: GameViewSettings slightly incorrect defaults

Post by Therenas »

I'm not convinced there is any clarity gained by those changes. It's a simple Type that you can look at all at once, you'll know how it works without mentioning the override a dozen times imo.
Post Reply

Return to “Resolved Requests”