quantum-space-buddies/QSB/Patches/QSBPatch.cs

24 lines
545 B
C#
Raw Normal View History

using QSB.Utility;
using System.Linq;
2021-06-18 20:54:32 +00:00
namespace QSB.Patches
2020-11-03 21:11:10 +00:00
{
2020-12-02 21:23:01 +00:00
public abstract class QSBPatch
{
public abstract QSBPatchTypes Type { get; }
2021-06-18 20:54:32 +00:00
public virtual void DoPatches()
2021-06-18 20:54:32 +00:00
{
var oldMethods = QSBPatchManager.HarmonyInstance.GetPatchedMethods();
QSBPatchManager.HarmonyInstance.PatchAll(GetType());
foreach (var method in QSBPatchManager.HarmonyInstance.GetPatchedMethods().Except(oldMethods))
2021-06-18 20:54:32 +00:00
{
DebugLog.DebugWrite($"- Patching {method.DeclaringType}.{method.Name}");
2021-06-18 20:54:32 +00:00
}
}
public void DoUnpatches()
{
}
2020-12-02 21:23:01 +00:00
}
2020-12-03 08:28:05 +00:00
}