Decompiled source of MuteLib v1.0.0

MuteLib.dll

Decompiled 3 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 UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("MuteLib")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("MuteLib")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("9555d058-a660-441c-89d0-c9673bb1ed14")]
[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 MuteLib;

public class MuteSoundInside : MonoBehaviour
{
	public AudioSource objAudioSource;

	private void Start()
	{
		Debug.Log((object)"VolumeLib Initialized. zepsun on discord for help!");
	}

	private void Update()
	{
		if (GameNetworkManager.Instance.localPlayerController.isInsideFactory)
		{
			objAudioSource.mute = true;
		}
		else
		{
			objAudioSource.mute = false;
		}
	}
}
[BepInPlugin("com.zepsun.MuteLib", "MuteLib", "1.0.0")]
public class MuteLibPlugin : BaseUnityPlugin
{
	private const string MyGUID = "com.zepsun.MuteLib";

	private const string PluginName = "MuteLib";

	private const string VersionString = "1.0.0";

	public static ManualLogSource Log = new ManualLogSource("MuteLib");

	private void Awake()
	{
		((BaseUnityPlugin)this).Logger.LogInfo((object)"PluginName: MuteLib, VersionString: 1.0.0 is loading...");
		((BaseUnityPlugin)this).Logger.LogInfo((object)"PluginName: MuteLib, VersionString: 1.0.0 is loaded. zepsun on discord for help!");
		Log = ((BaseUnityPlugin)this).Logger;
	}
}