Decompiled source of MoreMoneyStart v3.0.1

FasterStart.dll

Decompiled 3 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Configuration;
using HarmonyLib;
using MoreMoneyStart.Patches;
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("FasterStart")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("FasterStart")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("1794c9e2-6213-4024-b55e-67f56da5b373")]
[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 MoreMoneyStart
{
	[BepInPlugin("299792458.MoreMoneyStart", "MoreMoneyStart", "3.0.0")]
	public class MoreMoneyStart : BaseUnityPlugin
	{
		private const string modGUID = "299792458.MoreMoneyStart";

		private const string modName = "MoreMoneyStart";

		private const string modVersion = "3.0.0";

		private readonly Harmony harmony = new Harmony("299792458.MoreMoneyStart");

		public ConfigEntry<int> startingAmount;

		public static MoreMoneyStart Instance;

		private void Awake()
		{
			if (!Object.op_Implicit((Object)(object)Instance))
			{
				Instance = this;
			}
			startingAmount = ((BaseUnityPlugin)this).Config.Bind<int>("Starting Amount Config", "Starting Amount", 1000, "The starting amount can be configured here");
			harmony.PatchAll(typeof(TimeOfDayAwakePatch));
		}
	}
}
namespace MoreMoneyStart.Patches
{
	[HarmonyPatch(typeof(TimeOfDay))]
	[HarmonyPatch("Awake")]
	public static class TimeOfDayAwakePatch
	{
		private static void Postfix(TimeOfDay __instance)
		{
			if (__instance.quotaVariables != null)
			{
				__instance.quotaVariables.startingCredits = MoreMoneyStart.Instance.startingAmount.Value;
			}
		}
	}
}