ValensHasThePower/Patches.cs

21 lines
532 B
C#

using Aki.Reflection.Patching;
using Comfort.Common;
using EFT;
using System.Reflection;
namespace ValensHasThePower
{
public class PatchThePower : ModulePatch
{
protected override MethodBase GetTargetMethod()
{
return typeof(GameWorld).GetMethod("OnGameStarted", BindingFlags.Public | BindingFlags.Instance);
}
[PatchPostfix]
private static void PatchPostFix()
{
Singleton<GameWorld>.Instance.gameObject.AddComponent<PowerOn>();
}
}
}