CWX-mods/Live/CWX_MasterKey/MasterKeyPatch.cs

22 lines
524 B
C#
Raw Normal View History

2022-05-14 19:53:00 +01:00
using System.Reflection;
using Aki.Reflection.Patching;
using EFT;
namespace CWX_MasterKey
{
2022-08-19 17:27:56 +01:00
public class MasterKeyPatch : ModulePatch
2022-05-14 19:53:00 +01:00
{
protected override MethodBase GetTargetMethod()
{
return typeof(GameWorld).GetMethod("OnGameStarted", BindingFlags.Public | BindingFlags.Instance);
2022-05-14 19:53:00 +01:00
}
[PatchPostfix]
private static void PatchPostFix()
{
MasterKeyScript masterKey = new MasterKeyScript();
masterKey.Start();
2022-05-14 19:53:00 +01:00
}
}
}