Decompiled source of SkwurlRunnerHead v1.0.0

SkwurlRunnerHead/SkwurlRunnerHead.dll

Decompiled 11 months ago
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using LethalLib.Modules;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("SkwurlRunnerHead")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("SkwurlRunnerHead")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("00edee5d-bc9b-4fe0-bbb6-f7146e2dfcc2")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace SkwurlRunnerHead;

[BepInPlugin("atastymelon.skwurlrunnerhead", "Skwurl Runner Head", "0.0.0.1")]
public class Plugin : BaseUnityPlugin
{
	private readonly Harmony harmony = new Harmony("skwurlrunnerhead");

	internal ManualLogSource mls;

	private void Awake()
	{
		mls = Logger.CreateLogSource("skwurlrunnerhead");
		mls.LogInfo((object)"SK Head Loading!");
		string text = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "skwurlrunner");
		AssetBundle val = AssetBundle.LoadFromFile(text);
		if ((Object)(object)val == (Object)null)
		{
			mls.LogError((object)"COULD NOT FIND SKWURL RUNNER ASSET BUNDLE");
			return;
		}
		Item val2 = val.LoadAsset<Item>("assets/SkwurlRunnerSkwurl/SkwurlHead.asset");
		NetworkPrefabs.RegisterNetworkPrefab(val2.spawnPrefab);
		Utilities.FixMixerGroups(val2.spawnPrefab);
		Items.RegisterScrap(val2, 45, (LevelTypes)(-1));
		harmony.PatchAll();
		mls.LogInfo((object)"Skwurl Runner Head Item patched successfully");
	}
}