Decompiled source of Consistency v1.0.2

BepInEx/plugins/Consistency.dll

Decompiled 4 months 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 HarmonyLib;
using Microsoft.CodeAnalysis;
using Paradox;
using UnityEngine;

[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.stiffmeds.consistency")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Disables all in-game Paradox integration.")]
[assembly: AssemblyFileVersion("1.0.2.0")]
[assembly: AssemblyInformationalVersion("1.0.2")]
[assembly: AssemblyProduct("Consistency")]
[assembly: AssemblyTitle("com.stiffmeds.consistency")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.2.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 Consistency
{
	[BepInPlugin("com.stiffmeds.consistency", "Consistency", "1.0.2")]
	[BepInProcess("AcrossTheObelisk.exe")]
	public class Plugin : BaseUnityPlugin
	{
		internal const int ModDate = 20240117;

		private readonly Harmony harmony = new Harmony("com.stiffmeds.consistency");

		private void Awake()
		{
			((BaseUnityPlugin)this).Logger.LogInfo((object)"com.stiffmeds.consistency 1.0.2 is loaded!");
			harmony.PatchAll();
		}
	}
	[HarmonyPatch]
	internal class Patches
	{
		[HarmonyPrefix]
		[HarmonyPatch(typeof(MainMenuManager), "CreatePDXDropdowns")]
		public static bool CreatePDXDropdownsPrefix(ref MainMenuManager __instance)
		{
			__instance.ResetPDXScreens();
			((Component)__instance.paradoxT).gameObject.SetActive(false);
			return false;
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(MainMenuManager), "ShowPDXPreLogin")]
		public static bool ShowPDXPreLoginPrefix(ref MainMenuManager __instance)
		{
			__instance.ResetPDXScreens();
			((Component)__instance.paradoxT).gameObject.SetActive(false);
			return false;
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(MainMenuManager), "ShowPDXLogin")]
		public static bool ShowPDXLoginPrefix(ref MainMenuManager __instance)
		{
			__instance.ResetPDXScreens();
			((Component)__instance.paradoxT).gameObject.SetActive(false);
			return false;
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(MainMenuManager), "ShowPDXLogged")]
		public static bool ShowPDXLoggedPrefix(ref MainMenuManager __instance)
		{
			__instance.ResetPDXScreens();
			((Component)__instance.paradoxT).gameObject.SetActive(false);
			return false;
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(Startup), "ShowDocumentFromStartup")]
		public static bool ShowDocumentFromStartupPrefix()
		{
			Startup.waitingForLoginDocuments = false;
			((Component)MainMenuManager.Instance.paradoxDocumentPopup).gameObject.SetActive(false);
			return false;
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(Telemetry), "SendStartGame")]
		public static bool SendStartGamePrefix()
		{
			return false;
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(Telemetry), "SendPlaysessionStart")]
		public static bool SendPlaysessionStartPrefix()
		{
			return false;
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(Telemetry), "SendPlaysessionEnd")]
		public static bool SendPlaysessionEndPrefix()
		{
			return false;
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(Telemetry), "SendActStart")]
		public static bool SendActStartPrefix()
		{
			return false;
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(Telemetry), "SendUnlock")]
		public static bool SendUnlockPrefix()
		{
			return false;
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "com.stiffmeds.consistency";

		public const string PLUGIN_NAME = "Consistency";

		public const string PLUGIN_VERSION = "1.0.2";
	}
}