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

feat: Add rename_profile() to ModLoaderUserProfile #352

Merged
merged 9 commits into from
Jan 26, 2025

Conversation

kyooosukedn
Copy link
Contributor

closes #287

Hi, for this change I modified and reference myself to method create_profile as @KANAjetzt in https://github.com/GodotModding/godot-mod-loader/blob/development/addons/mod_loader/api/profile.gd :)

@KANAjetzt KANAjetzt added the enhancement New feature or request label Oct 25, 2023
@KANAjetzt KANAjetzt added this to the v6.4.0 milestone Oct 25, 2023
@KANAjetzt KANAjetzt requested a review from a team October 25, 2023 08:01
Copy link
Member

@KANAjetzt KANAjetzt left a comment

Choose a reason for hiding this comment

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

Thanks for your PR! Let me know if you have any questions or if something is unclear.

addons/mod_loader/api/profile.gd Outdated Show resolved Hide resolved
addons/mod_loader/api/profile.gd Outdated Show resolved Hide resolved
addons/mod_loader/api/profile.gd Outdated Show resolved Hide resolved
addons/mod_loader/api/profile.gd Outdated Show resolved Hide resolved
@KANAjetzt KANAjetzt changed the title feat: Add a method to rename a user profile to ModLoaderUserProfile #287 feat: Add rename_profile() to ModLoaderUserProfile Oct 25, 2023
@KANAjetzt KANAjetzt changed the base branch from main to development October 25, 2023 08:30
@kyooosukedn
Copy link
Contributor Author

@KANAjetzt Thank you very much for your review, now I think I have corrected the changes the way you suggested. Question for "running modloader in godot" do I need to take the mod developer route to test it?

@KANAjetzt
Copy link
Member

For starters, you can create an empty Godot Project and follow the steps on this page.

If you get this working, you can look into symlinking the addons directory into this project.

That will allow you to edit the code inside Godot, where you will get some syntax errors to fix.

If no compile errors show up anymore, you can look into the mod developer route and add the rename functionality to the example user profile UI mod.

This would be ideal, but it might be a bit overwhelming if you've never used Godot. So feel free to just edit your code inside Godot to get the syntax error messages, and I will review your code again.

@kyooosukedn
Copy link
Contributor Author

Hi @KANAjetzt sorry that it took so long, i corrected some changes as I am able to get the syntax error now

Copy link
Member

@KANAjetzt KANAjetzt left a comment

Choose a reason for hiding this comment

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

Almost there - thanks for your work! 👍
As I said in the review, it's important to test things in practice. I added the rename feature to the example UI mod and found the mentioned issues.

addons/mod_loader/api/profile.gd Show resolved Hide resolved
addons/mod_loader/api/profile.gd Outdated Show resolved Hide resolved
addons/mod_loader/api/profile.gd Outdated Show resolved Hide resolved
@kyooosukedn
Copy link
Contributor Author

Thank you again :) I'm sorry I don't have the chance yet to really dive deep into it..

@KANAjetzt KANAjetzt modified the milestones: 3.x - v6.4.0, 3.x - v6.3.0 Nov 17, 2024
@KANAjetzt KANAjetzt added the 3.x label Nov 24, 2024
Copy link
Member

@KANAjetzt KANAjetzt left a comment

Choose a reason for hiding this comment

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

Fixed all the open issues ready to merge from my side maybe you can take quick look @Qubus0

Copy link
Collaborator

@Qubus0 Qubus0 left a comment

Choose a reason for hiding this comment

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

exports are added to make debugging easier i assume?

@KANAjetzt
Copy link
Member

KANAjetzt commented Jan 26, 2025

Mostly because the props only get duplicated if they are exported.

Duplicates this resource, returning a new resource with its exported or @GlobalScope.PROPERTY_USAGE_STORAGE properties copied from the original.

https://docs.godotengine.org/en/3.6/classes/class_resource.html#class-resource-method-duplicate

@KANAjetzt KANAjetzt added this pull request to the merge queue Jan 26, 2025
Merged via the queue into GodotModding:development with commit 07a065c Jan 26, 2025
2 checks passed
@KANAjetzt KANAjetzt mentioned this pull request Jan 26, 2025
KANAjetzt added a commit that referenced this pull request Jan 26, 2025
* Added method to rename user profile

* Corrected functional changes and indentation from review

* Indentation

* Corrected false indentation and error

* Corrected false indentation and error

* Updated some failed changes

* refactor: ♻️ export props

only exported properties are duplicated

* refactor: 🔥 remove vars

* fix: 🐛 wrong user_profiles ref

---------

Co-authored-by: Kai <kai@kana.jetzt>
KANAjetzt added a commit that referenced this pull request Jan 27, 2025
# Minor Release v6.3.0

Minor update to fix issues with script extension sorting, as well as
potential issues with translations, configurations, and user profiles.

## Key PRs
- #357
- #358
- #520
- #352

## Change Log

### New Features

- #352
- #358

### Fixes
- #357
- #520 
- #522 
- #523
- #524

### Refactors
- #521
- #526

### Tests
- #360 

### Miscellaneous
- #525
- #527
- #529
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.x enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add a method to rename a user profile to ModLoaderUserProfile
3 participants