Decompiled source of SelectableStartDate v1.0.0

plugins/SelectableStartDate.dll

Decompiled 2 years ago
using System;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")]
[assembly: AssemblyCompany("SelectableStartDate")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("SelectableStartDate")]
[assembly: AssemblyTitle("SelectableStartDate")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
namespace PromotionEditorUnlock
{
	[BepInPlugin("GeeEm.WrestlingEmpire.SelectableStartDate", "SelectableStartDate", "1.0.0")]
	[HarmonyPatch]
	public class Plugin : BaseUnityPlugin
	{
		[HarmonyPatch(typeof(Progress))]
		public static class ProgressPatch
		{
			[HarmonyPrefix]
			[HarmonyPatch("ICNGJHENMEN")]
			public static bool Progress_ICNGJHENMEN_Patch(ref int __result, int BAOKKKGPCHF, int FMKCNPHBDME)
			{
				__result = StartDate.Value;
				return false;
			}
		}

		public const string PluginGuid = "GeeEm.WrestlingEmpire.SelectableStartDate";

		public const string PluginName = "SelectableStartDate";

		public const string PluginVer = "1.0.0";

		internal static ManualLogSource Log;

		internal static readonly Harmony Harmony = new Harmony("GeeEm.WrestlingEmpire.SelectableStartDate");

		internal static string PluginPath;

		public static ConfigEntry<int> StartDate;

		private void Awake()
		{
			Log = ((BaseUnityPlugin)this).Logger;
			PluginPath = Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location);
			StartDate = ((BaseUnityPlugin)this).Config.Bind<int>("General", "Starting week", 1, "New starting week number (1-48).");
		}

		private void OnEnable()
		{
			Harmony.PatchAll();
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded SelectableStartDate!");
		}

		private void OnDisable()
		{
			Harmony.UnpatchSelf();
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Unloaded SelectableStartDate!");
		}
	}
}