Decompiled source of MatchmakingShortcut v1.0.0

Mods/MatchmakingShortcutMod.dll

Decompiled 2 years ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using Il2CppRUMBLE.Environment.Matchmaking;
using MatchmakingShortcutMod;
using MelonLoader;
using RumbleModdingAPI;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: MelonInfo(typeof(MatchmakingShortcutModClass), "Matchmaking Shortcut Mod", "1.0.0", "Tortaneose", null)]
[assembly: MelonGame("Buckethead Entertainment", "RUMBLE")]
[assembly: AssemblyTitle("MatchmakingShortcutMod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MatchmakingShortcutMod")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[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 MatchmakingShortcutMod;

public class MatchmakingShortcutModClass : MelonMod
{
	private string currentScene;

	private bool ABdown;

	private bool toggled;

	private int intOnOrOff;

	private bool boolOnOrOff = true;

	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 = (boolOnOrOff ? 1 : 0);
				ConsoleInteractionLever.GetGameObject().GetComponent<MatchmakingLever>().SetLeverStep(intOnOrOff, false);
				boolOnOrOff = !boolOnOrOff;
			}
		}
		else
		{
			ABdown = false;
		}
	}
}