using System;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Core.Logging.Interpolation;
using BepInEx.Logging;
using BepInEx.Unity.IL2CPP;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using Mirror;
using Rewired;
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(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("BigSlide")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("Big Slide")]
[assembly: AssemblyTitle("BigSlide")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Embedded]
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace BigSlide
{
internal class Patches
{
[HarmonyPatch(typeof(PlayerCollision), "Initialize")]
public class BigSlideFriction
{
[HarmonyPostfix]
public static void Postfix(PlayerCollision __instance)
{
Friction.SetValue(__instance, 0.3f);
}
}
[HarmonyPatch(typeof(PlayerSitter), "Update")]
public class BigSlideSchmovement
{
[HarmonyPostfix]
public static void Postfix(PlayerSitter __instance)
{
//IL_0090: Unknown result type (might be due to invalid IL or missing references)
//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
//IL_00d4: Unknown result type (might be due to invalid IL or missing references)
//IL_00de: Unknown result type (might be due to invalid IL or missing references)
//IL_00e8: Unknown result type (might be due to invalid IL or missing references)
//IL_00ed: Unknown result type (might be due to invalid IL or missing references)
//IL_0109: Unknown result type (might be due to invalid IL or missing references)
//IL_012d: Unknown result type (might be due to invalid IL or missing references)
//IL_0132: Unknown result type (might be due to invalid IL or missing references)
//IL_014e: Unknown result type (might be due to invalid IL or missing references)
//IL_0158: Unknown result type (might be due to invalid IL or missing references)
//IL_0162: Unknown result type (might be due to invalid IL or missing references)
//IL_0167: Unknown result type (might be due to invalid IL or missing references)
object? value = PlayerCharacter.GetValue(__instance);
PlayerCharacter val = (PlayerCharacter)((value is PlayerCharacter) ? value : null);
if (((NetworkBehaviour)val).isLocalPlayer && isSittingLocal.GetValue((object?)/*isinst with value type is only supported in some contexts*/) as bool? == true && isGrounded.GetValue((object?)/*isinst with value type is only supported in some contexts*/) as bool? == true)
{
object? value2 = rb.GetValue(val);
object? obj = ((value2 is Rigidbody) ? value2 : null);
? val2 = obj;
Vector3 linearVelocity = ((Rigidbody)obj).linearVelocity;
Vector3 val3 = ((Transform)/*isinst with value type is only supported in some contexts*/).TransformDirection(new Vector3(0f, 0f, 1f));
object? value3 = inputPlayer.GetValue(val);
((Rigidbody)val2).linearVelocity = linearVelocity + val3 * ((Player)((value3 is Player) ? value3 : null)).GetAxis(8) * Time.deltaTime * 10f;
object? value4 = rb.GetValue(val);
object? obj2 = ((value4 is Rigidbody) ? value4 : null);
? val4 = obj2;
Vector3 linearVelocity2 = ((Rigidbody)obj2).linearVelocity;
Vector3 val5 = ((Transform)/*isinst with value type is only supported in some contexts*/).TransformDirection(new Vector3(1f, 0f, 0f));
object? value5 = inputPlayer.GetValue(val);
((Rigidbody)val4).linearVelocity = linearVelocity2 + val5 * ((Player)((value5 is Player) ? value5 : null)).GetAxis(9) * Time.deltaTime * 10f;
}
}
}
private static PropertyInfo Friction = typeof(PlayerCollision).GetProperty("sitFriction", BindingFlags.Instance | BindingFlags.Public);
private static PropertyInfo PlayerCharacter = typeof(PlayerSitter).GetProperties().First((PropertyInfo a) => a.Name == "playerCharacter");
private static PropertyInfo kernal = typeof(PlayerCharacter).GetProperty("kernal", BindingFlags.Instance | BindingFlags.Public);
private static PropertyInfo rb = typeof(PlayerCharacter).GetProperty("rb", BindingFlags.Instance | BindingFlags.Public);
private static PropertyInfo ground = typeof(PlayerCharacter).GetProperty("ground", BindingFlags.Instance | BindingFlags.Public);
private static PropertyInfo isGrounded = typeof(PlayerGround).GetProperty("isGrounded", BindingFlags.Instance | BindingFlags.Public);
private static PropertyInfo inputPlayer = typeof(PlayerCharacter).GetProperty("inputPlayer", BindingFlags.Instance | BindingFlags.Public);
private static PropertyInfo sitter = typeof(PlayerCharacter).GetProperty("sitter", BindingFlags.Instance | BindingFlags.Public);
private static PropertyInfo isSittingLocal = typeof(PlayerSitter).GetProperty("isSittingLocal", BindingFlags.Instance | BindingFlags.Public);
}
[BepInPlugin("BigSlide", "Big Slide", "1.0.0")]
public class BigSlide : BasePlugin
{
internal static ManualLogSource Log;
public override void Load()
{
//IL_0017: Unknown result type (might be due to invalid IL or missing references)
//IL_001d: Expected O, but got Unknown
//IL_0061: Unknown result type (might be due to invalid IL or missing references)
//IL_0067: Expected O, but got Unknown
Log = ((BasePlugin)this).Log;
ManualLogSource log = Log;
bool flag = default(bool);
BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(21, 1, ref flag);
if (flag)
{
((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Plugin ");
((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>("BigSlide");
((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" is loaded uwu");
}
log.LogInfo(val);
Log.LogInfo((object)"Doing a beeeeeg patch");
Harmony val2 = new Harmony("com.nefariousscoundrel.bigsit");
val2.PatchAll();
}
}
public static class MyPluginInfo
{
public const string PLUGIN_GUID = "BigSlide";
public const string PLUGIN_NAME = "Big Slide";
public const string PLUGIN_VERSION = "1.0.0";
}
}