Decompiled source of Money Laundering Speed Booster v1.1.0

The_Laundering_Master.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 Il2CppScheduleOne.Property;
using Il2CppSystem.Collections.Generic;
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(LaunderMaster), "The_Launder_Master", "1.0.7", "pitbikes_", null)]
[assembly: MelonGame("TVGS", "Schedule I")]
[assembly: AssemblyTitle("The_Laundering_Master")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("The_Laundering_Master")]
[assembly: AssemblyCopyright("Copyright ©  2025")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("fccfcb61-27e3-413f-a666-56e27df6b0b5")]
[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")]
public class LaunderMaster : MelonMod
{
	public override void OnUpdate()
	{
		if (Input.GetKeyDown((KeyCode)288))
		{
			ForceAllOperations2Minutes();
		}
		if (Input.GetKeyDown((KeyCode)289))
		{
			CompleteAllOperationsInstantly();
		}
	}

	private void ForceAllOperations2Minutes()
	{
		try
		{
			if (Business.OwnedBusinesses == null)
			{
				MelonLogger.Warning("No owned businesses found.");
				return;
			}
			Enumerator<Business> enumerator = Business.OwnedBusinesses.GetEnumerator();
			while (enumerator.MoveNext())
			{
				Business current = enumerator.Current;
				if ((Object)(object)current == (Object)null || current.LaunderingOperations == null)
				{
					continue;
				}
				Enumerator<LaunderingOperation> enumerator2 = current.LaunderingOperations.GetEnumerator();
				while (enumerator2.MoveNext())
				{
					LaunderingOperation current2 = enumerator2.Current;
					if (current2 != null)
					{
						try
						{
							current2.completionTime_Minutes = current2.minutesSinceStarted + 120;
						}
						catch (Exception arg)
						{
							MelonLogger.Error($"Error setting 2-minute timer for operation: {arg}\n" + "DM pitbikes_ on Discord with this error.");
						}
					}
				}
			}
			MelonLogger.Msg("All current laundering operations will finish in ~2 real minutes (120 in-game minutes).");
		}
		catch (Exception arg2)
		{
			MelonLogger.Error($"Failed to force operations: {arg2}\nDM pitbikes_ on Discord with this error.");
		}
	}

	private void CompleteAllOperationsInstantly()
	{
		try
		{
			if (Business.OwnedBusinesses == null)
			{
				MelonLogger.Warning("No owned businesses found.");
				return;
			}
			Enumerator<Business> enumerator = Business.OwnedBusinesses.GetEnumerator();
			while (enumerator.MoveNext())
			{
				Business current = enumerator.Current;
				if ((Object)(object)current == (Object)null || current.LaunderingOperations == null)
				{
					continue;
				}
				Enumerator<LaunderingOperation> enumerator2 = current.LaunderingOperations.GetEnumerator();
				while (enumerator2.MoveNext())
				{
					LaunderingOperation current2 = enumerator2.Current;
					if (current2 != null)
					{
						try
						{
							current2.completionTime_Minutes = current2.minutesSinceStarted;
						}
						catch (Exception arg)
						{
							MelonLogger.Error($"Error instantly completing operation: {arg}\n" + "DM pitbikes_ on Discord with this error.");
						}
					}
				}
			}
			MelonLogger.Msg("All current laundering operations instantly completed!");
		}
		catch (Exception arg2)
		{
			MelonLogger.Error($"Failed to complete operations instantly: {arg2}\nDM pitbikes_ on Discord with this error.");
		}
	}
}