Shockah / Nickel

A modding API / mod loader for the game Cobalt Core.
Apache License 2.0
3 stars 5 forks source link

Patching Card/Artifact/etc.Key() to use full type name or Nickel unique name #64

Closed Shockah closed 9 months ago

Shockah commented 9 months ago

Currently multiple mods registering a card/artifact/etc with the same class name will clash. We need to patch the Key() method on these types to fix this issue.

Unfortunately, these methods get inlined, so they can't be patched with just Harmony. A solution to that problem is to also patch them with Cecil, adding a [MethodImpl(MethodImplOptions.NoInlining)] attribute to them.