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 NoScrap v1.0.0
NoScrap.dll
Decompiled 2 years agousing System; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using HarmonyLib; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("NoScrap")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("NoScrap")] [assembly: AssemblyCopyright("Copyright © 2024")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("78a63cee-2ca2-422d-8301-4ab58d4781e5")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.8", FrameworkDisplayName = ".NET Framework 4.8")] [assembly: AssemblyVersion("1.0.0.0")] namespace NoScrap; [BepInPlugin("ActualizeReality.NoScrap", "No Scrap", "1.0.0")] public class NoScrap { public NoScrap() { //IL_000e: Unknown result type (might be due to invalid IL or missing references) try { new Harmony("NoScrap").PatchAll(); Console.WriteLine("No Scrap plugin loaded!"); } catch (Exception ex) { Console.WriteLine("Failed to load No Scrap plugin: " + ex.Message); } } } [HarmonyPatch(typeof(RoundManager))] public class RoundManagerPatch { [HarmonyPrefix] [HarmonyPatch("LoadNewLevel")] public static bool PreventAllSpawns(ref SelectableLevel newLevel) { foreach (Item item in newLevel.spawnableScrap) { item.Rarity = 0; } return true; } } public class SelectableLevel { internal List<Item> spawnableScrap = new List<Item>(); } public class Item { public int Rarity { get; set; } } internal class RoundManager { }