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 MoreGnomes v0.2.0
MoreGnomes.dll
Decompiled a year agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using HarmonyLib; 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 = "")] [assembly: AssemblyCompany("LargeGnome")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("LargeGnome")] [assembly: AssemblyTitle("LargeGnome")] [assembly: AssemblyVersion("1.0.0.0")] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } } namespace LargeGnome { [HarmonyPatch] internal class GnomePatch { [HarmonyPatch(typeof(EnemyDirector), "Awake")] [HarmonyPrefix] public static void Prefix(EnemyDirector __instance) { if (Plugin.GnomePatchRan) { return; } foreach (EnemySetup item3 in __instance.enemiesDifficulty1) { Plugin.log.LogInfo((object)((Object)item3).name); if (((Object)item3).name == "Enemy - Gnome") { Plugin.log.LogInfo((object)"Making More Gnomes"); GameObject item = item3.spawnObjects[1]; for (int i = 0; i < Plugin.GnomeSpawn1; i++) { item3.spawnObjects.Add(item); } } } foreach (EnemySetup item4 in __instance.enemiesDifficulty3) { if (((Object)item4).name == "Enemy Group - 10 Gnomes") { Plugin.log.LogInfo((object)"Making Even More Gnomes"); GameObject item2 = item4.spawnObjects[1]; for (int j = 0; j < Plugin.GnomeSpawn2; j++) { item4.spawnObjects.Add(item2); } } } Plugin.GnomePatchRan = true; } } [BepInPlugin("Sai.Gnome", "Sai_Gnome", "0.1.0")] public class Plugin : BaseUnityPlugin { private static Plugin _instance; private static Harmony _harmony; private ConfigEntry<float> GnomeMultiplier; public static int GnomeSpawn1; public static int GnomeSpawn2; public static bool GnomePatchRan; internal static ManualLogSource log; private bool _initialized; internal static Plugin Instance { get { return _instance; } set { if ((Object)(object)_instance == (Object)null) { _instance = value; } else { Object.Destroy((Object)(object)value); } } } private void Awake() { //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Expected O, but got Unknown GnomeMultiplier = ((BaseUnityPlugin)this).Config.Bind<float>("General", "Gnome Multiplier", 5f, "A multiplier for how many gnomes are spawned|Default 5"); GnomeSpawn1 = (int)Math.Round(5f * GnomeMultiplier.Value - 5f); GnomeSpawn2 = (int)Math.Round(10f * GnomeMultiplier.Value - 11f); _instance = this; log = ((BaseUnityPlugin)this).Logger; if (_harmony == null) { _harmony = new Harmony("Sai.Gnome"); } _harmony.PatchAll(typeof(GnomePatch)); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Plugin Sai_Gnome is loaded!"); } } public static class PluginInfo { public const string PLUGIN_ID = "Sai_Gnome"; public const string PLUGIN_NAME = "Sai_Gnome"; public const string PLUGIN_VERSION = "0.1.0"; public const string PLUGIN_GUID = "Sai.Gnome"; } }