Decompiled source of EnableConsoleMine v1.0.0

EnableConsoleMine.dll

Decompiled 9 hours ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
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("EnableConsoleMine")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("EnableConsoleMine")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("4b7ed646-0184-4d14-86d4-615be9dff639")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace EnableConsoleMine;

[BepInPlugin("EnableConsoleMine", "(mod)EnableConsoleMine", "1.0.0.0")]
public class EnableConsoleMine : BaseUnityPlugin
{
	private static ManualLogSource logger;

	public void Awake()
	{
		((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin EnableConsoleMine is enabled.");
		logger = ((BaseUnityPlugin)this).Logger;
		Harmony.CreateAndPatchAll(typeof(EnableConsoleMine), (string)null);
	}

	[HarmonyPrefix]
	[HarmonyPatch(typeof(FejdStartup), "Awake")]
	private static void Prefix_FejdStartup_Awake()
	{
		Console.SetConsoleEnabled(true);
		Debug.Log((object)"Console has been enabled by EnableConsoleMine mod.");
		logger.LogInfo((object)"Console has been enabled by EnableConsoleMine mod.");
	}
}