You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Patching all method overloads is relatively verbose now, requiring manual patching which adds about 10 lines of code per patch.
(TargetMethods() requires extra classes; while Harmony.Patch() requires extra bookkeeping. So it becomes about 10 lines of code.)
Describe the solution you'd like
If it is available in Attribute, it would be 0 line of code per patch and cleaner.
IMHO Attribute way is cleaner because:
TargetMethods()'s requirement of extra classes make it verbose (and does not cope with HarmonyPatch.CreateAndPatchAll);
Harmony.Patch() separates hook target from hook implementation.
Describe alternatives you've considered
Either [HarmonyPatch(Type, string, [new-enum-overload-all])],
or [HarmonyPatch(Type{target-class}, [new-enum]{custom-filter-indicator}, Type{custom-filter}, ... {args forward to custom filter}])],
or [HarmonyPatch(Type{target-class}, [new-enum]{custom-filter-indicator}), TargetMethods(Type{custom-filter}, ... {args forward to custom filter}])].
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Patching all method overloads is relatively verbose now, requiring manual patching which adds about 10 lines of code per patch.
(TargetMethods() requires extra classes; while Harmony.Patch() requires extra bookkeeping. So it becomes about 10 lines of code.)
Describe the solution you'd like
If it is available in Attribute, it would be 0 line of code per patch and cleaner.
IMHO Attribute way is cleaner because:
Describe alternatives you've considered
Either
[HarmonyPatch(Type, string, [new-enum-overload-all])]
,or
[HarmonyPatch(Type{target-class}, [new-enum]{custom-filter-indicator}, Type{custom-filter}, ... {args forward to custom filter}])]
,or
[HarmonyPatch(Type{target-class}, [new-enum]{custom-filter-indicator}), TargetMethods(Type{custom-filter}, ... {args forward to custom filter}])]
.The text was updated successfully, but these errors were encountered: