-
-
Notifications
You must be signed in to change notification settings - Fork 936
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Codechange: rename SettingGuiFlag to SettingFlag #9332
Conversation
src/settings_internal.h
Outdated
SF_NEWGAME_ONLY = 1 << 6, ///< this setting cannot be changed in a game. | ||
SF_SCENEDIT_TOO = 1 << 7, ///< this setting can be changed in the scenario editor (only makes sense when SF_NEWGAME_ONLY is set). | ||
SF_SCENEDIT_ONLY = 1 << 8, ///< this setting can only be changed in the scenario editor. | ||
SF_PER_COMPANY = 1 << 9, ///< this setting can be different for each company (saved in company struct). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is reordering this going to cause any issues?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not as far as I can see and as far as I could test.
Nowhere this value is stored in the savegame. But I would love some extra pairs of eyes on it to validate that claim.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't the comments start with a capital?
64884dd
to
193423f
Compare
It is a lovely organicly grown enum, where it started off with GUI-only flags, and after that a few flags got added that can be considered GUI-only (the GUI disables/enables based on them), to only have flags added that has nothing to do with the GUI. So be less confusing, and rename them to what they do. Additionally, I took this opportunity to rename 0ISDISABLED to reflect what it really does.
193423f
to
e5c5de7
Compare
Motivation / Problem
@rubidium42 : it happened, it annoyed me enough!!
For the rest: settings have this weird quirk where something is called "guiflags" but is really the flags of the settings. And we have a "flags" which is really the flags of the saveload part. This is so confusing ...
Description
In a follow-up commit I am going to address the
flags
vsguiflags
.Limitations
Checklist for review
Some things are not automated, and forgotten often. This list is a reminder for the reviewers.