Decompiled source of NoDeathAnimations v1.0.4

Mods/NoDeathAnimations.dll

Decompiled 2 months ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using HarmonyLib;
using Il2CppSLZ.Marrow.PuppetMasta;
using MelonLoader;
using NoDeathAnimations;
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(Class1), "NoDeathAnimations", "1.0.4", "PolskiAnt", null)]
[assembly: MelonGame("Stress Level Zero", "BONELAB")]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("PolskiAnt")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("mod for BONELAB")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("NoDeathAnimations")]
[assembly: AssemblyTitle("NoDeathAnimations")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace NoDeathAnimations;

public class Class1 : MelonMod
{
	public override void OnInitializeMelon()
	{
		Harmony.CreateAndPatchAll(typeof(Class1).Assembly, (string)null);
		MelonLogger.Msg("Mod loaded!");
	}
}
[HarmonyPatch(typeof(PuppetMaster), "Awake")]
public static class PuppetMasterPatch
{
	public static void Postfix(PuppetMaster __instance)
	{
		//IL_0003: Unknown result type (might be due to invalid IL or missing references)
		//IL_0008: Unknown result type (might be due to invalid IL or missing references)
		//IL_0016: Unknown result type (might be due to invalid IL or missing references)
		try
		{
			StateSettings stateSettings = __instance.stateSettings;
			stateSettings.killDuration = 0f;
			__instance.stateSettings = stateSettings;
		}
		catch (Exception ex)
		{
			MelonLogger.Error("Error durring patching " + ((Object)__instance).name + ": " + ex.Message);
		}
	}
}