Decompiled source of Corrupt Forge v0.1.0

BepInEx/plugins/com.binbin.CorruptForge.dll

Decompiled 2 days ago
using System;
using System.Diagnostics;
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;
using Obeliskial_Essentials;

[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.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("com.binbin.CorruptForge")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("0.1.0.0")]
[assembly: AssemblyInformationalVersion("0.1.0+bf07a1959015dbb294b59bc6497d536496f82607")]
[assembly: AssemblyProduct("CorruptForge")]
[assembly: AssemblyTitle("com.binbin.CorruptForge")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.1.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 CorruptForge
{
	[BepInPlugin("com.binbin.CorruptForge", "CorruptForge", "0.1.0")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInProcess("AcrossTheObelisk.exe")]
	public class Plugin : BaseUnityPlugin
	{
		internal int ModDate = int.Parse(DateTime.Today.ToString("yyyyMMdd"));

		private readonly Harmony harmony = new Harmony("com.binbin.CorruptForge");

		internal static ManualLogSource Log;

		public static string debugBase = "com.binbin.CorruptForge ";

		public static ConfigEntry<bool> EnableMod { get; set; }

		public static ConfigEntry<bool> EnableDebugging { get; set; }

		private void Awake()
		{
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_003d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0047: Expected O, but got Unknown
			//IL_0047: Expected O, but got Unknown
			//IL_005d: Unknown result type (might be due to invalid IL or missing references)
			//IL_006e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0078: Expected O, but got Unknown
			//IL_0078: Expected O, but got Unknown
			Log = ((BaseUnityPlugin)this).Logger;
			Log.LogInfo((object)"com.binbin.CorruptForge 0.1.0 has loaded!");
			EnableMod = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("CorruptForge", "EnableMod"), true, new ConfigDescription("Enables the mod. If false, the mod will not work then next time you load the game.", (AcceptableValueBase)null, Array.Empty<object>()));
			EnableDebugging = ((BaseUnityPlugin)this).Config.Bind<bool>(new ConfigDefinition("CorruptForge", "EnableDebugging"), true, new ConfigDescription("Enables the debugging", (AcceptableValueBase)null, Array.Empty<object>()));
			Essentials.RegisterMod("CorruptForge", "binbin", "Lets you corrupt items at the sacred forge", "0.1.0", ModDate, "https://github.com/binbinmods/CorruptForge", (string[])null, "CorruptForge", 100, (string[])null, "", true);
			if (EnableMod.Value)
			{
				harmony.PatchAll();
			}
		}

		internal static void LogDebug(string msg)
		{
			if (EnableDebugging.Value)
			{
				Log.LogDebug((object)(debugBase + msg));
			}
		}

		internal static void LogInfo(string msg)
		{
			Log.LogInfo((object)(debugBase + msg));
		}

		internal static void LogError(string msg)
		{
			Log.LogError((object)(debugBase + msg));
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "com.binbin.CorruptForge";

		public const string PLUGIN_NAME = "CorruptForge";

		public const string PLUGIN_VERSION = "0.1.0";
	}
}