using System;
using System.Reflection;
using System.Runtime.CompilerServices;
using BepInEx;
using HarmonyLib;
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: AssemblyVersion("0.0.0.0")]
[BepInPlugin("com.andrewluebke.dsp.fogparity", "FogParity", "1.0.0")]
public class FogParity : BaseUnityPlugin
{
private void Awake()
{
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_003f: Expected O, but got Unknown
//IL_0051: Unknown result type (might be due to invalid IL or missing references)
//IL_005f: Expected O, but got Unknown
MethodInfo methodInfo = AccessTools.Method(typeof(DFGReplicatorComponent), "LogicTick", (Type[])null, (Type[])null);
if (methodInfo == null)
{
((BaseUnityPlugin)this).Logger.LogWarning((object)"[FogParity] DFGReplicatorComponent.LogicTick not found (game update?) - mod inactive, vanilla behavior.");
return;
}
Harmony val = new Harmony("com.andrewluebke.dsp.fogparity");
val.Patch((MethodBase)methodInfo, new HarmonyMethod(typeof(FogParity), "ForceLocalParity", (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
((BaseUnityPlugin)this).Logger.LogInfo((object)"[FogParity] armed - replicator initiate gate is now presence-independent.");
}
public static void ForceLocalParity(ref bool isLocal)
{
isLocal = true;
}
}