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: ✨ Misc: Add code_note func, to show a helpful message in log_fatal #139

Merged

Conversation

ithinkandicode
Copy link
Collaborator

I saw this approach in a c# game I decompiled a while ago. It lets us show important notes that would otherwise be stripped when you decompile a game's PCK.

I don't know how useful it would be across the entire codebase, but I think that doing it for this one particular bit of code (log_fatal) would be very helpful to new users. Eg. I've seen a few people on the Brotato discord who didn't understand why they were getting an error here, because if you don't know about the error stack trace, it can look like an error with ModLoader itself.

It uses a dummy func, code_note, which does nothing but can be re-used elsewhere as it's part of ModLoaderUtils.

@ithinkandicode ithinkandicode added the validation Feature to make things safe and predictable label Feb 26, 2023
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.

Just some additional thoughts

addons/mod_loader/mod_loader_utils.gd Outdated Show resolved Hide resolved
addons/mod_loader/mod_loader_utils.gd Show resolved Hide resolved
addons/mod_loader/mod_loader_utils.gd Outdated Show resolved Hide resolved
@ithinkandicode ithinkandicode merged commit f1637d9 into GodotModding:development Feb 27, 2023
@ithinkandicode ithinkandicode deleted the fatal-log-code-note branch February 27, 2023 11:17
@ithinkandicode ithinkandicode changed the title Misc: Add code_note func, to show a helpful message in log_fatal feat: ✨ Misc: Add code_note func, to show a helpful message in log_fatal Jun 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
validation Feature to make things safe and predictable
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants