Decompiled source of Max Credits v1.0.0

plugins/MaxCredits.dll

Decompiled 3 weeks ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
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("MaxCredits")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MaxCredits")]
[assembly: AssemblyCopyright("Copyright ©  2026")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("79dfb0e6-452d-45f4-9402-b46e307a95ed")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8.1", FrameworkDisplayName = ".NET Framework 4.8.1")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace MaxCredits
{
	[BepInPlugin("nachariah.whiteknuckle.maxcredits", "MaxCredits", "1.0.0")]
	public class PLugin : BaseUnityPlugin
	{
		public const string pluginGuid = "nachariah.whiteknuckle.maxcredits";

		private void Awake()
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001d: Expected O, but got Unknown
			((BaseUnityPlugin)this).Logger.LogInfo((object)"[MaxCredits] Loaded");
			Harmony val = new Harmony("whiteknuckle.maxcredits");
			val.PatchAll();
		}
	}
}
namespace MaxCredits.Patches
{
	[HarmonyPatch(typeof(CL_GameManager), "Start")]
	public class AddRoaches
	{
		[HarmonyPostfix]
		public static void Postfix(CL_GameManager __instance)
		{
			string gamemodeName = CL_GameManager.GetCurrentGamemode().GetGamemodeName(true);
			if (gamemodeName.Contains("-Competitive") || gamemodeName.Contains("-Iron") || gamemodeName.Contains("Playground") || gamemodeName.Contains("Advanced Course") || gamemodeName.Contains("Fractured Territory") || gamemodeName.Contains("Roach Run") || gamemodeName.Contains("Comms Array") || gamemodeName.Contains("Shuttered Rift") || gamemodeName.Contains("Boost Course"))
			{
				Debug.Log((object)("[MaxCredits] Flagged Gamemode: " + gamemodeName));
				return;
			}
			Debug.Log((object)"[MaxCredits] Maxing Credits");
			CL_GameManager.SetRoaches(10019, true);
		}
	}
}