using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using Il2CppRUMBLE.Environment.Matchmaking;
using Il2CppRUMBLE.Interactions.InteractionBase;
using MatchmakingShortcut;
using MelonLoader;
using RumbleModdingAPI;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: MelonInfo(typeof(MatchmakingShortcutClass), "Matchmaking Shortcut", "1.1.0", "Tortaneose", null)]
[assembly: MelonGame("Buckethead Entertainment", "RUMBLE")]
[assembly: AssemblyTitle("MatchmakingShortcut")]
[assembly: AssemblyDescription("Toggle matchmaking by pressing A and B.")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Tortaneose")]
[assembly: AssemblyProduct("MatchmakingShortcut")]
[assembly: AssemblyCopyright("Copyright © 2024")]
[assembly: AssemblyTrademark("")]
[assembly: MelonColor(255, 0, 255, 0)]
[assembly: MelonAuthorColor(255, 0, 255, 0)]
[assembly: ComVisible(false)]
[assembly: Guid("0d2b09e8-ee66-47cf-843f-22078501b87b")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace MatchmakingShortcut;
public class MatchmakingShortcutClass : MelonMod
{
private string currentScene;
private bool ABdown;
private int intOnOrOff;
public override void OnSceneWasLoaded(int buildIndex, string sceneName)
{
currentScene = sceneName;
}
public override void OnFixedUpdate()
{
if (!(currentScene == "Gym"))
{
return;
}
if ((double)RightController.GetSecondary() > 0.9 && (double)RightController.GetPrimary() > 0.9)
{
if (!ABdown)
{
ABdown = true;
intOnOrOff = 1 - ((InteractionNumericalBase)((Component)ConsoleInteractionLever.GetGameObject().transform.GetChild(2).GetChild(0)).GetComponent<InteractionLever>()).snappedStep;
ConsoleInteractionLever.GetGameObject().GetComponent<MatchmakingLever>().SetLeverStep(intOnOrOff, false);
}
}
else
{
ABdown = false;
}
}
}