Decompiled source of Antigravity MK Fusion Layer v1.0.1

Mods/MarioKart.dll

Decompiled 3 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BoneLib.BoneMenu;
using GravityKart;
using MarioKart;
using MelonLoader;
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(global::MarioKart.MarioKart), "MarioKart", "1.0.0", "Astra463", null)]
[assembly: MelonGame("Stress Level Zero", "BONELAB")]
[assembly: AssemblyTitle("MarioKart")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MarioKart")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("d50e1338-c8a1-4d6f-b1eb-bc5db0d4a65c")]
[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 MarioKart;

public class MarioKart : MelonMod
{
	private Vector3 gVector = new Vector3(0f, -9.81f, 0f);

	private bool isMultiplayer = false;

	public override void OnInitializeMelon()
	{
		BoneMenuSetup();
	}

	private void BoneMenuSetup()
	{
		//IL_000b: Unknown result type (might be due to invalid IL or missing references)
		//IL_001e: Unknown result type (might be due to invalid IL or missing references)
		Page val = Page.Root.CreatePage("Mario Kart", Color.red, 8, true);
		val.CreateBool("Multiplayer", Color.white, false, (Action<bool>)delegate(bool temp)
		{
			isMultiplayer = temp;
		});
	}

	public override void OnLateUpdate()
	{
		//IL_000d: Unknown result type (might be due to invalid IL or missing references)
		if (isMultiplayer)
		{
			Physics.gravity = gVector;
			{
				foreach (GoKartMono goKart in GravityKart.goKarts)
				{
					((Behaviour)goKart).enabled = true;
				}
				return;
			}
		}
		foreach (GoKartMono goKart2 in GravityKart.goKarts)
		{
			((Behaviour)goKart2).enabled = false;
		}
	}
}