using System;
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 BepInEx.Logging;
using HarmonyLib;
using Microsoft.CodeAnalysis;
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(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("ULTRANEKO")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.1.0")]
[assembly: AssemblyInformationalVersion("1.0.1+7c72d816b4833df3d80bee8525e6b054e3a4f8ce")]
[assembly: AssemblyProduct("UltraNEKO")]
[assembly: AssemblyTitle("ULTRANEKO")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.1.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
namespace Microsoft.CodeAnalysis
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
internal sealed class EmbeddedAttribute : Attribute
{
}
}
namespace System.Runtime.CompilerServices
{
[CompilerGenerated]
[Microsoft.CodeAnalysis.Embedded]
[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
internal sealed class RefSafetyRulesAttribute : Attribute
{
public readonly int Version;
public RefSafetyRulesAttribute(int P_0)
{
Version = P_0;
}
}
}
namespace ULTRANEKO
{
[BepInPlugin("ULTRANEKO", "UltraNEKO", "1.0.1")]
public class Plugin : BaseUnityPlugin
{
internal static ManualLogSource Logger;
public static GameObject ears;
private void LoadEmbeddedAssetBundle()
{
Assembly executingAssembly = Assembly.GetExecutingAssembly();
string text = "ULTRANEKO.nekoears.bundle";
using Stream stream = executingAssembly.GetManifestResourceStream(text);
if (stream == null)
{
Logger.LogError((object)("Resource '" + text + "' not found!"));
return;
}
byte[] array = new byte[stream.Length];
stream.Read(array, 0, array.Length);
AssetBundle val = AssetBundle.LoadFromMemory(array);
ears = val.LoadAsset<GameObject>("necoears");
}
private void Awake()
{
//IL_000d: Unknown result type (might be due to invalid IL or missing references)
LoadEmbeddedAssetBundle();
new Harmony("mods.mrshadrib.uk.ULTRANEKO").PatchAll();
Logger = ((BaseUnityPlugin)this).Logger;
Logger.LogInfo((object)"Nya! :3");
}
}
[HarmonyPatch]
public static class Patches
{
[HarmonyPostfix]
[HarmonyPatch(typeof(SeasonalHats), "Start")]
public static void AttachEars(SeasonalHats __instance)
{
//IL_003a: Unknown result type (might be due to invalid IL or missing references)
//IL_0047: Unknown result type (might be due to invalid IL or missing references)
//IL_0054: Unknown result type (might be due to invalid IL or missing references)
Plugin.Logger.LogInfo((object)"Mrr~ X3");
Transform val = ((Component)__instance).transform.Find("Easter");
Transform transform = Object.Instantiate<GameObject>(Plugin.ears, ((Component)__instance).transform).transform;
transform.localPosition = val.localPosition;
transform.localScale = val.localScale;
transform.localRotation = val.localRotation;
((Component)transform.GetChild(0)).gameObject.layer = ((Component)__instance).gameObject.layer;
}
}
public static class MyPluginInfo
{
public const string PLUGIN_GUID = "ULTRANEKO";
public const string PLUGIN_NAME = "UltraNEKO";
public const string PLUGIN_VERSION = "1.0.1";
}
}