Decompiled source of SilentClownHorns v1.0.1

SilentClownHorns.dll

Decompiled 10 months 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 SilentClownHorns.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("SilentClownHorns")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SilentClownHorns")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("bd138677-d757-41ad-aa14-f7079dd70928")]
[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 SilentClownHorns
{
	[BepInPlugin("SilentClownHorns", "Silent Clown Horns", "1.0.1")]
	public class SilentClownHorns : BaseUnityPlugin
	{
		private const string modGUID = "SilentClownHorns";

		private const string modName = "Silent Clown Horns";

		private const string modVersion = "1.0.1";

		private readonly Harmony harmony = new Harmony("SilentClownHorns");

		private static SilentClownHorns Instance;

		internal ManualLogSource mls;

		private void Awake()
		{
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			mls = Logger.CreateLogSource("SilentClownHorns");
			mls.LogInfo((object)"Silent Clown Horns has loaded.");
			harmony.PatchAll(typeof(SilentClownHorns));
			harmony.PatchAll(typeof(NoisemakerPropPatch));
		}
	}
}
namespace SilentClownHorns.Patches
{
	[HarmonyPatch(typeof(NoisemakerProp))]
	internal class NoisemakerPropPatch
	{
		[HarmonyPatch("ItemActivate")]
		[HarmonyPostfix]
		private static void QuietHornsPatch(ref float ___maxLoudness, ref float ___minLoudness)
		{
			___minLoudness = 0f;
			___maxLoudness = 0f;
		}
	}
}