Decompiled source of meta credit mod v1.0.0

BepInEx/plugins/MetaCreditMod/metaCreditMod.dll

Decompiled 7 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using UnityEngine;
using serverFix.Patches;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("serverFix")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("serverFix")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("31373781-829d-4732-b4da-b5cc85145611")]
[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 serverFix
{
	[BepInPlugin("Inclustered.metaCreditMod", "MetaCreditMod", "1.0.0")]
	public class modBase : BaseUnityPlugin
	{
		private const string modGUID = "Inclustered.metaCreditMod";

		private const string modName = "MetaCreditMod";

		private const string modVersion = "1.0.0";

		private readonly Harmony harmony = new Harmony("Inclustered.metaCreditMod");

		private static modBase Instance;

		internal ManualLogSource mls;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			mls = Logger.CreateLogSource("Inclustered.metaCreditMod");
			mls.LogInfo((object)"Mod worked, bismillah");
			harmony.PatchAll(typeof(modBase));
			harmony.PatchAll(typeof(metaCoin));
		}
	}
}
namespace serverFix.Patches
{
	[HarmonyPatch(typeof(MetaProgressionHandler))]
	internal class metaCoin
	{
		private static bool hasTriggered;

		[HarmonyPrefix]
		[HarmonyPatch("CanAffordPurchase")]
		private static void prefix()
		{
			if (!hasTriggered)
			{
				MetaProgressionHandler.AddMetaCoins(10000);
			}
			hasTriggered = true;
		}
	}
}