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 Lareins DoubleDrops v5.0.3
Lareins_DoubleDrops.dll
Decompiled 12 hours agousing System; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Configuration; using HarmonyLib; using Lareins_Core; 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(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyVersion("0.0.0.0")] namespace Lareins_DoubleDrops; [BepInPlugin("com.lareins.doubledrops", "Lareins_DoubleDrops", "5.0.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class DoubleDropsPlugin : BaseUnityPlugin { public const string ModGUID = "com.lareins.doubledrops"; public const string ModName = "Lareins_DoubleDrops"; public const string ModVersion = "5.0.0"; public static ConfigEntry<bool> ModAktif; public static ConfigEntry<int> MadenCarpani; public static ConfigEntry<int> HayvanDropCarpani; private static readonly HashSet<string> MadenIsimleri = new HashSet<string> { "CopperOre", "TinOre", "SilverOre", "IronScrap", "BlackMetalScrap", "Obsidian", "Flint", "Coal", "Crystal", "FlametalOre", "FlametalOreNew" }; private void Awake() { //IL_00b8: Unknown result type (might be due to invalid IL or missing references) ModAktif = ((BaseUnityPlugin)this).Config.Bind<bool>("Genel", "ModAktif", true, "Maden ve hayvan 2x drop sistemini acar/kapatir"); MadenCarpani = ((BaseUnityPlugin)this).Config.Bind<int>("Carpanlar", "MadenCarpani", 2, "Kazilan maden ve zindan demir droplari carpani (1 - 5)"); HayvanDropCarpani = ((BaseUnityPlugin)this).Config.Bind<int>("Carpanlar", "HayvanDropCarpani", 2, "Hayvan ve yaratiklardan dusen ganimet carpani (1 - 5)"); CorePlugin.AyarEkle("2x Maden ve Hayvan", "Mod Aktif", "Maden ve hayvan ganimetlerini 2x yapar.", ModAktif); CorePlugin.AyarEkle("2x Maden ve Hayvan", "Maden Drop Carpani", "Bakir, kalay, gumus ve zindan demir droplarini carpar.", MadenCarpani, 1, 5); CorePlugin.AyarEkle("2x Maden ve Hayvan", "Hayvan Drop Carpani", "Domuz, neck, geyik ve yaratik droplarini carpar.", HayvanDropCarpani, 1, 5); new Harmony("com.lareins.doubledrops").PatchAll(typeof(DoubleDropsPlugin)); } [HarmonyPatch(typeof(DropTable), "GetDropList", new Type[] { })] [HarmonyPostfix] private static void MadenDroplariniCarp(ref List<GameObject> __result) { if (!ModAktif.Value || MadenCarpani.Value <= 1 || __result == null || __result.Count == 0) { return; } int num = MadenCarpani.Value - 1; int count = __result.Count; for (int i = 0; i < count; i++) { GameObject val = __result[i]; if ((Object)(object)val != (Object)null && MadenIsimleri.Contains(((Object)val).name)) { for (int j = 0; j < num; j++) { __result.Add(val); } } } } [HarmonyPatch(typeof(CharacterDrop), "GenerateDropList")] [HarmonyPostfix] private static void HayvanDroplariniCarp(ref List<KeyValuePair<GameObject, int>> __result) { if (!ModAktif.Value || HayvanDropCarpani.Value <= 1 || __result == null) { return; } int value = HayvanDropCarpani.Value; for (int i = 0; i < __result.Count; i++) { KeyValuePair<GameObject, int> keyValuePair = __result[i]; if ((Object)(object)keyValuePair.Key != (Object)null && keyValuePair.Value > 0) { __result[i] = new KeyValuePair<GameObject, int>(keyValuePair.Key, keyValuePair.Value * value); } } } }