Decompiled source of LethalMidgets v1.0.1

BepInEx/plugins/LethalMidgets.dll

Decompiled 7 months 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 GameNetcodeStuff;
using HarmonyLib;
using LethalMidgets.Patches;
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("LethalMidgets")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("LethalMidgets")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("113dcec8-bd6a-42c9-acea-31dc32cff7a7")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace LethalMidgets
{
	[BepInPlugin("NoahVanilla.LethalMidgets", "Lethal Midgets", "1.0.0.0")]
	public class MidgetsBase : BaseUnityPlugin
	{
		private const string modGUID = "NoahVanilla.LethalMidgets";

		private const string modName = "Lethal Midgets";

		private const string modVersion = "1.0.0.0";

		private readonly Harmony harmony = new Harmony("NoahVanilla.LethalMidgets");

		private static MidgetsBase Instance;

		internal ManualLogSource mls;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			mls = Logger.CreateLogSource("NoahVanilla.LethalMidgets");
			mls.LogInfo((object)"Hello World!");
			harmony.PatchAll(typeof(MidgetsBase));
			harmony.PatchAll(typeof(PlayerControllerBPatch));
		}
	}
}
namespace LethalMidgets.Patches
{
	[HarmonyPatch(typeof(PlayerControllerB))]
	internal class PlayerControllerBPatch
	{
		[HarmonyPatch("Update")]
		[HarmonyPostfix]
		private static void patchUpdate(ref Transform ___cameraContainerTransform)
		{
			//IL_004b: Unknown result type (might be due to invalid IL or missing references)
			Transform transform = ((Component)___cameraContainerTransform.parent).gameObject.transform;
			((Component)((Component)((Component)transform).gameObject.transform.parent).gameObject.transform.parent).gameObject.transform.localScale = new Vector3(0.5f, 0.5f, 0.5f);
		}
	}
}