Decompiled source of HelloTurtleModByewe v1.0.0

HelloTurtleMineByEwe/HelloTurtleModByEwe.dll

Decompiled 10 months ago
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using HelloTurtleModByEwe.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("HelloTurtleModByEwe")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("HelloTurtleModByEwe")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("c238fb92-5f51-42ab-a822-1b6cdddbbcab")]
[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 HelloTurtleModByEwe
{
	[BepInPlugin("Ewe.GelloTurtleMod", "Hello Turtle Mod By ewe", "1.0.0.0")]
	public class HelloTurtleModBase : BaseUnityPlugin
	{
		private const string modGUID = "Ewe.GelloTurtleMod";

		private const string modName = "Hello Turtle Mod By ewe";

		private const string modVersion = "1.0.0.0";

		private readonly Harmony harmony = new Harmony("Ewe.GelloTurtleMod");

		private static HelloTurtleModBase Instance;

		internal ManualLogSource mls;

		internal static List<AudioClip> SoundFX;

		internal static AssetBundle bundle;

		private void Awake()
		{
			if (!Object.op_Implicit((Object)(object)Instance))
			{
				Instance = this;
			}
			mls = Logger.CreateLogSource("Ewe.GelloTurtleMod");
			mls.LogInfo((object)":3");
			harmony.PatchAll(typeof(HelloTurtleModBase));
			harmony.PatchAll(typeof(MinePatch));
			SoundFX = new List<AudioClip>();
			string location = ((BaseUnityPlugin)Instance).Info.Location;
			location = location.TrimEnd("HelloTurtleModByEwe.dll".ToCharArray());
			bundle = AssetBundle.LoadFromFile(location + "turtlemineassets");
			mls.LogInfo((object)location);
			if (Object.op_Implicit((Object)(object)bundle))
			{
				SoundFX = bundle.LoadAllAssets<AudioClip>().ToList();
			}
			else
			{
				mls.LogError((object)"Failed To Load Assets");
			}
		}
	}
}
namespace HelloTurtleModByEwe.Patches
{
	[HarmonyPatch(typeof(Landmine))]
	internal class MinePatch
	{
		[HarmonyPatch("Start")]
		[HarmonyPostfix]
		private static void ChangeMineMeshPatch(ref Landmine __instance)
		{
			__instance.minePress = HelloTurtleModBase.SoundFX[0];
		}
	}
}