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 Mr WPNZ v0.1.7
Mr_WPNZ_LethalCompany.dll
Decompiled 13 minutes 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 ModelReplacement; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: AssemblyCompany("Mr_WPNZ_LethalCompany")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("Mr_WPNZ_LethalCompany")] [assembly: AssemblyTitle("Mr_WPNZ_LethalCompany")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [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] [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 MrWPNZ { [BepInPlugin("MrWPNZ.ModelReplacement", "Mr_WPNZ", "0.1.7")] [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", "Mr_WPNZ", "Enter a comma separated list of suit names."); } private void PrepareSuitTexture() { try { string? directoryName = Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location); string text = Path.Combine(directoryName, "moresuits"); string text2 = Path.Combine(directoryName, "Mr_WPNZ.png"); string text3 = Path.Combine(text, "Mr_WPNZ.png"); Directory.CreateDirectory(text); if (File.Exists(text2)) { File.Copy(text2, text3, overwrite: true); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Mr_WPNZ suit texture copied successfully."); } if (File.Exists(text3)) { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Mr_WPNZ suit texture ready!"); ((BaseUnityPlugin)this).Logger.LogInfo((object)("Suit path: " + text3)); } else { ((BaseUnityPlugin)this).Logger.LogError((object)"Mr_WPNZ suit texture not found!"); } } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogError((object)"Failed to prepare Mr_WPNZ suit texture."); ((BaseUnityPlugin)this).Logger.LogError((object)ex); } } private void Awake() { //IL_0098: Unknown result type (might be due to invalid IL or missing references) PrepareSuitTexture(); config = ((BaseUnityPlugin)this).Config; InitConfig(); Assets.PopulateAssets(); if (enableModelForAllSuits.Value) { ModelReplacementAPI.RegisterModelReplacementOverride(typeof(MRMR_WPNZ_PLAYER)); } if (enableModelAsDefault.Value) { ModelReplacementAPI.RegisterModelReplacementDefault(typeof(MRMR_WPNZ_PLAYER)); } string[] array = suitNamesToEnableModel.Value.Split(','); foreach (string text in array) { if (!string.IsNullOrWhiteSpace(text)) { ModelReplacementAPI.RegisterSuitModelReplacement(text.Trim(), typeof(MRMR_WPNZ_PLAYER)); } } new Harmony("MrWPNZ.ModelReplacement").PatchAll(); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Mr_WPNZ v0.1.7 loaded successfully!"); } } public static class Assets { public static string mainAssetBundleName = "mr_wpnz"; 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); } } } public class MRMR_WPNZ_PLAYER : BodyReplacementBase { protected override GameObject LoadAssetsAndReturnModel() { string text = "Mr_WPNZ_Player"; return Assets.MainAssetBundle.LoadAsset<GameObject>(text); } } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { public IgnoresAccessChecksToAttribute(string assemblyName) { } } }