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 BreadBunMod v1.0.0
BreadBun.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 BepInEx.Logging; using HarmonyLib; using LethalLib.Modules; 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: AssemblyCompany("BreadBun")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyDescription("A template for Lethal Company")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("BreadBun")] [assembly: AssemblyTitle("BreadBun")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.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; } } } namespace BreadBunScrap { [BepInPlugin("perf.breadbunscrap", "BreadBun Scrap", "1.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class BreadBunMod : BaseUnityPlugin { private const string modGUID = "perf.breadbunscrap"; private const string modName = "BreadBun Scrap"; private const string modVersion = "1.0"; private readonly Harmony harmony = new Harmony("perf.breadbunscrap"); private static BreadBunMod Instance; private ConfigEntry<int> configBreadBunRarity; internal ManualLogSource mls; public static AssetBundle BreadBunAssets; private void Awake() { //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Expected O, but got Unknown if ((Object)(object)Instance == (Object)null) { Instance = this; } BreadBunAssets = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "breadbun")); mls = Logger.CreateLogSource("perf.breadbunscrap"); mls.LogInfo((object)"Breadbun has finished baking [Version 1.0]..."); harmony.PatchAll(typeof(BreadBunMod)); configBreadBunRarity = ((BaseUnityPlugin)this).Config.Bind<int>("General", "BreadBun", 30, new ConfigDescription("How rare Breadbuns are to find. Lower values mean Buns spawn less often", (AcceptableValueBase)(object)new AcceptableValueRange<int>(0, 100), Array.Empty<object>())); Item val = BreadBunAssets.LoadAsset<Item>("Assets/BreadBunItem.asset"); if ((Object)(object)val == (Object)null) { mls.LogError((object)"Failed to load breadbun prefab."); return; } NetworkPrefabs.RegisterNetworkPrefab(val.spawnPrefab); Utilities.FixMixerGroups(val.spawnPrefab); TerminalNode val2 = ScriptableObject.CreateInstance<TerminalNode>(); val2.clearPreviousText = true; val2.displayText = "He is a friend\n\n"; Items.RegisterShopItem(val, (TerminalNode)null, (TerminalNode)null, val2, -1); Items.RegisterScrap(val, configBreadBunRarity.Value, (LevelTypes)(-1)); } } public static class PluginInfo { public const string PLUGIN_GUID = "BreadBun"; public const string PLUGIN_NAME = "BreadBun"; public const string PLUGIN_VERSION = "1.0.0"; } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { public IgnoresAccessChecksToAttribute(string assemblyName) { } } }