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

__state is mapped by FullName instead of AssemblyQualifiedName #56

Open
bwoebi opened this issue Dec 7, 2022 · 1 comment
Open

__state is mapped by FullName instead of AssemblyQualifiedName #56

bwoebi opened this issue Dec 7, 2022 · 1 comment

Comments

@bwoebi
Copy link

bwoebi commented Dec 7, 2022

Similarly to pardeike/Harmony#408, this repository has the same problem: __state is shared between all methods with the same fullname, but from different assemblies.

This was fixed in pardeike/Harmony@b906d04 by replacing occurrences of FullName by AssemblyQualifiedName in MethodPatcher.cs (here, the file is Harmony/Public/Patching/HarmonyManipulator.cs).

@CptMoore
Copy link

We in the BattleTech modding community are actually relying on FullName.

Due to only recently allowing HarmonyX, all mods need Hamony1 and expect some old prefix behavior for skipping, so we wrap those nicely. Wrappers are created in dynamically assemblied assembiles, but with the same FullName as the original patch method. Postfixes and prefixes would not be connected anymore if AssemblyQualifiedName is suddenly used, as they are in different assemblies.

I really wish we could just specify an identifier via an attribute, that the __state variable is then using instead of that implicit stuff. Its already bad enough that for __state to work, pre and postfix have to be in the same class.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants