Decompiled source of NoBreathingSounds v1.0.0

NoBreathingSounds.dll

Decompiled 2 months ago
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using BepInEx.Unity.IL2CPP;
using GTFO.API;
using GameData;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("NoBreathingSounds")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("NoBreathingSounds")]
[assembly: AssemblyTitle("NoBreathingSounds")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[BepInPlugin("NoBreathingSounds", "NoBreathingSounds", "1.0.0")]
internal class Loader : BasePlugin
{
	public override void Load()
	{
		((BasePlugin)this).AddComponent<NoBreathing>();
		EventAPI.OnAssetsLoaded += NoBreathing.Initialize;
	}
}
internal class NoBreathing : MonoBehaviour
{
	public static void Initialize()
	{
		PlayerDataBlock block = GameDataBlockBase<PlayerDataBlock>.GetBlock(1u);
		block.breathingEnabled = false;
		block.breathingStaminaEnabled = false;
		block.breathingVolume = 1f;
	}
}