Skip to content

Conversation

@Qubus0
Copy link
Collaborator

@Qubus0 Qubus0 commented Jan 30, 2025

closes #426

Hooks are now applied by method instead of by script.

This should make hooks safer in general - even if one method may not be processed correctly, it won't break the whole script or prevent it from being modded.

caching of the methods is slightly different now: if there is any difference in which scripts or methods are hooked, everything is processed. This is a bit less efficient, but also more predictable while still reducing the processing required if the game is started with the exact same mods/hooks, and reducing required restarts because of it

@Qubus0 Qubus0 added enhancement New feature or request 4.x labels Jan 30, 2025
@Qubus0 Qubus0 added this to the 4.x - 7.0.0 milestone Jan 30, 2025
@Qubus0 Qubus0 requested a review from KANAjetzt January 30, 2025 15:42
@Qubus0 Qubus0 self-assigned this Jan 30, 2025
@Qubus0 Qubus0 changed the base branch from main to 4.x January 30, 2025 15:42
@KANAjetzt KANAjetzt changed the title Feat/426 per method hooks feat: per method hooks Jan 31, 2025
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.

nice - ty 👍

@Qubus0 Qubus0 added this pull request to the merge queue Feb 1, 2025
Merged via the queue into GodotModding:4.x with commit 5c61730 Feb 1, 2025
1 check passed
@Qubus0 Qubus0 deleted the feat/426-per-method-hooks branch February 1, 2025 12:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4.x enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

dynamic hooking: selectively only hook targeted methods instead of whole file

2 participants