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.Logging;
using Client.Player.Interactions;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using UI.Popup;
using UnityEngine;
using VoidManager;
using VoidManager.MPModChecks;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyCompany("IKnowWhatImDoing")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Skips all confirmation popups")]
[assembly: AssemblyFileVersion("0.0.1.0")]
[assembly: AssemblyInformationalVersion("0.0.1+9ed76f89fff392aa4c359f72af65ca6b446f722a")]
[assembly: AssemblyProduct("IKnowWhatImDoing")]
[assembly: AssemblyTitle("Skips all confirmation popups. Client Side.")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.0.1.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 IKnowWhatImDoing
{
[BepInPlugin("18107.IKnowWhatImDoing", "I Know What I'm Doing", "0.0.1")]
[BepInProcess("Void Crew.exe")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class BepinPlugin : BaseUnityPlugin
{
internal static ManualLogSource Log;
private void Awake()
{
Log = ((BaseUnityPlugin)this).Logger;
Harmony.CreateAndPatchAll(Assembly.GetExecutingAssembly(), "18107.IKnowWhatImDoing");
((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin 18107.IKnowWhatImDoing is loaded!");
}
}
[HarmonyPatch(typeof(ConfirmPopup))]
internal class ConfirmPopupPatch
{
private static readonly MethodInfo ConfirmedMethod = AccessTools.Method(typeof(ConfirmPopup), "Confirmed", (Type[])null, (Type[])null);
[HarmonyPostfix]
[HarmonyPatch("Show", new Type[]
{
typeof(string),
typeof(string),
typeof(Action),
typeof(Action),
typeof(Sprite)
})]
private static void Show1(ConfirmPopup __instance)
{
ConfirmedMethod.Invoke(__instance, null);
}
[HarmonyPostfix]
[HarmonyPatch("Show", new Type[]
{
typeof(ContextInfo),
typeof(Action),
typeof(Action),
typeof(Sprite)
})]
private static void Show2(ConfirmPopup __instance)
{
ConfirmedMethod.Invoke(__instance, null);
}
}
public class MyPluginInfo
{
public const string PLUGIN_GUID = "18107.IKnowWhatImDoing";
public const string PLUGIN_NAME = "IKnowWhatImDoing";
public const string USERS_PLUGIN_NAME = "I Know What I'm Doing";
public const string PLUGIN_VERSION = "0.0.1";
public const string PLUGIN_DESCRIPTION = "Skips all confirmation popups. Client Side.";
public const string PLUGIN_ORIGINAL_AUTHOR = "18107";
public const string PLUGIN_AUTHORS = "18107";
public const string PLUGIN_THUNDERSTORE_ID = "VoidCrewModdingTeam/I_Know_What_Im_Doing";
}
public class VoidManagerPlugin : VoidPlugin
{
public override MultiplayerType MPType => (MultiplayerType)8;
public override string Author => "18107";
public override string Description => "Skips all confirmation popups. Client Side.";
public override string ThunderstoreID => "VoidCrewModdingTeam/I_Know_What_Im_Doing";
}
}