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 ThousandItems v1.0.4
ThousandItems.dll
Decompiled 2 weeks agousing System; using System.Reflection; using System.Runtime.CompilerServices; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using RoR2; using UnityEngine; using UnityEngine.Networking; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: AssemblyVersion("0.0.0.0")] namespace ThousandItems; [BepInPlugin("HotelPoolWater.ThousandItems", "ThousandItems", "1.0.4")] public class ThousandItemsPlugin : BaseUnityPlugin { public const string PluginGUID = "HotelPoolWater.ThousandItems"; public const string PluginName = "ThousandItems"; public const string PluginVersion = "1.0.4"; private ConfigEntry<int> stackSize; public void Awake() { stackSize = ((BaseUnityPlugin)this).Config.Bind<int>("General", "StackSize", 1000, "How many of an item you end up receiving each time you pick one up."); GenericPickupController.onPickupConsumed += OnPickupConsumed; } public void OnDestroy() { GenericPickupController.onPickupConsumed -= OnPickupConsumed; } private void OnPickupConsumed(CharacterBody body, UniquePickup pickup) { //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Invalid comparison between Unknown and I4 //IL_0063: Unknown result type (might be due to invalid IL or missing references) if (Chainloader.PluginInfos.ContainsKey("HotelPoolWater.ItemReroll") || !NetworkServer.active || !Object.op_Implicit((Object)(object)body) || !Object.op_Implicit((Object)(object)body.inventory)) { return; } PickupDef pickupDef = PickupCatalog.GetPickupDef(pickup.pickupIndex); if (pickupDef == null || (int)pickupDef.itemIndex == -1) { return; } int num = stackSize.Value - 1; if (num <= 0) { return; } try { body.inventory.GiveItemPermanent(pickupDef.itemIndex, num); } catch (Exception ex) { ((BaseUnityPlugin)this).Logger.LogError((object)ex); } } }