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 NoItemDropInverse v1.0.0
TestMod01.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 GameNetcodeStuff; using HarmonyLib; using TestMod01.Patches; 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("TestMod01")] [assembly: AssemblyDescription("")] [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("TestMod01")] [assembly: AssemblyCopyright("Copyright © 2023")] [assembly: AssemblyTrademark("")] [assembly: ComVisible(false)] [assembly: Guid("d4bf401d-c1c0-4d56-be09-d68d26076500")] [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 TestMod01 { [BepInPlugin("Sierra.TestMod01", "Test Mod", "1.0.0")] public class TestModBase : BaseUnityPlugin { private const string modGUID = "Sierra.TestMod01"; private const string modName = "Test Mod"; private const string modVersion = "1.0.0"; private readonly Harmony harmony = new Harmony("Sierra.TestMod01"); private static TestModBase Instance; internal ManualLogSource mls; private void Awake() { if ((Object)(object)Instance == (Object)null) { Instance = this; } mls = Logger.CreateLogSource("Sierra.TestMod01"); mls.LogInfo((object)"RAHHHHHHHH THE MOD IS RUNNING"); harmony.PatchAll(typeof(TestModBase).Assembly); harmony.PatchAll(typeof(PlayerControllerBPatch).Assembly); } } } namespace TestMod01.Patches { internal class CooldownPatch { [HarmonyPatch(typeof(ShipTeleporter))] [HarmonyPatch("Awake")] [HarmonyPostfix] private static void Postfix_Awake(ShipTeleporter __instance) { FieldInfo field = typeof(ShipTeleporter).GetField("cooldownTime", BindingFlags.Instance | BindingFlags.NonPublic); if (field != null) { float num = (float)field.GetValue(__instance); if (num > 0f) { field.SetValue(__instance, 0f); } } } } [HarmonyPatch(typeof(PlayerControllerB))] internal class PlayerControllerBPatch { [HarmonyPatch("DropAllHeldItems")] [HarmonyPrefix] private static bool Prefix_DropAllHeldItems() { return false; } [HarmonyPatch(typeof(ShipTeleporter))] [HarmonyPatch("TeleportPlayerOutWithInverseTeleporter")] [HarmonyPrefix] private static void Prefix_TeleportPlayerOutWithInverseTeleporter(PlayerControllerB __instance) { } } }