Decompiled source of No Deathbag v0.1.1

plugins/kruft.NoDeathbag.dll

Decompiled 2 months ago
using System;
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 Bossa.Cinematika.Modules;
using Bossa.Cinematika.VisualActions;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using WildSkies.Player;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("kruft.NoDeathbag")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyDescription("Keep your inventory when you die.")]
[assembly: AssemblyFileVersion("0.1.1.0")]
[assembly: AssemblyInformationalVersion("0.1.1+06836c05164fced680c78e7835522ca340cee14d")]
[assembly: AssemblyProduct("No Deathbag")]
[assembly: AssemblyTitle("kruft.NoDeathbag")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.1.1.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 NoDeathbag
{
	internal class NoDeathbagPatch
	{
		[HarmonyPrefix]
		[HarmonyPatch(typeof(LocalPlayer), "OnEntityDeath")]
		private static bool OnEntityDeath_SkipDeathbag(LocalPlayer __instance)
		{
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			//IL_0020: Expected O, but got Unknown
			CameraVisualSettings module = __instance._cameraManager.GetModule<CameraVisualSettings>();
			module.AddVisualAction((CameraVisualAction)new BloomFlash(1f, 4f));
			module.AddVisualAction((CameraVisualAction)(object)__instance._deathCameraEffect);
			return false;
		}
	}
	[BepInPlugin("kruft.NoDeathbag", "No Deathbag", "0.1.1")]
	public class NoDeathbagPlugin : BasePlugin
	{
		public override void Load()
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			new Harmony("kruft.NoDeathbag").PatchAll(typeof(NoDeathbagPatch));
		}
	}
	public static class MyPluginInfo
	{
		public const string PLUGIN_GUID = "kruft.NoDeathbag";

		public const string PLUGIN_NAME = "No Deathbag";

		public const string PLUGIN_VERSION = "0.1.1";
	}
}