Workaround:
Make sure MechEngineer loads before CustomUnits (make CustomUnits depend on ME)
Issue:
Both mods transpile Mech.DamageLocation and replace the GetPassthroughLocation method. Only the first will be able to succeed with standard harmony tools.
Since Harmony doesn't provide post/pre for these inner changes to a method, we don't have a cheap way of coexisting.
Solutions:
detect other mod and try to find the other mods method and change that there
since I'm anyway already saving some global state already to coordinate between methods. I could add another state and then pre-patch the whole GetPassthroughLocation instead of only the call within Mech.DamageLocation .
write a framework or utility method that generically can replace also the calls from other mods method implementations. that framework would probably best be upstreamed to harmony.
Workaround: Make sure MechEngineer loads before CustomUnits (make CustomUnits depend on ME)
Issue: Both mods transpile Mech.DamageLocation and replace the GetPassthroughLocation method. Only the first will be able to succeed with standard harmony tools. Since Harmony doesn't provide post/pre for these inner changes to a method, we don't have a cheap way of coexisting.
Solutions:
https://discord.com/channels/565106671693856778/783304421194858556/784183665386717215