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

Add missing class methods #216

Closed
wants to merge 1 commit into from
Closed

Add missing class methods #216

wants to merge 1 commit into from

Conversation

lupoDharkael
Copy link
Contributor

solves #189

Still a work in progress.

src/core/GodotGlobal.cpp Outdated Show resolved Hide resolved
src/core/String.cpp Outdated Show resolved Hide resolved
@BastiaanOlij BastiaanOlij added the enhancement This is an enhancement on the current functionality label Dec 1, 2018
@lupoDharkael
Copy link
Contributor Author

lupoDharkael commented Dec 4, 2018

This should be ready now.
A quick review for the new code is welcome.

@karroffel
Copy link
Contributor

What's the status of this? Is this still needed or have those changes already been made in the meantime?

@lupoDharkael
Copy link
Contributor Author

I've checked all the methods one by one and none have been implemented in master.

@BastiaanOlij
Copy link
Collaborator

BastiaanOlij commented May 2, 2019

@lupoDharkael what are you looking for? Your changes in this PR haven't been merged into master yet because you've marked it as WIP, so you won't find your changes in master. Or are you looking for other changes before you can finish this PR?

edit owh, you're referring to the list of methods to add to the different core classes in the issue?

@lupoDharkael
Copy link
Contributor Author

Well, I marked this as WIP because I was looking for adding all the missing methods. I did this a few months ago so I don't remember what extra code I wanted to add but I guess I just wanted to remove the WIP after a review because I commented "This should be ready now." xD

@lupoDharkael
Copy link
Contributor Author

lupoDharkael commented May 3, 2019

Merge it if you agree with the actual code. I think it covers almost all the missing methods.

@BastiaanOlij
Copy link
Collaborator

@lupoDharkael just remove the WIP, I think we should merge this, if there are any other missing bits and bobs we can add them later.

@karroffel are you happy with this?

@lupoDharkael lupoDharkael changed the title WIP: add missing class methods Add missing class methods May 4, 2019
Copy link
Contributor

@karroffel karroffel left a comment

Choose a reason for hiding this comment

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

Seems okay apart from a style-nitpick.

ERR_FAIL_COND(!axis.is_normalized());

real_t d = axis.length();
if (d == 0)
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't quite like the style here. I would use {} for both branches.

@karroffel
Copy link
Contributor

Could you maybe rebase this PR as well so that it runs through CI and we see that there are no obvious problems?

@2shady4u
Copy link
Contributor

2shady4u commented May 6, 2019

Is this still being worked on?
Could the missing functionalities for Dictionary.cpp be added as well? (such as duplicate)
Or would it be better to leave this for another pull request?

EDIT: seems that no GDNative binding is available for Dictionary duplication... so this has to be implemented in the Godot repository itself... oh well

EDIT2: I've started a pull request to implement the native binding for duplication here: godotengine/godot#28738

@2shady4u
Copy link
Contributor

2shady4u commented May 9, 2019

Similarly, I've started a discussion issue to implement importing functionalities from JSON, here:
godotengine/godot#28775

Whenever this gets through (probably in 3.2) it would be a good idea to implement both the .duplicate() and .from_json() class methods.

This pull request (the one from lupoDharkael ) can already be merged now (after the rebase) without breaking now so I propose to leave implementing the missing Dictionary class methods for a different pull-request at a later data. (Somewhere after 3.2)

EDIT: It seems like .to_json() is there for compatibility issues and shouldn't be used. So it's only the duplication that still has to be added.

@lupoDharkael
Copy link
Contributor Author

I wasn't at home the last few days. I'll update the PR later.

@lupoDharkael
Copy link
Contributor Author

I just saw I deleted my cloned repo after a github cleanup I did a few months ago. I guess I'll need to open a new PR and close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
archived enhancement This is an enhancement on the current functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants