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 LethalSigma.Patches;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("LethalSigma")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("LethalSigma")]
[assembly: AssemblyCopyright("Copyright © 2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("d4d358b1-fb4c-4212-b3c8-0e7f7091b09d")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace LethalSigma
{
[BepInPlugin("Maciupek.Sigma", "Lethal Sigma", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
private const string modGUID = "Maciupek.Sigma";
private const string modName = "Lethal Sigma";
private const string modVer = "1.0.0";
private readonly Harmony harmony = new Harmony("Maciupek.Sigma");
public ConfigEntry<int> startingAmount;
public static Plugin Instance;
private void Awake()
{
if (!(bool)(object)Instance)
{
Instance = this;
}
startingAmount = ((BaseUnityPlugin)this).Config.Bind<int>("Starting Amount Config", "Starting Amount", 2137420, "The starting amount can be configured here");
harmony.PatchAll(typeof(TimeOfDayAwakePatch));
}
}
}
namespace LethalSigma.Patches
{
[HarmonyPatch(typeof(TimeOfDay))]
[HarmonyPatch("Awake")]
public static class TimeOfDayAwakePatch
{
private static void Postfix(TimeOfDay __instance)
{
if (__instance.quotaVariables != null)
{
__instance.quotaVariables.startingCredits = Plugin.Instance.startingAmount.Value;
}
}
}
}