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 LegoCompany v1.0.3
plugins/LegoCompany/LegoCompany.dll
Decompiled 2 years agousing System.Diagnostics; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Logging; using HarmonyLib; 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: AssemblyTitle("LegoCompany")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("LegoCompany")] [assembly: AssemblyCopyright("Copyright © 2024")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("8a8ed286-887c-430b-b9b7-9ccfbcb94bdc")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyVersion("1.0.0.0")] namespace LegoCompany; public class LegoCompanyModel : BodyReplacementBase { protected override GameObject LoadAssetsAndReturnModel() { string text = "Assets/ModelReplacementSDK/AssetsToBuild/LegoModel.prefab"; return LegoCompany.Instance.bundle.LoadAsset<GameObject>(text); } } [BepInPlugin("RobinsonMario.LegoCompany", "Lego Company", "1.0.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class LegoCompany : BaseUnityPlugin { private const string modGUID = "RobinsonMario.LegoCompany"; private const string modName = "Lego Company"; private const string modVersion = "1.0.0"; private const string assetName = "legomodel"; private readonly Harmony harmony = new Harmony("RobinsonMario.LegoCompany"); private string assetDir; public AssetBundle bundle; public static LegoCompany Instance; internal ManualLogSource mls; private void Awake() { if ((Object)(object)Instance == (Object)null) { Instance = this; } mls = Logger.CreateLogSource("RobinsonMario.LegoCompany"); mls.LogInfo((object)"RobinsonMario.LegoCompany has loaded!"); assetDir = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "legomodel"); bundle = AssetBundle.LoadFromFile(assetDir); ModelReplacementAPI.RegisterSuitModelReplacement("lego_man", typeof(LegoCompanyModel)); harmony.PatchAll(); } }