Decompiled source of AmbienceDisabler v2.0.0

Mods/AmbienceDisabler.dll

Decompiled 5 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using AmbienceDisabler;
using MelonLoader;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: MelonInfo(typeof(AmbienceDisablerClass), "Ambience Disabler", "2.0.0", "Sky7734", null)]
[assembly: MelonGame("Buckethead Entertainment", "RUMBLE")]
[assembly: AssemblyTitle("AmbienceDisabler")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("AmbienceDisabler")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("5e721af7-96a1-449a-9c1d-e18a272b5f85")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace AmbienceDisabler;

public class AmbienceDisablerClass : MelonMod
{
	public AudioSource Ambience;

	public bool AmbienceBool = true;

	public string SceneName;

	public override void OnSceneWasLoaded(int buildIndex, string sceneName)
	{
		SceneName = sceneName;
		if (sceneName == "Gym" || sceneName == "Park")
		{
			Ambience = GameObject.Find("Ambience").GetComponent<AudioSource>();
			Ambience.mute = AmbienceBool;
		}
	}
}