The current implementation of artifact hooks seems to be cursed in one way or another, breaking any captured variables.
Rewrite artifact hooks to generate a simple Artifact subclass, which gets its methods overridden with Harmony whenever a mod tries to hook it, emitting new IL that calls each delegate (Harmony-esque).
The current implementation of artifact hooks seems to be cursed in one way or another, breaking any captured variables.
Rewrite artifact hooks to generate a simple
Artifact
subclass, which gets its methods overridden with Harmony whenever a mod tries to hook it, emitting new IL that calls each delegate (Harmony-esque).