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 HarmonyLib;
using Microsoft.CodeAnalysis;
using ModelReplacement;
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("NoteBoxz.PikPakFixed")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("0.0.1.0")]
[assembly: AssemblyInformationalVersion("0.0.1")]
[assembly: AssemblyProduct("PikPak")]
[assembly: AssemblyTitle("NoteBoxz.PikPakFixed")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("0.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;
}
}
}
public static class Assets
{
public static string mainAssetBundleName = "PikPak.NoteBoxz.PikPakFixed.ironbean.pikpack";
public static AssetBundle MainAssetBundle = null;
public static void PopulateAssets()
{
if ((Object)(object)MainAssetBundle == (Object)null)
{
using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(mainAssetBundleName))
{
MainAssetBundle = AssetBundle.LoadFromStream(stream);
}
}
}
}
public static class Assets2
{
public static string mainAssetBundleName = "PikPak.NoteBoxz.PikPakFixed.ironbean.RedPikminModel";
public static AssetBundle MainAssetBundle = null;
public static void PopulateAssets()
{
if ((Object)(object)MainAssetBundle == (Object)null)
{
using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(mainAssetBundleName))
{
MainAssetBundle = AssetBundle.LoadFromStream(stream);
}
}
}
}
public class MRBLUE_PIKMIN : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "blue_pikmin";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
}
public class MRPURPY_PIKMIN : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "purpy_pikmin";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
}
public class MRRED_PIKMIN : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "redpikmin";
return Assets2.MainAssetBundle.LoadAsset<GameObject>(text);
}
}
public class MRROCK_PIKMIN : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "rock_pikmin";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
}
public class MRWHITE_PIKMIN : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "white_pikmin";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
}
public class MRYELLOW_PIKMIN : BodyReplacementBase
{
protected override GameObject LoadAssetsAndReturnModel()
{
string text = "yellow_pikmin";
return Assets.MainAssetBundle.LoadAsset<GameObject>(text);
}
}
[BepInPlugin("NoteBoxz.pikpackFixed", "PikminPlayerPackFixed", "0.0.1")]
[BepInDependency(/*Could not decode attribute arguments.*/)]
public class Plugin : BaseUnityPlugin
{
private void Awake()
{
//IL_0090: Unknown result type (might be due to invalid IL or missing references)
//IL_0096: Expected O, but got Unknown
Assets.PopulateAssets();
Assets2.PopulateAssets();
ModelReplacementAPI.RegisterSuitModelReplacement("BluePikmin", typeof(MRBLUE_PIKMIN));
ModelReplacementAPI.RegisterSuitModelReplacement("YellowPikmin", typeof(MRYELLOW_PIKMIN));
ModelReplacementAPI.RegisterSuitModelReplacement("PurplePikmin", typeof(MRPURPY_PIKMIN));
ModelReplacementAPI.RegisterSuitModelReplacement("WhitePikmin", typeof(MRWHITE_PIKMIN));
ModelReplacementAPI.RegisterSuitModelReplacement("RockPikmin", typeof(MRROCK_PIKMIN));
ModelReplacementAPI.RegisterSuitModelReplacement("RedPikmin", typeof(MRRED_PIKMIN));
Harmony val = new Harmony("NoteBoxz.pikpackFixed");
val.PatchAll();
((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin NoteBoxz.pikpackFixed is loaded!");
}
}
namespace PikPak
{
public static class MyPluginInfo
{
public const string PLUGIN_GUID = "NoteBoxz.PikPakFixed";
public const string PLUGIN_NAME = "PikPak";
public const string PLUGIN_VERSION = "0.0.1";
}
}