Please disclose if your mod was created primarily 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 DontLoseAllScrap v1.0.0
DontLoseAllScrap.dll
Decompiled 2 years agousing System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Versioning; using BepInEx; using BepInEx.Logging; using Don_tLoseAllScrap.Patches; using HarmonyLib; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: AssemblyTitle("Don'tLoseAllScrap")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("Don'tLoseAllScrap")] [assembly: AssemblyCopyright("Copyright © 2023")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("3639249c-5c5c-444e-971d-db25402858a0")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: AssemblyVersion("1.0.0.0")] namespace Don_tLoseAllScrap { [BepInPlugin("Jacobmpp.DontLoseAllScrap", "Don't Lose All Scrap", "1.0.0")] public class DontLoseAllScrapBase : BaseUnityPlugin { private const string modGUID = "Jacobmpp.DontLoseAllScrap"; private const string modName = "Don't Lose All Scrap"; private const string modVersion = "1.0.0"; private readonly Harmony harmony = new Harmony("Jacobmpp.DontLoseAllScrap"); private static DontLoseAllScrapBase Instance; internal ManualLogSource mls; private void Awake() { if ((Object)(object)Instance == (Object)null) { Instance = this; } mls = Logger.CreateLogSource("Jacobmpp.DontLoseAllScrap"); mls.LogInfo((object)"It's awake: "); harmony.PatchAll(typeof(DontLoseAllScrapBase)); harmony.PatchAll(typeof(RoundManagerPatch)); } } } namespace Don_tLoseAllScrap.Patches { [HarmonyPatch(typeof(RoundManager))] internal class RoundManagerPatch { private static bool savedValue; [HarmonyPatch("DespawnPropsAtEndOfRound")] [HarmonyPrefix] private static void patchDespawnPropsAtEndOfRoundPrefix() { savedValue = StartOfRound.Instance.allPlayersDead; StartOfRound.Instance.allPlayersDead = false; } [HarmonyPatch("DespawnPropsAtEndOfRound")] [HarmonyPostfix] private static void patchDespawnPropsAtEndOfRoundPostfix() { StartOfRound.Instance.allPlayersDead = savedValue; } } }