Decompiled source of PasteFromClipboard v1.0.1

PasteFromClipboard.dll

Decompiled 7 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using TMPro;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: AssemblyTitle("PasteFromClipboard")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Azumatt")]
[assembly: AssemblyProduct("PasteFromClipboard")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("17BF1A93-851C-42D3-8768-C6FE6CFDCAE4")]
[assembly: AssemblyFileVersion("1.0.1")]
[assembly: TargetFramework(".NETFramework,Version=v4.6.2", FrameworkDisplayName = ".NET Framework 4.6.2")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.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 PasteFromClipboard
{
	[HarmonyPatch(typeof(PlayerCustomizer), "RunTerminal")]
	internal static class PlayerCustomizerUpdatePatch
	{
		private static void Postfix(PlayerCustomizer __instance)
		{
			if (Input.GetKey((KeyCode)306) && Input.GetKeyDown((KeyCode)118))
			{
				string systemCopyBuffer = GUIUtility.systemCopyBuffer;
				((TMP_Text)__instance.faceText).text = systemCopyBuffer;
			}
		}
	}
	[BepInPlugin("Azumatt.PasteFromClipboard", "PasteFromClipboard", "1.0.1")]
	public class PasteFromClipboardPlugin : BaseUnityPlugin
	{
		internal const string ModName = "PasteFromClipboard";

		internal const string ModVersion = "1.0.1";

		internal const string Author = "Azumatt";

		private const string ModGUID = "Azumatt.PasteFromClipboard";

		private readonly Harmony _harmony = new Harmony("Azumatt.PasteFromClipboard");

		public static readonly ManualLogSource PasteFromClipboardLogger = Logger.CreateLogSource("PasteFromClipboard");

		private void Awake()
		{
			_harmony.PatchAll();
		}
	}
}