using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Security;
using System.Security.Permissions;
using BepInEx;
using FistVR;
using Microsoft.CodeAnalysis;
using UnityEngine;
[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyCompany("Goosepamine")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("Simply changes the on-death black screen fade to instant")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("InstantBlackScreen.mod_name")]
[assembly: AssemblyTitle("Instant black death screen")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace BepInEx
{
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
[Conditional("CodeGeneration")]
internal sealed class BepInAutoPluginAttribute : Attribute
{
public BepInAutoPluginAttribute(string id = null, string name = null, string version = null)
{
}
}
}
namespace BepInEx.Preloader.Core.Patching
{
[AttributeUsage(AttributeTargets.Class, Inherited = false, AllowMultiple = false)]
[Conditional("CodeGeneration")]
internal sealed class PatcherAutoPluginAttribute : Attribute
{
public PatcherAutoPluginAttribute(string id = null, string name = null, string version = null)
{
}
}
}
namespace Goosepamine
{
[BepInProcess("h3vr.exe")]
[BepInPlugin("InstantBlackScreen.mod_name", "Instant black death screen", "1.0.0")]
public class InstantBlackScreen : BaseUnityPlugin
{
private FieldInfo playerDeathFadeField;
private float newValue = 0f;
public const string Id = "InstantBlackScreen.mod_name";
public static string Name => "Instant black death screen";
public static string Version => "1.0.0";
private void Awake()
{
Type typeFromHandle = typeof(FVRSceneSettings);
playerDeathFadeField = typeFromHandle.GetField("PlayerDeathFade", BindingFlags.Static | BindingFlags.NonPublic);
if ((object)playerDeathFadeField == null)
{
Debug.LogError((object)"PlayerDeathFade field not found!");
}
}
private void ModifyPlayerDeathFade()
{
if ((object)playerDeathFadeField != null)
{
playerDeathFadeField.SetValue(null, newValue);
}
}
private void Start()
{
ModifyPlayerDeathFade();
}
}
}