Jump to content

Change the Harmony patching method from “All” to manual patching

Pending 1.3.5

The_X_
The_X_

Posted

Hello! I’d like to ask you a quick favor that shouldn’t take much time. In your code, you use the following:

private void InitHarmonyPatches()
{
  if (!config.UseHarmony)
    return;

  _harmony = new Harmony(Name + Patch”);

  _harmony?.PatchAll();

  Puts(“Harmony patches items stack method”);
}


private void DisposeHarmonyPatches()
{
  if (!config.UseHarmony)
  	return;

  _harmony?.UnpatchAll(Name + Patch”);
}

The thing is, this method is not recommended. Every time you call “PatchAll,” you not only affect your plugin’s patches but also reapply the patches of all other plugins. This means that enabling your plugin can cause issues in other patches—issues that are difficult to track down without knowing the problem in advance.

It would be great if you could replace `PatchAll` with manually applying the necessary patches.

About Us

Codefling is the largest marketplace for plugins, maps, tools, and more, making it easy for customers to discover new content and for creators to monetize their work.

Downloads
2.5m
Total downloads
Customers
11.1k
Customers served
Files Sold
159.4k
Total sales
Payments
3.4m
Processed total
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.