using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Core.Logging.Interpolation;
using BepInEx.Logging;
using BepInEx.Unity.IL2CPP;
using Fusion.Addons.KCC;
using HarmonyLib;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = "")]
[assembly: AssemblyCompany("HighJump")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("HighJump")]
[assembly: AssemblyTitle("HighJump")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace HighJump;
[BepInPlugin("com.highjump.roadsideresearch", "HighJump", "1.0.0")]
public class Plugin : BasePlugin
{
public const string GUID = "com.highjump.roadsideresearch";
public const string Name = "HighJump";
public const string Version = "1.0.0";
internal static ManualLogSource Log;
internal static ConfigEntry<float> JumpMultiplier;
public override void Load()
{
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_0043: Expected O, but got Unknown
//IL_0052: Unknown result type (might be due to invalid IL or missing references)
//IL_0058: Expected O, but got Unknown
//IL_0097: Unknown result type (might be due to invalid IL or missing references)
Log = ((BasePlugin)this).Log;
JumpMultiplier = ((BasePlugin)this).Config.Bind<float>("General", "JumpMultiplier", 2f, new ConfigDescription("Multiplier applied to jump height (default is 2.0 for double jump height)", (AcceptableValueBase)(object)new AcceptableValueRange<float>(0.1f, 10f), Array.Empty<object>()));
ManualLogSource log = Log;
bool flag = default(bool);
BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(27, 2, ref flag);
if (flag)
{
((BepInExLogInterpolatedStringHandler)val).AppendFormatted<string>("HighJump");
((BepInExLogInterpolatedStringHandler)val).AppendLiteral(" loaded! Jump multiplier: ");
((BepInExLogInterpolatedStringHandler)val).AppendFormatted<float>(JumpMultiplier.Value);
((BepInExLogInterpolatedStringHandler)val).AppendLiteral("x");
}
log.LogInfo(val);
new Harmony("com.highjump.roadsideresearch").PatchAll(typeof(JumpPatch));
}
}
[HarmonyPatch]
public static class JumpPatch
{
[HarmonyPatch(typeof(KCC), "Jump")]
[HarmonyPrefix]
public static void ScaleJumpImpulse(ref Vector3 impulse)
{
//IL_0002: Unknown result type (might be due to invalid IL or missing references)
//IL_0011: Unknown result type (might be due to invalid IL or missing references)
//IL_0016: Unknown result type (might be due to invalid IL or missing references)
impulse *= Plugin.JumpMultiplier.Value;
}
}