Decompiled source of HunterScreamOnDashJump v1.0.0

plugins/HunterScreamOnDashJump/HunterScreamOnJump.dll

Decompiled 3 months ago
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BepInEx;
using HarmonyLib;
using HunterScreamOnJump.Patches;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETStandard,Version=v2.0", FrameworkDisplayName = ".NET Standard 2.0")]
[assembly: AssemblyCompany("HunterScreamOnJump")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("HunterScreamOnJump")]
[assembly: AssemblyTitle("HunterScreamOnJump")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace HunterScreamOnJump
{
	[BepInPlugin("prideunique.ultrakill.hunterScreamOnDashJump", "Hunter scream on dash jump", "1.0.0")]
	public class Plugin : BaseUnityPlugin
	{
		public const string pluginGUID = "prideunique.ultrakill.hunterScreamOnDashJump";

		public const string pluginName = "Hunter scream on dash jump";

		public const string pluginVersion = "1.0.0";

		public static Harmony Harmony;

		public static AssetBundle Assets;

		public static GameObject newDashJumpSound;

		public void Awake()
		{
			//IL_001e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Expected O, but got Unknown
			Assets = AssetBundle.LoadFromFile(Path.Combine(ModPath(), "hunterscreamondash_assets_all.bundle"));
			Harmony = new Harmony("1.0.0");
			Harmony.PatchAll(typeof(NewMovementPatch));
		}

		public static string ModPath()
		{
			return Assembly.GetExecutingAssembly().Location.Substring(0, Assembly.GetExecutingAssembly().Location.LastIndexOf(Path.DirectorySeparatorChar));
		}
	}
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "HunterScreamOnJump";

		public const string PLUGIN_NAME = "HunterScreamOnJump";

		public const string PLUGIN_VERSION = "1.0.0";
	}
}
namespace HunterScreamOnJump.Patches
{
	public static class NewMovementPatch
	{
		[HarmonyPatch(typeof(NewMovement), "Awake")]
		[HarmonyPrefix]
		public static void NewMovementAwake(NewMovement __instance)
		{
			Debug.Log((object)"REPLLLLLLLLLLLLLLLLLLLLACED");
			__instance.dashJumpSound = Plugin.Assets.LoadAsset<GameObject>("NewDashJumpSound.prefab");
		}
	}
}