Skip to content
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

Fix ProjectSettings has_setting() when used on a overriden setting with feature tags #57972

Merged
merged 1 commit into from
Feb 11, 2022

Conversation

BimDav
Copy link
Contributor

@BimDav BimDav commented Feb 11, 2022

Fixed #57970

@BimDav BimDav requested a review from a team as a code owner February 11, 2022 13:37
@Chaosus Chaosus added this to the 4.0 milestone Feb 11, 2022
@akien-mga akien-mga added cherrypick:3.4 cherrypick:3.x Considered for cherry-picking into a future 3.x release topic:core and removed topic:editor labels Feb 11, 2022
Copy link
Member

@akien-mga akien-mga left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That seems consistent with the _get/get_setting implementation indeed.

@akien-mga akien-mga merged commit ea03379 into godotengine:master Feb 11, 2022
@akien-mga
Copy link
Member

Thanks!

@akien-mga
Copy link
Member

Cherry-picked for 3.5.

@akien-mga akien-mga removed the cherrypick:3.x Considered for cherry-picking into a future 3.x release label Feb 12, 2022
@akien-mga
Copy link
Member

Cherry-picked for 3.4.3.

@akien-mga
Copy link
Member

As discussed in #58294, this causes issues due to the way this API is used. has_setting (and set_setting) seem to be used to match exact setting names, and they should not remap to feature overrides.

The use case in #57970 seem to actually be a more complex issue than just handling feature overrides. The code before this PR would work fine if both the base setting and its feature override were defined in the Project Settings directly. The issue here seems to come from defining the base setting in a plugin and overriding it in the project. This PR likely even breaks the use case in the MRP as it uses has_setting to reproduce GLOBAL_DEF and that likely means that the base setting will not be defined because it's matching its feature override in project.godot (which is loaded first).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ProjectSettings has_setting() does not work with feature tags overriden settings
3 participants