Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of MaruuSuits v0.9.0
PokeCompany2.dll
Decompiled 2 years agousing 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.Configuration; 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: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: AssemblyCompany("PokeCompany2")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("PokeCompany2")] [assembly: AssemblyTitle("PokeCompany2")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } } namespace ModelReplacement { public class MRPM0144_00_311 : BodyReplacementBase { protected override GameObject LoadAssetsAndReturnModel() { string text = "pm0144_00_31 1"; return Assets.MainAssetBundle.LoadAsset<GameObject>(text); } } public class MRAUDINOMEGA1 : BodyReplacementBase { protected override GameObject LoadAssetsAndReturnModel() { string text = "AudinoMega (1)"; return Assets.MainAssetBundle.LoadAsset<GameObject>(text); } } public class MRBLAZIKENM1 : BodyReplacementBase { protected override GameObject LoadAssetsAndReturnModel() { string text = "BlazikenM (1)"; return Assets.MainAssetBundle.LoadAsset<GameObject>(text); } } public class MRCELEBI1 : BodyReplacementBase { protected override GameObject LoadAssetsAndReturnModel() { string text = "Celebi (1)"; return Assets.MainAssetBundle.LoadAsset<GameObject>(text); } } public class MRGARDEVOIR1 : BodyReplacementBase { protected override GameObject LoadAssetsAndReturnModel() { string text = "Gardevoir (1)"; return Assets.MainAssetBundle.LoadAsset<GameObject>(text); } } public class MRLOPUNNY1 : BodyReplacementBase { protected override GameObject LoadAssetsAndReturnModel() { string text = "Lopunny (1)"; return Assets.MainAssetBundle.LoadAsset<GameObject>(text); } } public class MRMAWILE1 : BodyReplacementBase { protected override GameObject LoadAssetsAndReturnModel() { string text = "Mawile (1)"; return Assets.MainAssetBundle.LoadAsset<GameObject>(text); } } public class MRMELOETTAARIA1 : BodyReplacementBase { protected override GameObject LoadAssetsAndReturnModel() { string text = "MeloettaAria (1)"; return Assets.MainAssetBundle.LoadAsset<GameObject>(text); } } public class MRMEWTWO1 : BodyReplacementBase { protected override GameObject LoadAssetsAndReturnModel() { string text = "Mewtwo (1)"; return Assets.MainAssetBundle.LoadAsset<GameObject>(text); } } public class MRARTICUNOGALAR : BodyReplacementBase { protected override GameObject LoadAssetsAndReturnModel() { string text = "ArticunoGalar"; return Assets.MainAssetBundle.LoadAsset<GameObject>(text); } } public class MRBISHARP1 : BodyReplacementBase { protected override GameObject LoadAssetsAndReturnModel() { string text = "Bisharp (1)"; return Assets.MainAssetBundle.LoadAsset<GameObject>(text); } } public class MRGRENINJA1 : BodyReplacementBase { protected override GameObject LoadAssetsAndReturnModel() { string text = "Greninja 1"; return Assets.MainAssetBundle.LoadAsset<GameObject>(text); } } public class MRPIKACHUCOSPLAY1 : BodyReplacementBase { protected override GameObject LoadAssetsAndReturnModel() { string text = "PikachuCosplay (1)"; return Assets.MainAssetBundle.LoadAsset<GameObject>(text); } } public class MRPIKACHUCOSPLAYBELLE1 : BodyReplacementBase { protected override GameObject LoadAssetsAndReturnModel() { string text = "PikachuCosplayBelle (1)"; return Assets.MainAssetBundle.LoadAsset<GameObject>(text); } } public class MRPIKACHUCOSPLAYLIBRE_COLLADAMAX1 : BodyReplacementBase { protected override GameObject LoadAssetsAndReturnModel() { string text = "PikachuCosplayLibre_ColladaMax (1)"; return Assets.MainAssetBundle.LoadAsset<GameObject>(text); } } public class MRPIKACHUCOSPLAYPHD1 : BodyReplacementBase { protected override GameObject LoadAssetsAndReturnModel() { string text = "PikachuCosplayPhD (1)"; return Assets.MainAssetBundle.LoadAsset<GameObject>(text); } } public class MRPIKACHUCOSPLAYROCKSTAR1 : BodyReplacementBase { protected override GameObject LoadAssetsAndReturnModel() { string text = "PikachuCosplayRockStar 1"; return Assets.MainAssetBundle.LoadAsset<GameObject>(text); } } public class MRPIKACHUCOSPLAYPOPSTAR1 : BodyReplacementBase { protected override GameObject LoadAssetsAndReturnModel() { string text = "PikachuCosplayPopStar (1)"; return Assets.MainAssetBundle.LoadAsset<GameObject>(text); } } public class MRMEW1 : BodyReplacementBase { protected override GameObject LoadAssetsAndReturnModel() { string text = "Mew (1)"; return Assets.MainAssetBundle.LoadAsset<GameObject>(text); } } public class MRZERAORA1 : BodyReplacementBase { protected override GameObject LoadAssetsAndReturnModel() { string text = "Zeraora (1)"; return Assets.MainAssetBundle.LoadAsset<GameObject>(text); } } public class MRKIRLIA1 : BodyReplacementBase { protected override GameObject LoadAssetsAndReturnModel() { string text = "Kirlia (1)"; return Assets.MainAssetBundle.LoadAsset<GameObject>(text); } } public class MRVICTINI1 : BodyReplacementBase { protected override GameObject LoadAssetsAndReturnModel() { string text = "Victini (1)"; return Assets.MainAssetBundle.LoadAsset<GameObject>(text); } } public class MRARMORMEWTWO1 : BodyReplacementBase { protected override GameObject LoadAssetsAndReturnModel() { string text = "armor mewtwo (1)"; return Assets.MainAssetBundle.LoadAsset<GameObject>(text); } } public class MRMELOETTAPIROUETTE1 : BodyReplacementBase { protected override GameObject LoadAssetsAndReturnModel() { string text = "MeloettaPirouette (1)"; return Assets.MainAssetBundle.LoadAsset<GameObject>(text); } } public class MRMEWTWOMEGAX1 : BodyReplacementBase { protected override GameObject LoadAssetsAndReturnModel() { string text = "MewtwoMegaX (1)"; return Assets.MainAssetBundle.LoadAsset<GameObject>(text); } } public class MRSCEPTILE1 : BodyReplacementBase { protected override GameObject LoadAssetsAndReturnModel() { string text = "Sceptile (1)"; return Assets.MainAssetBundle.LoadAsset<GameObject>(text); } } public class MRDELPHOX1 : BodyReplacementBase { protected override GameObject LoadAssetsAndReturnModel() { string text = "Delphox (1)"; return Assets.MainAssetBundle.LoadAsset<GameObject>(text); } } public class MRQUAGSIRE1 : BodyReplacementBase { protected override GameObject LoadAssetsAndReturnModel() { string text = "Quagsire (1)"; return Assets.MainAssetBundle.LoadAsset<GameObject>(text); } } public class MRARMORMEWTWO1_ : BodyReplacementBase { protected override GameObject LoadAssetsAndReturnModel() { string text = "armor mewtwo (1)"; return Assets.MainAssetBundle.LoadAsset<GameObject>(text); } } public class MRLOPUNNYMEGA1 : BodyReplacementBase { protected override GameObject LoadAssetsAndReturnModel() { string text = "LopunnyMega (1)"; return Assets.MainAssetBundle.LoadAsset<GameObject>(text); } } [BepInPlugin("MARUUSHAE000", "MaruuSuits", "0.1.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class Plugin : BaseUnityPlugin { public static ConfigFile config; public static ConfigEntry<bool> enableModelForAllSuits { get; private set; } public static ConfigEntry<bool> enableModelAsDefault { get; private set; } public static ConfigEntry<string> suitNamesToEnableModel { get; private set; } private static void InitConfig() { enableModelForAllSuits = config.Bind<bool>("Suits to Replace Settings", "Enable Model for all Suits", false, "Enable to model replace every suit. Set to false to specify suits"); enableModelAsDefault = config.Bind<bool>("Suits to Replace Settings", "Enable Model as default", false, "Enable to model replace every suit that hasn't been otherwise registered."); suitNamesToEnableModel = config.Bind<string>("Suits to Replace Settings", "Suits to enable Model for", "Default,Orange suit", "Enter a comma separated list of suit names.(Additionally, [Green suit,Pajama suit,Hazard suit])"); } private void Awake() { //IL_02e2: Unknown result type (might be due to invalid IL or missing references) //IL_02e8: Expected O, but got Unknown config = ((BaseUnityPlugin)this).Config; InitConfig(); Assets.PopulateAssets(); if (enableModelForAllSuits.Value) { ModelReplacementAPI.RegisterModelReplacementOverride(typeof(MRPM0144_00_311)); } if (enableModelAsDefault.Value) { ModelReplacementAPI.RegisterModelReplacementDefault(typeof(MRPM0144_00_311)); } string[] array = suitNamesToEnableModel.Value.Split(','); string[] array2 = array; foreach (string text in array2) { ModelReplacementAPI.RegisterSuitModelReplacement("ArticunoGalar", typeof(MRPM0144_00_311)); ModelReplacementAPI.RegisterSuitModelReplacement("AudinoMega", typeof(MRAUDINOMEGA1)); ModelReplacementAPI.RegisterSuitModelReplacement("Blaziken", typeof(MRBLAZIKENM1)); ModelReplacementAPI.RegisterSuitModelReplacement("Celebi", typeof(MRCELEBI1)); ModelReplacementAPI.RegisterSuitModelReplacement("Gardevoir", typeof(MRGARDEVOIR1)); ModelReplacementAPI.RegisterSuitModelReplacement("Lopunny", typeof(MRLOPUNNY1)); ModelReplacementAPI.RegisterSuitModelReplacement("Mawile", typeof(MRMAWILE1)); ModelReplacementAPI.RegisterSuitModelReplacement("MeloettaAria", typeof(MRMELOETTAARIA1)); ModelReplacementAPI.RegisterSuitModelReplacement("Mewtwo", typeof(MRMEWTWO1)); ModelReplacementAPI.RegisterSuitModelReplacement("ZeraoraShiny", typeof(MRZERAORA1)); ModelReplacementAPI.RegisterSuitModelReplacement("BisharpShiny", typeof(MRBISHARP1)); ModelReplacementAPI.RegisterSuitModelReplacement("Greninja", typeof(MRGRENINJA1)); ModelReplacementAPI.RegisterSuitModelReplacement("Mew", typeof(MRMEW1)); ModelReplacementAPI.RegisterSuitModelReplacement("PikachuCosplay", typeof(MRPIKACHUCOSPLAY1)); ModelReplacementAPI.RegisterSuitModelReplacement("PikachuCosplayLibre", typeof(MRPIKACHUCOSPLAYLIBRE_COLLADAMAX1)); ModelReplacementAPI.RegisterSuitModelReplacement("PikachuCosplayBelle", typeof(MRPIKACHUCOSPLAYBELLE1)); ModelReplacementAPI.RegisterSuitModelReplacement("PikachuCosplayPHD", typeof(MRPIKACHUCOSPLAYPHD1)); ModelReplacementAPI.RegisterSuitModelReplacement("PikachuCosplayPopstar", typeof(MRPIKACHUCOSPLAYPOPSTAR1)); ModelReplacementAPI.RegisterSuitModelReplacement("PikachuCosplayRockstar", typeof(MRPIKACHUCOSPLAYROCKSTAR1)); ModelReplacementAPI.RegisterSuitModelReplacement("Kirlia", typeof(MRKIRLIA1)); ModelReplacementAPI.RegisterSuitModelReplacement("Victini", typeof(MRVICTINI1)); ModelReplacementAPI.RegisterSuitModelReplacement("ArmoredMewtwo", typeof(MRARMORMEWTWO1)); ModelReplacementAPI.RegisterSuitModelReplacement("MeloettaPirouette", typeof(MRMELOETTAPIROUETTE1)); ModelReplacementAPI.RegisterSuitModelReplacement("MegaMewtwoX", typeof(MRMEWTWOMEGAX1)); ModelReplacementAPI.RegisterSuitModelReplacement("Sceptile", typeof(MRSCEPTILE1)); ModelReplacementAPI.RegisterSuitModelReplacement("Delphox", typeof(MRDELPHOX1)); ModelReplacementAPI.RegisterSuitModelReplacement("Quagsire", typeof(MRQUAGSIRE1)); ModelReplacementAPI.RegisterSuitModelReplacement("LopunnyMega", typeof(MRLOPUNNYMEGA1)); } Harmony val = new Harmony("MARUUSHAE000"); val.PatchAll(); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin MARUUSHAE000 is loaded!"); } } public static class Assets { public static string mainAssetBundleName = "MaruuSuits"; public static AssetBundle MainAssetBundle = null; private static string GetAssemblyName() { return Assembly.GetExecutingAssembly().GetName().Name.Replace(" ", "_"); } public static void PopulateAssets() { if ((Object)(object)MainAssetBundle == (Object)null) { Console.WriteLine(GetAssemblyName() + "." + mainAssetBundleName); using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(GetAssemblyName() + "." + mainAssetBundleName); MainAssetBundle = AssetBundle.LoadFromStream(stream); } } } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { public IgnoresAccessChecksToAttribute(string assemblyName) { } } }