Please disclose if your mod was created primarily 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 KirbysCustomScrap v1.2.1
KirbysCustomScrap.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 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("KirbysCustomScrap")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyDescription("Adding some scrap items")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("KirbysCustomScrap")] [assembly: AssemblyTitle("KirbysCustomScrap")] [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 KirbysCustomScrap { [BepInPlugin("KirbysCustomScrap", "KirbysCustomScrap", "1.0.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class Plugin : BaseUnityPlugin { public static AssetBundle KirbysAssetBundle; private void Awake() { LoadAssetBundle(); AddCustomScrap(80, "Porygon-ZItemData"); AddCustomScrap(50, "SnoruntItemData"); AddCustomScrap(50, "BuizelItemData"); AddCustomScrap(80, "KirbyItemData"); AddCustomScrap(80, "NoibatItemData"); AddCustomScrap(50, "KrookodileItemData"); AddCustomScrap(15, "ReshiramItemData"); AddCustomScrap(50, "ShinxItemData"); AddCustomScrap(25, "ShinyBreloomItemData"); AddCustomScrap(25, "ShinyFlygonItemData"); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin KirbysCustomScrap is loaded!"); } private void LoadAssetBundle() { string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); KirbysAssetBundle = AssetBundle.LoadFromFile(Path.Combine(directoryName, "kirbyscustomscrapbundle")); if ((Object)(object)KirbysAssetBundle == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Failed to load asset bundle."); } else { ((BaseUnityPlugin)this).Logger.LogInfo((object)"Succesfully loaded asset bundle."); } } private void AddCustomScrap(int rarity, string itemInfoName) { Item val = KirbysAssetBundle.LoadAsset<Item>(itemInfoName); Utilities.FixMixerGroups(val.spawnPrefab); NetworkPrefabs.RegisterNetworkPrefab(val.spawnPrefab); Items.RegisterScrap(val, rarity, (LevelTypes)(-1)); } } public static class PluginInfo { public const string PLUGIN_GUID = "KirbysCustomScrap"; public const string PLUGIN_NAME = "KirbysCustomScrap"; 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) { } } }