Decompiled source of MimicKoreanPatch v1.0.3

MimicKoreanPatch.dll

Decompiled 11 months ago
using System;
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 Microsoft.CodeAnalysis;
using Mimics;
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("RadiationIsCool")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("RadiationIsCool")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("8ee335db-0cbe-470c-8fbc-69263f01b35a")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
[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 MimicKoreanPatch
{
	[HarmonyPatch(typeof(StartOfRound))]
	internal class StartOfRoundPatch
	{
		public static float spawnDelayTimer;

		[HarmonyPostfix]
		[HarmonyPatch("LateUpdate")]
		private static void LateUpdate_Postfix()
		{
			spawnDelayTimer += Time.deltaTime;
			if (!(spawnDelayTimer > 5f))
			{
				return;
			}
			MimicDoor[] array = Object.FindObjectsOfType<MimicDoor>();
			MimicDoor[] array2 = array;
			foreach (MimicDoor val in array2)
			{
				if ((Object)(object)val.interactTrigger != (Object)null)
				{
					if (val.interactTrigger.hoverTip == "Feed : [LMB]")
					{
						val.interactTrigger.hoverTip = "먹히기 : [LMB]";
					}
					if (val.interactTrigger.holdTip == "Feed : [LMB]")
					{
						val.interactTrigger.holdTip = "먹히기 : [LMB]";
					}
					if (val.interactTrigger.hoverTip == "Exit : [LMB]")
					{
						val.interactTrigger.hoverTip = "나가기 : [LMB]";
					}
					if (val.interactTrigger.holdTip == "Exit : [LMB]")
					{
						val.interactTrigger.holdTip = "나가기 : [LMB]";
					}
					if (val.interactTrigger.holdTip == "DIE : [LMB]")
					{
						val.interactTrigger.holdTip = "죽기 : [LMB]";
					}
					if (val.interactTrigger.hoverTip == "Exit : [LMB]")
					{
						val.interactTrigger.holdTip = "나가기 : [LMB]";
					}
				}
				else
				{
					Debug.LogError((object)(((Object)val).name + " doesnt have InteractTrigger"));
				}
			}
		}
	}
	[BepInPlugin("Piggy3590.MimicKoreanPatch", "MimicKoreanPatch", "1.0.0")]
	public class MimicKoreanPatchModBase : BaseUnityPlugin
	{
		private const string modGUID = "Piggy3590.MimicKoreanPatch";

		private const string modName = "MimicKoreanPatch";

		private const string modVersion = "1.0.0";

		private readonly Harmony harmony = new Harmony("Piggy3590.MimicKoreanPatch");

		private static MimicKoreanPatchModBase Instance;

		internal ManualLogSource mls;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			mls = Logger.CreateLogSource("Piggy3590.MimicKoreanPatch");
			mls.LogInfo((object)"Mimic Korean Patch is loaded");
			harmony.PatchAll(typeof(MimicKoreanPatchModBase));
			harmony.PatchAll(typeof(StartOfRoundPatch));
		}
	}
}