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

[3.x] Make dict2inst to work with arbitrary _init parameters #70786

Conversation

Calinou
Copy link
Member

@Calinou Calinou commented Dec 31, 2022

3.x version of #32534.

This is achieved by skipping initializer call while creating an instance of a GDScript. This is implemented by passing -1 as an argument count to _new and interpreting any value below 0 to mean that the initializer should not be called during instantiation, because internal members of an instance are going to be overridden afterwards.

This is achieved by skipping initializer call while creating an instance
of a GDScript. This is implemented by passing -1 as an argument count
to `_new` and interpreting any value below 0 to mean that the initializer
should not be called during instantiation, because internal members of
an instance are going to be overridden afterwards.
@Calinou Calinou requested a review from a team as a code owner December 31, 2022 22:58
@Calinou Calinou added bug topic:gdscript cherrypick:3.5 Considered for cherry-picking into a future 3.5.x release labels Dec 31, 2022
@Calinou Calinou added this to the 3.6 milestone Dec 31, 2022
@akien-mga akien-mga changed the title Make dict2inst to work with arbitrary _init parameters [3.x] Make dict2inst to work with arbitrary _init parameters Jan 9, 2023
@akien-mga akien-mga merged commit aa92659 into godotengine:3.x Jan 9, 2023
@akien-mga
Copy link
Member

Thanks!

@Calinou Calinou deleted the gdscript-fix-dict2inst-init-parameters-3.x branch February 9, 2023 01:01
@akien-mga akien-mga removed the cherrypick:3.5 Considered for cherry-picking into a future 3.5.x release label Aug 18, 2023
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.

3 participants