using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using Autohop.Patches;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using UnityEngine;
using Valve.VR;
using Vertigo2;
using Vertigo2.Player;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("Autohop")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Autohop")]
[assembly: AssemblyCopyright("Copyright © 2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("3a0f5d59-89a0-49b0-b67f-8c4af112ed82")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace Autohop
{
[BepInPlugin("AugustCreations.Autohop", "Autohop by AugustCreations", "0.0.0.1")]
[BepInProcess("vertigo2.exe")]
public class Autohop : BaseUnityPlugin
{
private const string modGUID = "AugustCreations.Autohop";
private const string modName = "Autohop by AugustCreations";
private const string modVersion = "0.0.0.1";
private readonly Harmony harmony = new Harmony("AugustCreations.Autohop");
private static Autohop instance;
internal ManualLogSource mls;
private void Awake()
{
if ((Object)(object)instance == (Object)null)
{
instance = this;
}
mls = Logger.CreateLogSource("AugustCreations.Autohop");
mls.LogInfo((object)"Autohop mod has awaken");
harmony.PatchAll(typeof(Autohop));
harmony.PatchAll(typeof(GetStateJumpPatch));
}
}
}
namespace Autohop.Patches
{
[HarmonyPatch(typeof(LocomotionController))]
internal class GetStateJumpPatch
{
[HarmonyPatch("Update")]
[HarmonyPostfix]
private static void add_onto_Update(ref SteamVR_Action_Boolean ___a_jump, ref VertigoCharacterController ___character)
{
//IL_0018: Unknown result type (might be due to invalid IL or missing references)
//IL_0015: Unknown result type (might be due to invalid IL or missing references)
//IL_0033: Unknown result type (might be due to invalid IL or missing references)
SteamVR_Input_Sources val;
if (!GameManager.options.input_flipLocomotionInput)
{
val = (SteamVR_Input_Sources)1;
}
val = (SteamVR_Input_Sources)2;
if (GameManager.options.locomotion_useArtificial && GameManager.options.locomotion_jumpingEnabled && ___a_jump.GetState(val))
{
___character.TryJump();
}
}
}
}