using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyCompany("NannaFix")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("NannaFix")]
[assembly: AssemblyTitle("NannaFix")]
[assembly: AssemblyVersion("1.0.0.0")]
[BepInPlugin("Nannafix", "Nannafix", "1.0.0")]
public class NannaFix : BaseUnityPlugin
{
private class BananaPeel_OnEnable_Patch
{
public static void Postfix(BananaPeel __instance)
{
int num = 10;
((Component)__instance).gameObject.layer = num;
Physics.IgnoreLayerCollision(num, num, true);
Rigidbody component = ((Component)__instance).GetComponent<Rigidbody>();
if ((Object)(object)component != (Object)null)
{
component.collisionDetectionMode = (CollisionDetectionMode)0;
component.mass = 1f;
}
}
}
private void Awake()
{
//IL_0006: Unknown result type (might be due to invalid IL or missing references)
//IL_000c: Expected O, but got Unknown
//IL_003e: Unknown result type (might be due to invalid IL or missing references)
//IL_004b: Expected O, but got Unknown
Harmony val = new Harmony("NannaFix");
MethodInfo methodInfo = AccessTools.Method(typeof(BananaPeel), "OnEnable", (Type[])null, (Type[])null);
MethodInfo methodInfo2 = AccessTools.Method(typeof(BananaPeel_OnEnable_Patch), "Postfix", (Type[])null, (Type[])null);
val.Patch((MethodBase)methodInfo, (HarmonyMethod)null, new HarmonyMethod(methodInfo2), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null);
}
}