Decompiled source of MenuSkipper v0.1.2

Mods/MenuSkipper.dll

Decompiled a month ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using Il2CppSystem;
using Il2CppSystem.Collections.Generic;
using MelonLoader;
using MenuSkipper;
using SLZ.Bonelab;
using SLZ.Marrow.Warehouse;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("MenuSkipper")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany(null)]
[assembly: AssemblyProduct("MenuSkipper")]
[assembly: AssemblyCopyright("Created by timmie")]
[assembly: AssemblyTrademark(null)]
[assembly: ComVisible(false)]
[assembly: AssemblyFileVersion("0.1.1")]
[assembly: NeutralResourcesLanguage("en")]
[assembly: MelonInfo(typeof(global::MenuSkipper.MenuSkipper), "MenuSkipper", "0.1.1", "timmie", null)]
[assembly: MelonGame(null, null)]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("0.1.1.0")]
namespace MenuSkipper;

public static class BuildInfo
{
	public const string Name = "MenuSkipper";

	public const string Author = "timmie";

	public const string Company = null;

	public const string Version = "0.1.1";

	public const string DownloadLink = null;
}
public class MenuSkipper : MelonMod
{
	public override void OnSceneWasInitialized(int buildindex, string sceneName)
	{
		if (sceneName.ToUpper().Contains("BOOTSTRAP"))
		{
			AssetWarehouse.OnReady(Action.op_Implicit((Action)WarehouseReady));
		}
	}

	private void WarehouseReady()
	{
		//IL_0047: Unknown result type (might be due to invalid IL or missing references)
		//IL_0051: Expected O, but got Unknown
		//IL_005e: Unknown result type (might be due to invalid IL or missing references)
		//IL_0068: Expected O, but got Unknown
		SceneBootstrapper_Bonelab val = Object.FindObjectOfType<SceneBootstrapper_Bonelab>();
		List<Crate> crates = AssetWarehouse.Instance.GetCrates();
		Enumerator<Crate> enumerator = crates.GetEnumerator();
		while (enumerator.MoveNext())
		{
			Crate current = enumerator.Current;
			if (((Scannable)current).Title.Contains("BONELAB Hub"))
			{
				val.VoidG114CrateRef = new LevelCrateReference(((Scannable)current).Barcode.ID);
				val.MenuHollowCrateRef = new LevelCrateReference(((Scannable)current).Barcode.ID);
			}
		}
	}
}