Decompiled source of Lc Easy DOWLOAD v1.0.0

BepInEx/plugins/LC_EASY.dll

Decompiled 8 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 GameNetcodeStuff;
using HarmonyLib;
using LC_Money.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("LC_Money")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("LC_Money")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("89fec60a-4cf2-4801-b35d-2372eeb27ac4")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace LC_Money
{
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "MichStudios.Mods";

		public const string PLUGIN_NAME = "EasyMod";

		public const string PLUGIN_VERSION = "1.0.0";
	}
	[BepInPlugin("MichStudios.Mods", "EasyMod", "1.0.0")]
	public class Plugin : BaseUnityPlugin
	{
		internal static Harmony h = new Harmony("MichStudios.Mods");

		private void Awake()
		{
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Welcome to Mich's Studio! Libraries Of World");
			((BaseUnityPlugin)this).Logger.LogInfo((object)"InfHealth mod loaded successfully.");
			((BaseUnityPlugin)this).Logger.LogInfo((object)"InfMoney mod loaded successfully.");
			((BaseUnityPlugin)this).Logger.LogInfo((object)"These mods are licensed under the MIT License.");
			((BaseUnityPlugin)this).Logger.LogError((object)"Copyright (c) 2024 Mich (mich._.but._.china#0)\r\n\r\nPermission is hereby granted, free of charge, to any person obtaining\r\na copy of this software and associated documentation files (the\r\n\"Software\"), to deal in the Software without restriction, including\r\nwithout limitation the rights to use, copy, modify, merge, publish,\r\ndistribute, sublicense, and/or sell copies of the Software, and to\r\npermit persons to whom the Software is furnished to do so, subject to\r\nthe following conditions:\r\n\r\nThe above copyright notice and this permission notice shall be\r\nincluded in all copies or substantial portions of the Software.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\r\nEXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\r\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND\r\nNONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE\r\nLIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION\r\nOF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION\r\nWITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.");
			((BaseUnityPlugin)this).Logger.LogInfo((object)"For more information, please visit: https://opensource.org/licenses/MIT");
			((BaseUnityPlugin)this).Logger.LogInfo((object)"--------------------------------------------------");
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Mich's Studio reserves all rights to these mods.");
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Unauthorized distribution or modification is prohibited.");
			((BaseUnityPlugin)this).Logger.LogInfo((object)"For inquiries, contact us at discord: mich._.but._.china#0");
			try
			{
				h.PatchAll(typeof(TerminalPatches));
				h.PatchAll(typeof(InfHealthBase));
				h.PatchAll(typeof(NoMonsters));
				h.PatchAll(typeof(NoTurrets));
			}
			catch (Exception ex)
			{
				((BaseUnityPlugin)this).Logger.LogInfo((object)"Error loading MichStudios.Mods (Exception)");
				((BaseUnityPlugin)this).Logger.LogError((object)ex.Message);
				((BaseUnityPlugin)this).Logger.LogError((object)ex.StackTrace);
			}
		}
	}
}
namespace LC_Money.Patches
{
	[BepInPlugin("EasyMod-Plugin", "LC_Easy_Plugin", "1.0.0")]
	public class InfHealthBase : BaseUnityPlugin
	{
		private const string modGUID = "EasyMod-Plugin";

		private const string modName = "LC_Easy_Plugin";

		private const string modVersion = "1.0.0";

		private static InfHealthBase Instance;

		private void Awake()
		{
			//IL_001d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0023: Expected O, but got Unknown
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			Harmony val = new Harmony("EasyMod-Plugin");
			val.PatchAll(typeof(InfHealthBase));
			val.PatchAll(typeof(PlayerControllerBPatch));
		}
	}
	internal class PlayerControllerBPatch
	{
		[HarmonyPatch(typeof(PlayerControllerB))]
		[HarmonyPatch("Update")]
		[HarmonyPostfix]
		private static void InfinityHealthPatch(ref float ___health)
		{
			___health = 100f;
		}
	}
	internal static class NoMonstersPatches
	{
		private static readonly ManualLogSource Logger = Logger.CreateLogSource("NoMonsters");

		[HarmonyPatch(typeof(RoundManager), "LoadNewLevel")]
		[HarmonyPrefix]
		private static bool NoMonstersSpawn(ref SelectableLevel newLevel)
		{
			foreach (SpawnableEnemyWithRarity enemy in newLevel.Enemies)
			{
				enemy.rarity = 0;
			}
			foreach (SpawnableEnemyWithRarity outsideEnemy in newLevel.OutsideEnemies)
			{
				outsideEnemy.rarity = 0;
			}
			Logger.LogInfo((object)"Removed All Enemies");
			return true;
		}
	}
	[BepInPlugin("AngelMadeline.NoMonsters", "No Monsters", "1.0.0")]
	public class NoMonsters : BaseUnityPlugin
	{
		private const string modGUID = "AngelMadeline.NoMonsters";

		private const string modName = "EasyMod";

		private const string modVersion = "1.0.0";

		private readonly Harmony harmony = new Harmony("AngelMadeline.NoMonsters");

		private void Awake()
		{
			ManualLogSource val = Logger.CreateLogSource("EasyMod");
			val.LogInfo((object)"LC_Easy - NoMosters");
			harmony.PatchAll(typeof(NoMonstersPatches));
		}
	}
	[BepInPlugin("Uprank.NoTurretLaser", "No Turret Laser", "1.0.0.0")]
	public class NoTurrets : BaseUnityPlugin
	{
		private readonly Harmony harmony = new Harmony("Uprank.NoTurretLaser");

		private void Awake()
		{
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin No Turret Laser is loaded!");
			harmony.PatchAll(typeof(Plugin));
			harmony.PatchAll(typeof(TurretPatch));
		}
	}
	internal static class PluginInfo
	{
		public const string PLUGIN_GUID = "Uprank.NoTurretLaser";

		public const string PLUGIN_NAME = "No Turret Laser";

		public const string PLUGIN_VERSION = "1.0.0.0";
	}
	[HarmonyPatch(typeof(Turret))]
	internal class TurretPatch
	{
		[HarmonyPatch("Update")]
		[HarmonyPostfix]
		private static void DisableLaser(ref TurretMode ___turretMode, ref Animator ___turretAnimator)
		{
			if (___turretMode)
			{
				___turretAnimator.SetInteger("TurretMode", 0);
			}
		}
	}
	public static class TerminalPatches
	{
		[HarmonyPatch(typeof(Terminal), "RunTerminalEvents")]
		[HarmonyPostfix]
		private static void InfMoney(ref int ___groupCredits)
		{
			___groupCredits = 10000000;
		}
	}
}