Decompiled source of doki plush v1.0.0

plugins/dokiplush/doki_plush.dll

Decompiled 10 months ago
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using BepInEx;
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: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")]
[assembly: AssemblyCompany("doki_plush")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyDescription("moni plush")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("doki_plush")]
[assembly: AssemblyTitle("doki_plush")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
namespace doki_plush
{
	public static class PluginInfo
	{
		public const string PLUGIN_GUID = "doki_plush";

		public const string PLUGIN_NAME = "doki_plush";

		public const string PLUGIN_VERSION = "1.0.0";
	}
}
namespace moni_plush
{
	internal static class Metadata
	{
		public const string Name = "Moni Plushie";

		public const string ModGUID = "com.wdbros.moni_plush";

		public const string Version = "1.0.0";
	}
	[BepInPlugin("com.wdbros.moni_plush", "Moni Plushie", "1.0.0")]
	[BepInProcess("Lethal Company.exe")]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	public class Plugin : BaseUnityPlugin
	{
		private void Awake()
		{
			AssetBundle val = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "dokiplush"));
			if ((Object)(object)val == (Object)null)
			{
				((BaseUnityPlugin)this).Logger.LogError((object)"Doki Plush failed to find asset bundle. Dying gracefully.");
				return;
			}
			Item val2 = val.LoadAsset<Item>("Monika Plush.asset");
			NetworkPrefabs.RegisterNetworkPrefab(val2.spawnPrefab);
			Items.RegisterScrap(val2, 30, (LevelTypes)(-1));
			((BaseUnityPlugin)this).Logger.LogInfo((object)"Loaded Monika Plush with no issues!");
		}
	}
}