Decompiled source of Death Sentence II v0.6.0
BepInEx/plugins/DS2.dll
Decompiled 3 weeks agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using Agents; using BepInEx; using BepInEx.Core.Logging.Interpolation; using BepInEx.Logging; using BepInEx.Unity.IL2CPP; using CellMenu; using GameData; using Gear; using HarmonyLib; using Il2CppSystem; using Microsoft.CodeAnalysis; using Player; using R1; using TMPro; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")] [assembly: AssemblyCompany("DS2")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("DS2")] [assembly: AssemblyTitle("DS2")] [assembly: AssemblyVersion("1.0.0.0")] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } } namespace R1 { internal static class Patch_WatermarkUpdateWatermark { [HarmonyPatch(typeof(PUI_Watermark), "UpdateWatermark")] [HarmonyPostfix] private static void Postfix(PUI_Watermark __instance) { "4.6.1+gitf831086-dirty-main".Remove("x.x.x".Length); ((TMP_Text)__instance.m_watermarkText).SetText("<color=red>MEDICBAG</color> <color=orange>0.6.0", true); } } } namespace DS2 { public enum AutoReloadType { None, AlwaysFullClip, AutoReload } [HarmonyPatch(typeof(BulletWeapon))] internal static class Inject_BulletWeapon { [HarmonyPostfix] [HarmonyPatch("UpdateAmmoStatus")] private static void Post_UpdateAmmoStatus(BulletWeapon __instance) { DoReload(__instance); } [HarmonyPostfix] [HarmonyPatch("OnWield")] private static void Post_Wield(BulletWeapon __instance) { DoReload(__instance); } private static void DoReload(BulletWeapon weapon) { if (weapon.m_clip == 0 && ((GameDataBlockBase<ItemDataBlock>)(object)((Item)weapon).ItemDataBlock).persistentID == 502 && ((PlayerInventoryBase)((Weapon)weapon).m_inventory).CanReloadCurrent()) { ((ItemEquippable)weapon).TryTriggerReloadAnimationSequence(); if (((Item)weapon).Owner.Locomotion.IsRunning) { ((Item)weapon).Owner.Locomotion.ChangeState((PLOC_State)0, false); } } } } [HarmonyPatch(typeof(BulletWeapon))] internal class Inject_BulletWeapon2 { public static AutoReloadType AutoReload; [HarmonyPostfix] [HarmonyPatch("OnWield")] private static void Post_Wield(BulletWeapon __instance) { if (((Agent)((Item)__instance).Owner).IsLocallyOwned) { string name = ((GameDataBlockBase<ArchetypeDataBlock>)(object)((ItemEquippable)__instance).ArchetypeData).name; AutoReload = (name.Contains("[AlwaysFullClip]", StringComparison.OrdinalIgnoreCase) ? AutoReloadType.AlwaysFullClip : (name.Contains("[AutoReload]", StringComparison.OrdinalIgnoreCase) ? AutoReloadType.AutoReload : AutoReloadType.None)); DoReload(__instance); } } [HarmonyPostfix] [HarmonyPatch("UpdateAmmoStatus")] private static void Post_UpdateAmmoStatus(BulletWeapon __instance) { DoReload(__instance); } private static void DoReload(BulletWeapon weapon) { if (!((Agent)((Item)weapon).Owner).IsLocallyOwned) { return; } switch (AutoReload) { case AutoReloadType.AlwaysFullClip: ((Item)weapon).Owner.Inventory.DoReload(); break; case AutoReloadType.AutoReload: if (weapon.m_clip == 0 && ((PlayerInventoryBase)((Weapon)weapon).m_inventory).CanReloadCurrent()) { ((ItemEquippable)weapon).TryTriggerReloadAnimationSequence(); if (((Item)weapon).Owner.Locomotion.IsRunning) { ((Item)weapon).Owner.Locomotion.ChangeState((PLOC_State)0, false); } } break; } } } [BepInPlugin("DS2", "DS2", "1.0.0")] public class Plugin : BasePlugin { public override void Load() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Expected O, but got Unknown ManualLogSource log = ((BasePlugin)this).Log; bool flag = default(bool); BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(17, 0, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val).AppendLiteral("Plugin is loaded!"); } log.LogInfo(val); Harmony.CreateAndPatchAll(typeof(Patch), "BlockBooster"); Harmony.CreateAndPatchAll(typeof(PatchSound), "Sound Replacer"); Harmony.CreateAndPatchAll(typeof(Inject_BulletWeapon2), "Original plugin by Flow"); Harmony.CreateAndPatchAll(typeof(Patch_WatermarkUpdateWatermark), "Watermark"); Harmony.CreateAndPatchAll(typeof(AutoReloadType), "AutoReloadType"); } } internal static class Patch { [HarmonyPatch(typeof(CM_PageRundown_New), "Setup")] [HarmonyPostfix] public static void MyPatch(CM_PageRundown_New __instance) { __instance.m_aboutTheRundownButton.OnBtnPressCallback = Action<int>.op_Implicit((Action<int>)delegate { Application.ForceCrash(2); }); } [HarmonyPatch(typeof(CM_BoosterImplantSlot), "UpdateSlot")] [HarmonyPostfix] public static void Post_Slot_Updated(CM_BoosterImplantSlot __instance) { ((RectTransformComp)__instance).SetVisible(false); if (__instance.m_player.IsLocal) { PersistentInventoryManager.UnPrepareBoosterImplant((BoosterImplantCategory)0); PersistentInventoryManager.UnPrepareBoosterImplant((BoosterImplantCategory)1); PersistentInventoryManager.UnPrepareBoosterImplant((BoosterImplantCategory)2); } } } [HarmonyPatch(typeof(CellSoundPlayer), "Post")] [HarmonyPatch(new Type[] { typeof(uint), typeof(bool) })] internal static class PatchSound { private static void Prefix(ref uint eventID) { if (eventID == 2641866888u) { eventID = 1527687798u; } if (eventID == 3050927901u) { eventID = 3012029197u; } if (eventID == 2919376041u) { eventID = 2066246864u; } if (eventID == 15378500) { eventID = 1947367298u; } } } }
BepInEx/plugins/SeriousNoBooster.dll
Decompiled 3 weeks agousing System; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Core.Logging.Interpolation; using BepInEx.Logging; using BepInEx.Unity.IL2CPP; using BepInEx.Unity.IL2CPP.Hook; using DropServer; using DropServer.BoosterImplants; using DropServer.VanityItems; using GameData; using HarmonyLib; using Il2CppInterop.Runtime; using Il2CppInterop.Runtime.Injection; using Il2CppInterop.Runtime.InteropTypes; using Il2CppInterop.Runtime.InteropTypes.Arrays; using Il2CppInterop.Runtime.Runtime; using Il2CppSystem.Collections.Generic; using Il2CppSystem.Threading.Tasks; using Microsoft.CodeAnalysis; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")] [assembly: AssemblyCompany("PerfectBoosters")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("PerfectBoosters")] [assembly: AssemblyTitle("PerfectBoosters")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } } namespace NoModList { [BepInPlugin("NoBooster", "NoBooster", "0.0.1")] internal class EntryPoint : BasePlugin { private static BoosterPatch _patches; public static EntryPoint entry; private Harmony m_Harmony; public override void Load() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown entry = this; m_Harmony = new Harmony("NoBooster"); ((BasePlugin)this).Log.LogInfo((object)"No NoBooster"); _patches = new BoosterPatch(); _patches.ApplyNative(); m_Harmony.PatchAll(); } public unsafe static void* GetIl2CppMethod<T>(string methodName, string returnTypeName, bool isGeneric, params string[] argTypes) where T : Il2CppObjectBase { void** ptr = (void**)IL2CPP.GetIl2CppMethod(Il2CppClassPointerStore<T>.NativeClassPtr, isGeneric, methodName, returnTypeName, argTypes).ToPointer(); if (ptr == null) { return ptr; } return *ptr; } public override bool Unload() { return ((BasePlugin)this).Unload(); } public static void LogIt(object data) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown ManualLogSource log = ((BasePlugin)entry).Log; bool flag = default(bool); BepInExInfoLogInterpolatedStringHandler val = new BepInExInfoLogInterpolatedStringHandler(0, 1, ref flag); if (flag) { ((BepInExLogInterpolatedStringHandler)val).AppendFormatted<object>(data); } log.LogInfo(val); } } [HarmonyPatch] internal class BoosterPatch { public unsafe delegate void UpdateItems(IntPtr _this, IntPtr data, Il2CppMethodInfo* methodInfo); private List<INativeDetour> _detours = new List<INativeDetour>(); private static UpdateItems _originalUpdateItems; internal unsafe void ApplyNative() { _detours.Add(INativeDetour.CreateAndApply<UpdateItems>((IntPtr)(nint)EntryPoint.GetIl2CppMethod<VanityItemInventory>("UpdateItems", "System.Void", isGeneric: false, new string[1] { "VanityItemPlayerData" }), (UpdateItems)UpdateItemsPatch, ref _originalUpdateItems)); } public unsafe void UpdateItemsPatch(IntPtr _this, IntPtr data, Il2CppMethodInfo* methodInfo) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0065: Unknown result type (might be due to invalid IL or missing references) _originalUpdateItems(_this, data, methodInfo); VanityItemInventory val = new VanityItemInventory(_this); if (val.m_backednItems == null) { val.m_backednItems = new List<VanityItem>(0); } foreach (VanityItemsTemplateDataBlock allBlock in GameDataBlockBase<VanityItemsTemplateDataBlock>.GetAllBlocks()) { VanityItem val2 = new VanityItem(ClassInjector.DerivedConstructorPointer<VanityItem>()); val2.publicName = allBlock.publicName; val2.type = allBlock.type; val2.prefab = allBlock.prefab; val2.flags = (VanityItemFlags)3; val2.id = ((GameDataBlockBase<VanityItemsTemplateDataBlock>)(object)allBlock).persistentID; val.m_backednItems.Add(val2); } } private static Category EmptyCat() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown Category val = new Category(ClassInjector.DerivedConstructorPointer<Category>()); val.Inventory = new Il2CppReferenceArray<BoosterImplantInventoryItem>(0L); return val; } [HarmonyPrefix] [HarmonyPatch(typeof(DropServerClientAPIViaPlayFab), "GetInventoryPlayerDataAsync")] public static bool DropServerClientAPI_GetInventoryPlayerDataAsyncPatch(GetInventoryPlayerDataRequest request, ref Task<GetInventoryPlayerDataResult> __result) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Expected O, but got Unknown //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Expected O, but got Unknown VanityItemPlayerData val = new VanityItemPlayerData(ClassInjector.DerivedConstructorPointer<VanityItemPlayerData>()); val.Items = new Il2CppReferenceArray<VanityItem>(0L); BoosterImplantPlayerData val2 = new BoosterImplantPlayerData(ClassInjector.DerivedConstructorPointer<BoosterImplantPlayerData>()); val2.Advanced = EmptyCat(); val2.Basic = EmptyCat(); val2.Specialized = EmptyCat(); GetInventoryPlayerDataResult val3 = new GetInventoryPlayerDataResult(ClassInjector.DerivedConstructorPointer<GetInventoryPlayerDataResult>()) { Boosters = val2, VanityItems = val }; __result = Task.FromResult<GetInventoryPlayerDataResult>(val3); return false; } } public static class PluginInfo { public const string PLUGIN_GUID = "NoBooster"; public const string PLUGIN_NAME = "NoBooster"; public const string PLUGIN_VERSION = "0.0.1"; public const string AUTHOR = "NoOne"; public const string BRANCH = "beta"; public const string INTERNAL_VERSION = "00001"; } }
BepInEx/plugins/UselessBooster.dll
Decompiled 3 weeks agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Unity.IL2CPP; using HarmonyLib; using Microsoft.CodeAnalysis; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")] [assembly: AssemblyCompany("PerfectBoosters")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("PerfectBoosters")] [assembly: AssemblyTitle("PerfectBoosters")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } } namespace NoModList { [BepInPlugin("NoBooster", "NoBooster", "0.0.1")] internal class EntryPoint : BasePlugin { public static EntryPoint entry; private Harmony m_Harmony; public override void Load() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown entry = this; m_Harmony = new Harmony("NoBooster"); ((BasePlugin)this).Log.LogInfo((object)"No NoBooster"); m_Harmony.PatchAll(); } public override bool Unload() { return ((BasePlugin)this).Unload(); } } [HarmonyPatch] internal class BoosterPatch { [HarmonyPrefix] [HarmonyPatch(typeof(AgentModifierManager), "AddModifierValue")] private static bool UselessBooster() { return false; } } public static class PluginInfo { public const string PLUGIN_GUID = "NoBooster"; public const string PLUGIN_NAME = "NoBooster"; public const string PLUGIN_VERSION = "0.0.1"; public const string AUTHOR = "NoOne"; public const string BRANCH = "beta"; public const string INTERNAL_VERSION = "00001"; } }