Decompiled source of Gutterman metal pipe fall sound v1.0.0

GuttermanSoundReplace.dll

Decompiled 11 months ago
using System.CodeDom.Compiler;
using System.ComponentModel;
using System.Diagnostics;
using System.Globalization;
using System.Reflection;
using System.Resources;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
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("GuttermanSoundReplace")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("GuttermanSoundReplace")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("75cbc352-b737-4b3f-826c-7a2a3ec67202")]
[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 GuttermanSoundReplace;

[BepInPlugin("org.xowt.gutterpipe", "Gutterman", "1.0.0")]
public class Plugin : BaseUnityPlugin
{
	[HarmonyPatch(typeof(Gutterman), "FallOver")]
	public class PatchFallOver
	{
		public static void Prefix(Gutterman __instance)
		{
			AudioSource val = ((Component)__instance).gameObject.AddComponent<AudioSource>();
			val.clip = metalpipeSound;
			val.Play();
		}
	}

	private static AssetBundle pipe = AssetBundle.LoadFromMemory(Resource1.metalpipe);

	public static AudioClip metalpipeSound = pipe.LoadAsset<AudioClip>("pipe.mp3");

	private void Awake()
	{
		//IL_0006: Unknown result type (might be due to invalid IL or missing references)
		//IL_000c: Expected O, but got Unknown
		Harmony val = new Harmony("org.xowt.gutterpipe");
		val.PatchAll();
	}
}
[GeneratedCode("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
[DebuggerNonUserCode]
[CompilerGenerated]
internal class Resource1
{
	private static ResourceManager resourceMan;

	private static CultureInfo resourceCulture;

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

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

	internal static byte[] metalpipe
	{
		get
		{
			object @object = ResourceManager.GetObject("metalpipe", resourceCulture);
			return (byte[])@object;
		}
	}

	internal Resource1()
	{
	}
}