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 BeanieGuySuit v1.0.3
BeanieGuySuit.dll
Decompiled 13 hours 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 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("BeanieGuySuit")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("BeanieGuySuit")] [assembly: AssemblyTitle("BeanieGuySuit")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [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 BeanieGuySuit { [BepInPlugin("Hyperactful.BeanieGuySuit", "BeanieGuySuit", "1.0.3")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class Plugin : BaseUnityPlugin { public const string GUID = "Hyperactful.BeanieGuySuit"; public const string NAME = "BeanieGuySuit"; public const string VERSION = "1.0.3"; public static ConfigEntry<bool> EnableForAllSuits { get; private set; } public static ConfigEntry<bool> EnableAsDefault { get; private set; } public static ConfigEntry<string> SuitNames { get; private set; } private void Awake() { SelfHealSuitFolder(); EnableForAllSuits = ((BaseUnityPlugin)this).Config.Bind<bool>("Suits", "Enable for all suits", false, "Replace every suit with the Jade model, no matter what is worn."); EnableAsDefault = ((BaseUnityPlugin)this).Config.Bind<bool>("Suits", "Enable as default", false, "Replace any suit that has no other registered model replacement."); SuitNames = ((BaseUnityPlugin)this).Config.Bind<string>("Suits", "Suit names", "Jade", "Comma-separated list of suit names that use the Jade model."); Assets.PopulateAssets(); if (EnableForAllSuits.Value) { ModelReplacementAPI.RegisterModelReplacementOverride(typeof(MRJADE)); } if (EnableAsDefault.Value) { ModelReplacementAPI.RegisterModelReplacementDefault(typeof(MRJADE)); } string[] array = SuitNames.Value.Split(','); for (int i = 0; i < array.Length; i++) { string text = array[i].Trim(); if (text.Length > 0) { ModelReplacementAPI.RegisterSuitModelReplacement(text, typeof(MRJADE)); } } ((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin BeanieGuySuit (1.0.3) is loaded. Jade has boarded the ship."); } private void SelfHealSuitFolder() { try { string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); string path = Path.Combine(directoryName, "moresuits", "Jade.png"); if (File.Exists(path)) { return; } Directory.CreateDirectory(Path.Combine(directoryName, "moresuits")); using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("BeanieGuySuit.Jade.png")) { using FileStream destination = File.Create(path); stream.CopyTo(destination); } ((BaseUnityPlugin)this).Logger.LogInfo((object)"moresuits/Jade.png was missing — restored from embedded copy."); } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogWarning((object)("Suit self-heal failed (More Suits may not show Jade): " + ex.Message)); } } } public class MRJADE : BodyReplacementBase { protected override GameObject LoadAssetsAndReturnModel() { return Assets.MainAssetBundle.LoadAsset<GameObject>("Jade"); } } public static class Assets { public const string MainAssetBundleName = "jadebundle"; public static AssetBundle MainAssetBundle; public static void PopulateAssets() { if ((Object)(object)MainAssetBundle != (Object)null) { return; } string name = Assembly.GetExecutingAssembly().GetName().Name + ".jadebundle"; using Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream(name); MainAssetBundle = AssetBundle.LoadFromStream(stream); } } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { public IgnoresAccessChecksToAttribute(string assemblyName) { } } }