Decompiled source of RintaroBug v1.0.0

BepInEx/plugins/RintaroBug.dll

Decompiled 9 months ago
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using RintaroBug.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("RintaroBug")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("RintaroBug")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("76f1178e-156b-4075-b5bc-8faeeff7de51")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace RintaroBug
{
	[BepInPlugin("consequential.RintaroBug", "RintaroBug", "1.0.0")]
	public class RintaroBugBase : BaseUnityPlugin
	{
		private const string modGUID = "consequential.RintaroBug";

		private const string modName = "RintaroBug";

		private const string modVersion = "1.0.0";

		private readonly Harmony harmony = new Harmony("consequential.RintaroBug");

		private static RintaroBugBase Instance;

		internal ManualLogSource mls;

		internal static AudioClip[] newSFX;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			mls = Logger.CreateLogSource("RintaroBug");
			mls.LogInfo((object)"RintaroBug is loading...");
			Stream manifestResourceStream = Assembly.GetExecutingAssembly().GetManifestResourceStream("RintaroBug.Audio.rintaro_og_sound");
			AssetBundle val = AssetBundle.LoadFromStream(manifestResourceStream);
			if ((Object)(object)val == (Object)null)
			{
				mls.LogError((object)"Failed to load audio assets...");
				return;
			}
			newSFX = val.LoadAllAssets<AudioClip>();
			harmony.PatchAll(typeof(HoarderBugPatch));
			mls.LogInfo((object)"RintaroBug is loaded!");
		}
	}
}
namespace RintaroBug.Properties
{
	[GeneratedCode("System.Resources.Tools.StronglyTypedResourceBuilder", "17.0.0.0")]
	[DebuggerNonUserCode]
	[CompilerGenerated]
	internal class Resources
	{
		private static ResourceManager resourceMan;

		private static CultureInfo resourceCulture;

		[EditorBrowsable(EditorBrowsableState.Advanced)]
		internal static ResourceManager ResourceManager
		{
			get
			{
				if (resourceMan == null)
				{
					ResourceManager resourceManager = new ResourceManager("RintaroBug.Properties.Resources", typeof(Resources).Assembly);
					resourceMan = resourceManager;
				}
				return resourceMan;
			}
		}

		[EditorBrowsable(EditorBrowsableState.Advanced)]
		internal static CultureInfo Culture
		{
			get
			{
				return resourceCulture;
			}
			set
			{
				resourceCulture = value;
			}
		}

		internal Resources()
		{
		}
	}
}
namespace RintaroBug.Patches
{
	[HarmonyPatch(typeof(HoarderBugAI))]
	internal class HoarderBugPatch
	{
		[HarmonyPatch("Start")]
		[HarmonyPostfix]
		private static void HoarderBugAudioPatch(HoarderBugAI __instance)
		{
			AudioClip[] newSFX = RintaroBugBase.newSFX;
			__instance.chitterSFX = newSFX;
		}
	}
}