Decompiled source of MoneyBoost v1.0.0

MoneyBooster/MoneyBooster.dll

Decompiled a year ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
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("SolarBooster")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SolarBooster")]
[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: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace SolarMoneyBooster;

[BepInPlugin("Solar.Money", "SolarMoneyBooster", "1.0.0")]
public class MoreMoneyStart : BaseUnityPlugin
{
	[HarmonyPatch(typeof(TimeOfDay))]
	[HarmonyPatch("Awake")]
	public static class TimeOfDayAwakePatch
	{
		private static void Postfix(TimeOfDay __instance)
		{
			if (__instance.quotaVariables != null)
			{
				__instance.quotaVariables.startingCredits = Instance.startingAmount.Value;
			}
		}
	}

	private const string modGUID = "Solar.Money";

	private const string modName = "SolarMoneyBooster";

	private const string modVersion = "1.0.0";

	private readonly Harmony harmony = new Harmony("Solar.Money");

	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>("Credit Amoount", "Credits", 120, "Edit Credits Here");
		harmony.PatchAll(typeof(TimeOfDayAwakePatch));
	}
}