Decompiled source of KamaTest v1.0.1

KamaTest/Nepu.dll

Decompiled 11 months ago
using System;
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.Configuration;
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("Nepu")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("Nepu")]
[assembly: AssemblyCopyright("Copyright ©  2023")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("530dec4e-4192-46d9-b507-f4bc6a382cf6")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")]
[assembly: AssemblyVersion("1.0.0.0")]
namespace JustStartmodding;

[BepInPlugin("NeptuniaPlush", "NepnepPlush", "1.0.0")]
public class Neplush : BaseUnityPlugin
{
	private const string modGUID = "NeptuniaPlush";

	private const string modName = "NepnepPlush";

	private const string modVersion = "1.0.0";

	private readonly Harmony harmony = new Harmony("NeptuniaPlush");

	private static Neplush Instance;

	private static AssetBundle NepAsset;

	private ConfigEntry<int> configNewRarity;

	internal ManualLogSource mls;

	private void Awake()
	{
		//IL_0092: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a1: Expected O, but got Unknown
		//IL_009c: Unknown result type (might be due to invalid IL or missing references)
		//IL_00a6: Expected O, but got Unknown
		if ((Object)(object)Instance == (Object)null)
		{
			Instance = this;
		}
		NepAsset = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "nep"));
		mls = Logger.CreateLogSource("NeptuniaPlush");
		mls.LogInfo((object)"Nep IS HERE");
		harmony.PatchAll(typeof(Neplush));
		configNewRarity = ((BaseUnityPlugin)this).Config.Bind<int>("General", "NepRarity", 70, new ConfigDescription("How rare Nep are to find", (AcceptableValueBase)new AcceptableValueRange<int>(0, 100), Array.Empty<object>()));
		Item val = NepAsset.LoadAsset<Item>("Assets/Neplush/Neplush.asset");
		if ((Object)(object)val == (Object)null)
		{
			mls.LogError((object)"Nep is not here");
			return;
		}
		NetworkPrefabs.RegisterNetworkPrefab(val.spawnPrefab);
		Items.RegisterScrap(val, configNewRarity.Value, (LevelTypes)510);
	}
}