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

Feature request - HarmonyOptional attribute #47

Closed
ManlyMarco opened this issue Apr 13, 2022 · 1 comment · Fixed by #105
Closed

Feature request - HarmonyOptional attribute #47

ManlyMarco opened this issue Apr 13, 2022 · 1 comment · Fixed by #105
Labels
enhancement New feature or request

Comments

@ManlyMarco
Copy link
Member

ManlyMarco commented Apr 13, 2022

Add a patch attribute that marks the patch as optional - if the method is not found or patching fails, the patch process is not aborted and there's a warning given, not an error.
It could have a parameter to specify if exceptions should be ignored or not. If target method is not found, it will always skip the patch (and show a short warning that an optional patch was skipped).

Use case is supporting multiple game versions where name or parameters of a method got changed.

@ManlyMarco
Copy link
Member Author

Might require #52 to be fixed before an option to ignore exceptions can be added.

Could be combined with #62 into a single attribute with multiple options. e.g. [HarmonyOptional(OptionalMode.AllOverloads)]

ManlyMarco added a commit that referenced this issue Feb 8, 2024
Add a patch attribute that marks the patch as optional - if the method is not found or patching fails, the patch process is not aborted and there's a warning given, not an error.

Resolves #47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant