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 Filly Scrap v1.0.6
FillyScrap.dll
Decompiled 4 months agousing System; using System.Collections.Generic; 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 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: AssemblyCompany("FillyScrap")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyDescription("My first plugin")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("FillyScrap")] [assembly: AssemblyTitle("FillyScrap")] [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 FillyScrap { [BepInPlugin("FillyScrap", "FillyScrap", "1.0.6")] public class Plugin : BaseUnityPlugin { private const string GUID = "FillyScrap"; private const string NAME = "FillyScrap"; private const string VERSION = "1.0.6"; public static Plugin instance; internal static ModConfig config { get; private set; } private void Awake() { instance = this; config = new ModConfig(((BaseUnityPlugin)this).Config); string text = Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "FillyScrap"); AssetBundle val = AssetBundle.LoadFromFile(text); Item val2 = val.LoadAsset<Item>("Assets/LethalCompany/Mods/AnonFilly/Content/Items/AnonFilly.asset"); NetworkPrefabs.RegisterNetworkPrefab(val2.spawnPrefab); Items.RegisterScrap(val2, config.anonFillySpawnWeight.Value, (LevelTypes)(-1)); Item val3 = val.LoadAsset<Item>("Assets/LethalCompany/Mods/AnonFilly/Content/Items/SwagFilly.asset"); NetworkPrefabs.RegisterNetworkPrefab(val3.spawnPrefab); Items.RegisterScrap(val3, config.coolFillySpawnWeight.Value, (LevelTypes)(-1)); Item val4 = val.LoadAsset<Item>("Assets/LethalCompany/Mods/AnonFilly/Content/Items/BFilly.asset"); NetworkPrefabs.RegisterNetworkPrefab(val4.spawnPrefab); Items.RegisterScrap(val4, config.beeFillySpawnWeight.Value, (LevelTypes)(-1)); Item val5 = val.LoadAsset<Item>("Assets/LethalCompany/Mods/AnonFilly/Content/Items/GleebyFilly.asset"); NetworkPrefabs.RegisterNetworkPrefab(val5.spawnPrefab); Items.RegisterScrap(val5, config.gleepFillySpawnWeight.Value, (LevelTypes)(-1)); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin FillyScrap is loaded!"); } } internal class ModConfig { public readonly ConfigEntry<int> anonFillySpawnWeight; public readonly ConfigEntry<int> coolFillySpawnWeight; public readonly ConfigEntry<int> beeFillySpawnWeight; public readonly ConfigEntry<int> gleepFillySpawnWeight; public ModConfig(ConfigFile cfg) { cfg.SaveOnConfigSet = false; anonFillySpawnWeight = cfg.Bind<int>("Spawn Weight", "Anon Filly", 20, (ConfigDescription)null); coolFillySpawnWeight = cfg.Bind<int>("Spawn Weight", "Cool Filly", 14, (ConfigDescription)null); beeFillySpawnWeight = cfg.Bind<int>("Spawn Weight", "Bee Filly", 8, (ConfigDescription)null); gleepFillySpawnWeight = cfg.Bind<int>("Spawn Weight", "Gleep Filly", 8, (ConfigDescription)null); ClearOrphanedEntries(cfg); cfg.Save(); cfg.SaveOnConfigSet = true; } private static void ClearOrphanedEntries(ConfigFile cfg) { PropertyInfo propertyInfo = AccessTools.Property(typeof(ConfigFile), "OrphanedEntries"); Dictionary<ConfigDefinition, string> dictionary = (Dictionary<ConfigDefinition, string>)propertyInfo.GetValue(cfg); dictionary.Clear(); } } public static class MyPluginInfo { public const string PLUGIN_GUID = "FillyScrap"; public const string PLUGIN_NAME = "FillyScrap"; public const string PLUGIN_VERSION = "1.0.0"; } }