Decompiled source of Hellomod v1.0.1

Hellomod.dll

Decompiled a year 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 HarmonyLib;
using Hellomod.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("Hellomod")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Hellomod")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("8eeb1681-8128-4f5a-a2a1-7d5490e8876f")]
[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 Hellomod
{
	[BepInPlugin("Umpulumpa.Hellomod", "Hellomod", "1.0.0.0")]
	public class Hellomod : BaseUnityPlugin
	{
		private const string modGUID = "Umpulumpa.Hellomod";

		private const string modName = "Hellomod";

		private const string modVersion = "1.0.0.0";

		private readonly Harmony harmony = new Harmony("Umpulumpa.Hellomod");

		private static Hellomod Instance;

		internal ManualLogSource mls;

		internal static AudioClip[] newSFX;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			mls = Logger.CreateLogSource("Umpulumpa.Hellomod");
			string location = ((BaseUnityPlugin)Instance).Info.Location;
			string text = "Hellomod.dll";
			string text2 = location.TrimEnd(text.ToCharArray());
			string text3 = text2 + "hellosound";
			AssetBundle val = AssetBundle.LoadFromFile(text3);
			newSFX = val.LoadAssetWithSubAssets<AudioClip>("assets/hello.mp3");
			harmony.PatchAll(typeof(HoarderBugPatch));
			mls.LogInfo((object)"Hellomod has awoken");
		}
	}
}
namespace Hellomod.Patches
{
	[HarmonyPatch(typeof(HoarderBugAI))]
	internal class HoarderBugPatch
	{
		[HarmonyPatch("Start")]
		[HarmonyPostfix]
		public static void hoarderBugAudioPatch(ref AudioClip[] ___chitterSFX)
		{
			AudioClip[] newSFX = Hellomod.newSFX;
			___chitterSFX = newSFX;
		}
	}
}