using System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BoneLib; using BoneLib.BoneMenu; using Il2CppSLZ.Marrow.Data; using Il2CppSLZ.Marrow.Pool; using LabFusion.Entities; using LabFusion.Marrow.Pool; using LabFusion.RPC; using LabFusion.Scene; using MelonLoader; using Microsoft.CodeAnalysis; using MoneyLab; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: MelonInfo(typeof(MoneyLabMod), "MoneyLab", "1.0.0", "Codex", null)] [assembly: MelonGame("Stress Level Zero", "BONELAB")] [assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")] [assembly: AssemblyCompany("MoneyLab")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("MoneyLab")] [assembly: AssemblyTitle("MoneyLab")] [assembly: AssemblyVersion("1.0.0.0")] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace MoneyLab { public sealed class MoneyLabMod : MelonMod { private readonly struct MoneySpawnOption { public string MenuName { get; } public string Barcode { get; } public MoneyCategory Category { get; } public MoneySpawnOption(string menuName, string barcode, MoneyCategory category) { MenuName = menuName; Barcode = barcode; Category = category; } } private enum MoneyCategory { Bills, Bands, Coins, Extras } private const float SpawnDistance = 1.15f; private const float SpawnSpacing = 0.2f; private const int SpawnAllColumns = 6; private Page _rootPage; private static readonly MoneySpawnOption[] MoneySpawnOptions = new MoneySpawnOption[18] { new MoneySpawnOption("Spawn $1 Bill", "SuperAlexGAMERpro.SuperAlexsMoneyPack.Spawnable.OneDollarBill", MoneyCategory.Bills), new MoneySpawnOption("Spawn $5 Bill", "SuperAlexGAMERpro.SuperAlexsMoneyPack.Spawnable.FiveDollarBill", MoneyCategory.Bills), new MoneySpawnOption("Spawn $10 Bill", "SuperAlexGAMERpro.SuperAlexsMoneyPack.Spawnable.TenDollarBill", MoneyCategory.Bills), new MoneySpawnOption("Spawn $20 Bill", "SuperAlexGAMERpro.SuperAlexsMoneyPack.Spawnable.TwentyDollarBill", MoneyCategory.Bills), new MoneySpawnOption("Spawn $50 Bill", "SuperAlexGAMERpro.SuperAlexsMoneyPack.Spawnable.FiftyDollarBill", MoneyCategory.Bills), new MoneySpawnOption("Spawn $100 Bill", "SuperAlexGAMERpro.SuperAlexsMoneyPack.Spawnable.OneHundredDollarBill", MoneyCategory.Bills), new MoneySpawnOption("Spawn $1 Band", "SuperAlexGAMERpro.SuperAlexsMoneyPack.Spawnable.BandofOnes", MoneyCategory.Bands), new MoneySpawnOption("Spawn $5 Band", "SuperAlexGAMERpro.SuperAlexsMoneyPack.Spawnable.BandofFives", MoneyCategory.Bands), new MoneySpawnOption("Spawn $10 Band", "SuperAlexGAMERpro.SuperAlexsMoneyPack.Spawnable.BandofTens", MoneyCategory.Bands), new MoneySpawnOption("Spawn $20 Band", "SuperAlexGAMERpro.SuperAlexsMoneyPack.Spawnable.BandofTwenties", MoneyCategory.Bands), new MoneySpawnOption("Spawn $50 Band", "SuperAlexGAMERpro.SuperAlexsMoneyPack.Spawnable.BandofFifties", MoneyCategory.Bands), new MoneySpawnOption("Spawn $100 Band", "SuperAlexGAMERpro.SuperAlexsMoneyPack.Spawnable.BandofOneHundreds", MoneyCategory.Bands), new MoneySpawnOption("Spawn 1c Penny", "SuperAlexGAMERpro.SuperAlexsMoneyPack.Spawnable.Penny", MoneyCategory.Coins), new MoneySpawnOption("Spawn 5c Nickel", "SuperAlexGAMERpro.SuperAlexsMoneyPack.Spawnable.Nickel", MoneyCategory.Coins), new MoneySpawnOption("Spawn 10c Dime", "SuperAlexGAMERpro.SuperAlexsMoneyPack.Spawnable.Dime", MoneyCategory.Coins), new MoneySpawnOption("Spawn 25c Quarter", "SuperAlexGAMERpro.SuperAlexsMoneyPack.Spawnable.Quarter", MoneyCategory.Coins), new MoneySpawnOption("Spawn Credit Card", "SuperAlexGAMERpro.SuperAlexsMoneyPack.Spawnable.CreditCard", MoneyCategory.Extras), new MoneySpawnOption("Spawn Wallet", "SuperAlexGAMERpro.SuperAlexsMoneyPack.Spawnable.Wallet", MoneyCategory.Extras) }; public override void OnInitializeMelon() { SetupBoneMenu(); ((MelonBase)this).LoggerInstance.Msg("MoneyLab loaded."); } private void SetupBoneMenu() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) _rootPage = Page.Root.CreatePage("MoneyLab", Color.green, 0, true); _rootPage.CreateFunction("Spawn All Money", Color.yellow, (Action)SpawnAllMoney); Page billsPage = _rootPage.CreatePage("Bills", Color.green, 0, true); Page bandsPage = _rootPage.CreatePage("Bands", Color.green, 0, true); Page coinsPage = _rootPage.CreatePage("Coins", Color.green, 0, true); Page extrasPage = _rootPage.CreatePage("Extras", Color.green, 0, true); MoneySpawnOption[] moneySpawnOptions = MoneySpawnOptions; foreach (MoneySpawnOption moneySpawnOption in moneySpawnOptions) { MoneySpawnOption capturedOption = moneySpawnOption; GetCategoryPage(capturedOption.Category, billsPage, bandsPage, coinsPage, extrasPage).CreateFunction(capturedOption.MenuName, Color.white, (Action)delegate { SpawnMoney(capturedOption, 0, 1); }); } } private static Page GetCategoryPage(MoneyCategory category, Page billsPage, Page bandsPage, Page coinsPage, Page extrasPage) { return (Page)(category switch { MoneyCategory.Bills => billsPage, MoneyCategory.Bands => bandsPage, MoneyCategory.Coins => coinsPage, _ => extrasPage, }); } private void SpawnAllMoney() { for (int i = 0; i < MoneySpawnOptions.Length; i++) { SpawnMoney(MoneySpawnOptions[i], i, MoneySpawnOptions.Length); } } private void SpawnMoney(MoneySpawnOption option, int index, int total) { //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) try { Spawnable val = LocalAssetSpawner.CreateSpawnable(option.Barcode); GetSpawnTransform(index, total, out var position, out var rotation); if (NetworkSceneManager.IsLevelNetworked) { SpawnRequestInfo val2 = default(SpawnRequestInfo); val2.Spawnable = val; val2.Position = position; val2.Rotation = rotation; val2.SpawnEffect = true; val2.SpawnSource = (EntitySource)2; NetworkAssetSpawner.Spawn(val2); } else { LocalAssetSpawner.Register(val); LocalAssetSpawner.Spawn(val, position, rotation, (Action)null); } } catch (Exception ex) { ((MelonBase)this).LoggerInstance.Error("Could not spawn " + option.MenuName + ": " + ex.Message); } } private static void GetSpawnTransform(int index, int total, out Vector3 position, out Quaternion rotation) { //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004f: 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) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Unknown result type (might be due to invalid IL or missing references) Transform head = Player.Head; Transform val = (((Object)(object)Player.RigManager != (Object)null) ? ((Component)Player.RigManager).transform : null); Vector3 val2 = (((Object)(object)head != (Object)null) ? head.position : (((Object)(object)val != (Object)null) ? (val.position + Vector3.up * 1.5f) : Vector3.zero)); Vector3 val3 = (((Object)(object)head != (Object)null) ? head.forward : (((Object)(object)val != (Object)null) ? val.forward : Vector3.forward)); val3.y = 0f; if (((Vector3)(ref val3)).sqrMagnitude < 0.001f) { val3 = Vector3.forward; } ((Vector3)(ref val3)).Normalize(); Vector3 val4 = Vector3.Cross(Vector3.up, val3); Vector3 normalized = ((Vector3)(ref val4)).normalized; rotation = Quaternion.LookRotation(val3, Vector3.up); int num = ((total <= 1) ? 1 : Math.Min(6, total)); int num2 = index % num; int num3 = index / num; int num4 = Math.Min(num, total - num3 * num); float num5 = (float)num2 - (float)(num4 - 1) * 0.5f; position = val2 + val3 * (1.15f + (float)num3 * 0.2f) + normalized * (num5 * 0.2f) + Vector3.down * 0.12f; } } }