-
-
Notifications
You must be signed in to change notification settings - Fork 21.1k
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
Refactor ProjectSetting overrides #71325
Merged
akien-mga
merged 1 commit into
godotengine:master
from
reduz:refactor-project-setting-overrides
Jan 13, 2023
Merged
Refactor ProjectSetting overrides #71325
akien-mga
merged 1 commit into
godotengine:master
from
reduz:refactor-project-setting-overrides
Jan 13, 2023
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bruvzg
reviewed
Jan 13, 2023
akien-mga
requested changes
Jan 13, 2023
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.
There are also these usage of ProjectSettings::get_setting()
which should likely be replaced by GLOBAL_GET()
or get_setting_with_override()
to properly respect overrides:
tests/core/config/test_project_settings.h
43: Variant variant = ProjectSettings::get_singleton()->get_setting("application/config/name");
53: Variant variant = ProjectSettings::get_singleton()->get_setting("application/config/name", "SomeDefaultValue");
63: Variant variant = ProjectSettings::get_singleton()->get_setting("not_existing_setting");
70: Variant variant = ProjectSettings::get_singleton()->get_setting("not_existing_setting");
73: variant = ProjectSettings::get_singleton()->get_setting("not_existing_setting", "my_nice_default_value");
85: Variant variant = ProjectSettings::get_singleton()->get_setting("my_custom_setting");
91: variant = ProjectSettings::get_singleton()->get_setting("my_custom_setting");
modules/mono/csharp_script.cpp
691: String assembly_name = ProjectSettings::get_singleton()->get_setting("dotnet/project/assembly_name");
modules/mono/mono_gd/gd_mono.cpp
292: String assembly_name = ProjectSettings::get_singleton()->get_setting("dotnet/project/assembly_name");
469: String assembly_name = ProjectSettings::get_singleton()->get_setting("dotnet/project/assembly_name");
platform/web/export/export_plugin.cpp
156: replaces["$GODOT_PROJECT_NAME"] = ProjectSettings::get_singleton()->get_setting("application/config/name");
196: String proj_name = ProjectSettings::get_singleton()->get_setting("application/config/name");
reduz
force-pushed
the
refactor-project-setting-overrides
branch
from
January 13, 2023 13:37
329d4b6
to
5a91a14
Compare
reduz
force-pushed
the
refactor-project-setting-overrides
branch
from
January 13, 2023 13:42
5a91a14
to
4fb62bd
Compare
Removed function to disable, applied fixes and updated docs. |
akien-mga
reviewed
Jan 13, 2023
akien-mga
reviewed
Jan 13, 2023
akien-mga
reviewed
Jan 13, 2023
akien-mga
reviewed
Jan 13, 2023
akien-mga
reviewed
Jan 13, 2023
reduz
force-pushed
the
refactor-project-setting-overrides
branch
2 times, most recently
from
January 13, 2023 14:09
b10c519
to
24b9374
Compare
* Overrides no longer happen for set/get. * They must be checked with a new function: `ProjectSettings::get_setting_with_override()`. * GLOBAL_DEF/GLOBAL_GET updated to use this This change solves many problems: * General confusion about getting the actual or overriden setting. * Feature tags available after settings are loaded were being ignored, they are now considered. * Hacks required for the Project Settings editor to work. Fixes godotengine#64100. Fixes godotengine#64014. Fixes godotengine#61908.
reduz
force-pushed
the
refactor-project-setting-overrides
branch
from
January 13, 2023 14:14
24b9374
to
6f0e210
Compare
akien-mga
approved these changes
Jan 13, 2023
Thanks! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
ProjectSettings::get_setting_with_override()
.This change solves many problems:
keep_screen_on
project setting once #64014 and Tweak default crash handler message in exported projects #61908.