using System; using System.CodeDom.Compiler; using System.Collections; using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.Diagnostics.CodeAnalysis; using System.Globalization; using System.IO; using System.IO.Compression; using System.Linq; using System.Linq.Expressions; using System.Reflection; using System.Reflection.Emit; using System.Resources; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Cryptography; using System.Security.Permissions; using System.Text; using System.Text.RegularExpressions; using System.Threading; using System.Threading.Tasks; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using BetterEmote.AssetScripts; using BunkbedRevive; using CSync.Extensions; using CSync.Lib; using CustomItemBehaviourLibrary.AbstractItems; using Dawn.Internal; using Dawn.Utils; using Dissonance; using Dissonance.Integrations.Unity_NFGO; using DunGen; using DunGen.Tags; using FacilityMeltdown.API; using GameNetcodeStuff; using GeneralImprovements; using HarmonyLib; using LCAutoRevive; using LCAutoRevive.Utils; using LCPeeper; using LethalBots.AI; using LethalBots.AI.AIStates; using LethalBots.Configs; using LethalBots.Constants; using LethalBots.Enums; using LethalBots.Inputs; using LethalBots.Managers; using LethalBots.NetcodePatcher; using LethalBots.NetworkSerializers; using LethalBots.Patches.EnemiesPatches; using LethalBots.Patches.GameEnginePatches; using LethalBots.Patches.MapHazardsPatches; using LethalBots.Patches.MapPatches; using LethalBots.Patches.ModPatches.AdditionalNetworking; using LethalBots.Patches.ModPatches.AutoRevive; using LethalBots.Patches.ModPatches.BetterEmotes; using LethalBots.Patches.ModPatches.BunkbedRevive; using LethalBots.Patches.ModPatches.DawnLib; using LethalBots.Patches.ModPatches.LCVR; using LethalBots.Patches.ModPatches.LethalPhones; using LethalBots.Patches.ModPatches.LethalProgression; using LethalBots.Patches.ModPatches.ModelRplcmntAPI; using LethalBots.Patches.ModPatches.MoreEmotes; using LethalBots.Patches.ModPatches.Peepers; using LethalBots.Patches.ModPatches.ReviveCompany; using LethalBots.Patches.ModPatches.ShowCapacity; using LethalBots.Patches.ModPatches.TooManyEmotes; using LethalBots.Patches.ModPatches.UsualScrap; using LethalBots.Patches.ModPatches.Zaprillator; using LethalBots.Patches.NpcPatches; using LethalBots.Patches.ObjectsPatches; using LethalBots.SaveAdapter; using LethalBots.Utils; using LethalBots.Utils.Helpers; using LethalCompanyInputUtils.Api; using LethalInternship.AI; using LethalInternship.Managers; using LethalLib.Modules; using LethalMin; using Microsoft.CodeAnalysis; using ModelReplacement; using ModelReplacement.Monobehaviors; using ModelReplacement.Patches; using MoreCompany; using MoreCompany.Cosmetics; using MoreEmotes.Patch; using MoreEmotes.Scripts; using Newtonsoft.Json; using OPJosMod.ReviveCompany; using OPJosMod.ReviveCompany.CustomRpc; using ReservedItemSlotCore; using ReservedItemSlotCore.Data; using ReservedItemSlotCore.Patches; using Scoops.gameobjects; using Scoops.misc; using Scoops.patch; using Scoops.service; using SpeechRecognitionAPI; using Steamworks; using TMPro; using TooManyEmotes; using TooManyEmotes.Networking; using TooManyEmotes.Patches; using Unity.AI.Navigation; using Unity.Collections; using Unity.Netcode; using UnityEngine; using UnityEngine.AI; using UnityEngine.Animations.Rigging; using UnityEngine.Audio; using UnityEngine.Events; using UnityEngine.InputSystem; using UnityEngine.Networking; using UnityEngine.Rendering; using UnityEngine.SceneManagement; using UnityEngine.UI; using UsualScrap.Behaviors; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("LethalBots")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("7.1.0.0")] [assembly: AssemblyInformationalVersion("7.1.0+dc64c8d37cfeea2a4824bb937dfd1becbe511cd2")] [assembly: AssemblyProduct("LethalBots")] [assembly: AssemblyTitle("LethalBots")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("7.1.0.0")] [assembly: TypeForwardedTo(typeof(AllowNullAttribute))] [assembly: TypeForwardedTo(typeof(DisallowNullAttribute))] [assembly: TypeForwardedTo(typeof(MaybeNullAttribute))] [assembly: TypeForwardedTo(typeof(MaybeNullWhenAttribute))] [assembly: TypeForwardedTo(typeof(NotNullAttribute))] [assembly: TypeForwardedTo(typeof(NotNullIfNotNullAttribute))] [assembly: TypeForwardedTo(typeof(NotNullWhenAttribute))] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: NetcodePatchedAssembly] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class IsUnmanagedAttribute : Attribute { } [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; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace LethalBots { [BepInPlugin("T-Rizzle.LethalBots", "LethalBots", "7.1.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class Plugin : BaseUnityPlugin { public const string ModGUID = "T-Rizzle.LethalBots"; public static AssetBundle ModAssets; public static AssetBundle ShipOrbitNavMeshAssets; internal static string DirectoryName; internal static EnemyType LethalBotNPCPrefab; internal static GameObject ShipOrbitNavMeshPrefab; internal static int PluginIrlPlayersCount; internal static ManualLogSource Logger; internal static Config Config; internal static LethalBotsInputs InputActionsInstance; internal static bool IsModSpeechRecognitionAPILoaded; internal static bool IsModTooManyEmotesLoaded; internal static bool IsModModelReplacementAPILoaded; internal static bool IsModCustomItemBehaviourLibraryLoaded; internal static bool IsModMoreCompanyLoaded; internal static bool IsModReviveCompanyLoaded; internal static bool IsModBunkbedReviveLoaded; internal static bool IsModZaprillatorLoaded; internal static bool IsModLethalMinLoaded; internal static bool IsModLethalInternsLoaded; internal static bool IsModFacilityMeltdownLoaded; internal static bool IsModNavmeshInCompanyLoaded; internal static bool IsModReservedItemSlotCoreLoaded; internal static bool IsModLethalPhonesLoaded; internal static bool IsModGeneralImprovementsLoaded; internal static bool IsModDawnLibLoaded; internal static bool IsModUsualScrapLoaded; internal static bool IsModAutoReviveLoaded; private readonly Harmony _harmony = new Harmony("T-Rizzle.LethalBots"); private void Awake() { string text = "lethalbotnpcmodassets"; string path = "ship_orbit_navmesh"; DirectoryName = Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location); Logger = ((BaseUnityPlugin)this).Logger; Config = new Config(((BaseUnityPlugin)this).Config); InputActionsInstance = new LethalBotsInputs(); InitializeNetworkBehaviours(); ModAssets = AssetBundle.LoadFromFile(Path.Combine(DirectoryName, text)); if ((Object)(object)ModAssets == (Object)null) { Logger.LogFatal((object)"Unknown to load custom assets."); return; } LethalBotNPCPrefab = ModAssets.LoadAsset("LethalBotNPC"); if ((Object)(object)LethalBotNPCPrefab == (Object)null) { Logger.LogInfo((object)"Failed to directly load LethalBotNPC, manually searching asset bundle instead!"); Object[] array = ModAssets.LoadAllAssets(); for (int i = 0; i < array.Length; i++) { Logger.LogInfo((object)$"Found {array[i]} in asset bundle"); Object obj = array[i]; EnemyType val = (EnemyType)(object)((obj is EnemyType) ? obj : null); if (val != null) { LethalBotNPCPrefab = val; break; } } } if ((Object)(object)LethalBotNPCPrefab == (Object)null) { Logger.LogFatal((object)"LethalBotNPC prefab failed to load."); return; } foreach (Transform item in (from x in LethalBotNPCPrefab.enemyPrefab.GetComponentsInChildren() where (Object)(object)x.parent != (Object)null && ((Object)x.parent).name == "LethalBotNPCObj" && ((Object)x).name != "Collision" && ((Object)x).name != "TurnCompass" && ((Object)x).name != "CreatureSFX" && ((Object)x).name != "CreatureVoice" select x).ToList()) { Object.DestroyImmediate((Object)(object)((Component)item).gameObject); } byte[] value = MD5.Create().ComputeHash(Encoding.UTF8.GetBytes(typeof(Plugin).Assembly.GetName().Name + ((Object)((Component)this).gameObject).name + text)); uint num = BitConverter.ToUInt32(value, 0); Type typeFromHandle = typeof(NetworkObject); FieldInfo field = typeFromHandle.GetField("GlobalObjectIdHash", BindingFlags.Instance | BindingFlags.NonPublic); NetworkObject component = LethalBotNPCPrefab.enemyPrefab.GetComponent(); field.SetValue(component, num); ShipOrbitNavMeshAssets = AssetBundle.LoadFromFile(Path.Combine(DirectoryName, path)); if ((Object)(object)ShipOrbitNavMeshAssets == (Object)null) { Logger.LogFatal((object)"Unknown to load custom ship navmesh assests."); return; } ShipOrbitNavMeshPrefab = ShipOrbitNavMeshAssets.LoadAsset("ShipNavMeshColliders"); if ((Object)(object)ShipOrbitNavMeshPrefab == (Object)null) { Logger.LogFatal((object)"ShipOrbitNavMesh prefab failed to load."); return; } NetworkPrefabs.RegisterNetworkPrefab(LethalBotNPCPrefab.enemyPrefab); InitPluginManager(); PatchBaseGame(); PatchOtherMods(); Logger.LogInfo((object)"Plugin LethalBots is loaded!"); } private void PatchBaseGame() { _harmony.PatchAll(typeof(AudioMixerPatch)); _harmony.PatchAll(typeof(AudioReverbTriggerPatch)); _harmony.PatchAll(typeof(DebugPatch)); _harmony.PatchAll(typeof(GameNetworkManagerPatch)); _harmony.PatchAll(typeof(HUDManagerPatch)); _harmony.PatchAll(typeof(NetworkSceneManagerPatch)); _harmony.PatchAll(typeof(NfgoPlayerPatch)); _harmony.PatchAll(typeof(NetworkObjectPatch)); _harmony.PatchAll(typeof(RoundManagerPatch)); _harmony.PatchAll(typeof(SoundManagerPatch)); _harmony.PatchAll(typeof(StartOfRoundPatch)); _harmony.PatchAll(typeof(EnemyAIPatch)); _harmony.PatchAll(typeof(PlayerControllerBPatch)); _harmony.PatchAll(typeof(EnemyAICollisionDetect)); _harmony.PatchAll(typeof(BaboonBirdAIPatch)); _harmony.PatchAll(typeof(BlobAIPatch)); _harmony.PatchAll(typeof(BushWolfEnemyPatch)); _harmony.PatchAll(typeof(ButlerBeesEnemyAIPatch)); _harmony.PatchAll(typeof(ButlerEnemyAIPatch)); _harmony.PatchAll(typeof(CadaverBloomAIPatch)); _harmony.PatchAll(typeof(CadaverGrowthAIPatch)); _harmony.PatchAll(typeof(CaveDwellerAIPatch)); _harmony.PatchAll(typeof(CentipedeAIPatch)); _harmony.PatchAll(typeof(CrawlerAIPatch)); _harmony.PatchAll(typeof(DressGirlAIPatch)); _harmony.PatchAll(typeof(FlowermanAIPatch)); _harmony.PatchAll(typeof(FlowerSnakeEnemyPatch)); _harmony.PatchAll(typeof(ForestGiantAIPatch)); _harmony.PatchAll(typeof(GiantKiwiAIPatch)); _harmony.PatchAll(typeof(JesterAIPatch)); _harmony.PatchAll(typeof(MaskedPlayerEnemyPatch)); _harmony.PatchAll(typeof(MouthDogAIPatch)); _harmony.PatchAll(typeof(NutcrackerEnemyAIPatch)); _harmony.PatchAll(typeof(PumaAIPatch)); _harmony.PatchAll(typeof(RadMechAIPatch)); _harmony.PatchAll(typeof(RadMechMissilePatch)); _harmony.PatchAll(typeof(RedLocustBeesPatch)); _harmony.PatchAll(typeof(SandSpiderAIPatch)); _harmony.PatchAll(typeof(SandWormAIPatch)); _harmony.PatchAll(typeof(SpringManAIPatch)); _harmony.PatchAll(typeof(LandminePatch)); _harmony.PatchAll(typeof(QuicksandTriggerPatch)); _harmony.PatchAll(typeof(SpikeRoofTrapPatch)); _harmony.PatchAll(typeof(TurretPatch)); _harmony.PatchAll(typeof(AnimatedObjectFloatSetterPatch)); _harmony.PatchAll(typeof(CompanyMonsterCollisionDetectPatch)); _harmony.PatchAll(typeof(DoorLockPatch)); _harmony.PatchAll(typeof(InteractTriggerPatch)); _harmony.PatchAll(typeof(OutOfBoundsTriggerPatch)); _harmony.PatchAll(typeof(ShipTeleporterPatch)); _harmony.PatchAll(typeof(VehicleControllerPatch)); _harmony.PatchAll(typeof(DepositItemsDeskPatch)); _harmony.PatchAll(typeof(CaveDwellerPhysicsPropPatch)); _harmony.PatchAll(typeof(DeadBodyInfoPatch)); _harmony.PatchAll(typeof(GrabbableObjectPatch)); _harmony.PatchAll(typeof(RagdollGrabbableObjectPatch)); _harmony.PatchAll(typeof(ShotgunItemPatch)); _harmony.PatchAll(typeof(SprayPaintItemPatch)); _harmony.PatchAll(typeof(StunGrenadeItemPatch)); _harmony.PatchAll(typeof(TetraChemicalItemPatch)); } private void PatchOtherMods() { //IL_0223: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Expected O, but got Unknown //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Expected O, but got Unknown //IL_029b: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: Expected O, but got Unknown //IL_03b1: Unknown result type (might be due to invalid IL or missing references) //IL_03bd: Expected O, but got Unknown //IL_03ed: Unknown result type (might be due to invalid IL or missing references) //IL_03fb: Expected O, but got Unknown //IL_0467: Unknown result type (might be due to invalid IL or missing references) //IL_0475: Expected O, but got Unknown //IL_04a8: Unknown result type (might be due to invalid IL or missing references) //IL_04b6: Expected O, but got Unknown //IL_04e3: Unknown result type (might be due to invalid IL or missing references) //IL_04f1: Expected O, but got Unknown //IL_051e: Unknown result type (might be due to invalid IL or missing references) //IL_052c: Expected O, but got Unknown //IL_0559: Unknown result type (might be due to invalid IL or missing references) //IL_0567: Expected O, but got Unknown //IL_0594: Unknown result type (might be due to invalid IL or missing references) //IL_05a2: Expected O, but got Unknown //IL_05ef: Unknown result type (might be due to invalid IL or missing references) //IL_05fd: Expected O, but got Unknown //IL_062a: Unknown result type (might be due to invalid IL or missing references) //IL_0638: Expected O, but got Unknown //IL_0665: Unknown result type (might be due to invalid IL or missing references) //IL_0673: Expected O, but got Unknown //IL_06a0: Unknown result type (might be due to invalid IL or missing references) //IL_06ae: Expected O, but got Unknown //IL_0732: Unknown result type (might be due to invalid IL or missing references) //IL_0740: Expected O, but got Unknown //IL_076e: Unknown result type (might be due to invalid IL or missing references) //IL_077b: Expected O, but got Unknown //IL_07a9: Unknown result type (might be due to invalid IL or missing references) //IL_07b6: Expected O, but got Unknown //IL_07e5: Unknown result type (might be due to invalid IL or missing references) //IL_07f1: Expected O, but got Unknown IsModSpeechRecognitionAPILoaded = IsModLoaded("JS03.SpeechRecognitionAPI"); IsModTooManyEmotesLoaded = IsModLoaded("FlipMods.TooManyEmotes"); IsModModelReplacementAPILoaded = IsModLoaded("meow.ModelReplacementAPI"); IsModCustomItemBehaviourLibraryLoaded = IsModLoaded("com.github.WhiteSpike.CustomItemBehaviourLibrary"); IsModMoreCompanyLoaded = IsModLoaded("me.swipez.melonloader.morecompany"); IsModReviveCompanyLoaded = IsModLoaded("OpJosMod.ReviveCompany"); IsModBunkbedReviveLoaded = IsModLoaded("viviko.BunkbedRevive"); IsModZaprillatorLoaded = IsModLoaded("Zaprillator"); IsModLethalMinLoaded = IsModLoaded("NoteBoxz.LethalMin"); IsModLethalInternsLoaded = IsModLoaded("Szumi57.LethalInterns"); IsModFacilityMeltdownLoaded = IsModLoaded("me.loaforc.facilitymeltdown"); IsModNavmeshInCompanyLoaded = IsModLoaded("dev.kittenji.NavMeshInCompany"); IsModReservedItemSlotCoreLoaded = IsModLoaded("FlipMods.ReservedItemSlotCore"); IsModLethalPhonesLoaded = IsModLoaded("LethalPhones"); IsModGeneralImprovementsLoaded = IsModLoaded("ShaosilGaming.GeneralImprovements"); IsModDawnLibLoaded = IsModLoaded("com.github.teamxiaolan.dawnlib"); IsModUsualScrapLoaded = IsModLoaded("Emil.UsualScrap"); IsModAutoReviveLoaded = IsModLoaded("Tomatobird.AutoRevive"); bool flag = IsModLoaded("MoreEmotes"); bool flag2 = IsModLoaded("BetterEmotes"); bool flag3 = IsModLoaded("Piggy.ShowCapacity"); bool flag4 = IsModLoaded("Stoneman.LethalProgression"); bool flag5 = IsModLoaded("suskitech.LCAlwaysHearActiveWalkie"); bool flag6 = IsModLoaded("butterystancakes.lethalcompany.butteryfixes"); bool flag7 = IsModLoaded("x753.Peepers"); bool flag8 = IsModLoaded("io.daxcess.lcvr"); List list = new List(); string[] files = Directory.GetFiles(Path.GetFullPath(Paths.PatcherPluginPath), "*.dll", SearchOption.AllDirectories); foreach (string path in files) { list.Add(Path.GetFileName(path)); } bool flag9 = IsPreLoaderLoaded("AdditionalNetworking_Preloader.dll", list); if (flag) { _harmony.PatchAll(typeof(MoreEmotesPatch)); } if (flag2) { _harmony.Patch((MethodBase)AccessTools.Method(AccessTools.TypeByName("BetterEmote.Patches.EmotePatch"), "StartPostfix", (Type[])null, (Type[])null), new HarmonyMethod(typeof(BetterEmotesPatch), "StartPostfix_Prefix", (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); _harmony.Patch((MethodBase)AccessTools.Method(AccessTools.TypeByName("BetterEmote.Patches.EmotePatch"), "UpdatePostfix", (Type[])null, (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null, new HarmonyMethod(typeof(BetterEmotesPatch), "UpdatePostfix_Transpiler", (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null); _harmony.Patch((MethodBase)AccessTools.Method(AccessTools.TypeByName("BetterEmote.Patches.EmotePatch"), "PerformEmotePrefix", (Type[])null, (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null, new HarmonyMethod(typeof(BetterEmotesPatch), "PerformEmotePrefix_Transpiler", (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null); _harmony.PatchAll(typeof(BetterEmotesCustomAnimationObjectsPatch)); } if (IsModTooManyEmotesLoaded) { _harmony.PatchAll(typeof(EmoteControllerPlayerPatch)); _harmony.PatchAll(typeof(ThirdPersonEmoteControllerPatch)); } if (IsModModelReplacementAPILoaded) { _harmony.PatchAll(typeof(ModelReplacementPlayerControllerBPatchPatch)); _harmony.PatchAll(typeof(ModelReplacementAPIPatch)); } if (IsModLethalPhonesLoaded) { _harmony.PatchAll(typeof(AudioSourceStoragePatch)); _harmony.PatchAll(typeof(PhoneBehaviorPatch)); _harmony.PatchAll(typeof(PlayerPhonePatch)); _harmony.PatchAll(typeof(PlayerPhonePatchPatch)); PhoneBehaviorPatch.SetupReflectionFields(); } if (flag9) { _harmony.Patch((MethodBase)AccessTools.Method(AccessTools.TypeByName("AdditionalNetworking.Patches.Inventory.PlayerControllerBPatch"), "OnStart", (Type[])null, (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null, new HarmonyMethod(typeof(AdditionalNetworkingPatch), "Start_Transpiler", (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null); } if (flag3) { _harmony.Patch((MethodBase)AccessTools.Method(AccessTools.TypeByName("ShowCapacity.Patches.PlayerControllerBPatch"), "Update_PostFix", (Type[])null, (Type[])null), new HarmonyMethod(typeof(ShowCapacityPatch), "Update_PostFix_Prefix", (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); } if (IsModReviveCompanyLoaded) { _harmony.PatchAll(typeof(ReviveCompanyGeneralUtilPatch)); } if (IsModBunkbedReviveLoaded) { _harmony.PatchAll(typeof(BunkbedControllerPatch)); } if (IsModZaprillatorLoaded) { _harmony.Patch((MethodBase)AccessTools.Method(AccessTools.TypeByName("Zaprillator.Behaviors.RevivablePlayer"), "IShockableWithGun.StopShockingWithGun", (Type[])null, (Type[])null), new HarmonyMethod(typeof(RevivablePlayerPatch), "StopShockingWithGun_Prefix", (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); } if (flag4) { _harmony.Patch((MethodBase)AccessTools.Method(AccessTools.TypeByName("LethalProgression.Skills.HPRegen"), "HPRegenUpdate", (Type[])null, (Type[])null), new HarmonyMethod(typeof(HPRegenPatch), "HPRegenUpdate_Prefix", (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); _harmony.Patch((MethodBase)AccessTools.Method(AccessTools.TypeByName("LethalProgression.Skills.Oxygen"), "EnteredWater", (Type[])null, (Type[])null), new HarmonyMethod(typeof(OxygenPatch), "EnteredWater_Prefix", (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); _harmony.Patch((MethodBase)AccessTools.Method(AccessTools.TypeByName("LethalProgression.Skills.Oxygen"), "LeftWater", (Type[])null, (Type[])null), new HarmonyMethod(typeof(OxygenPatch), "LeftWater_Prefix", (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); _harmony.Patch((MethodBase)AccessTools.Method(AccessTools.TypeByName("LethalProgression.Skills.Oxygen"), "ShouldDrown", (Type[])null, (Type[])null), new HarmonyMethod(typeof(OxygenPatch), "ShouldDrown_Prefix", (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); _harmony.Patch((MethodBase)AccessTools.Method(AccessTools.TypeByName("LethalProgression.Skills.Oxygen"), "OxygenUpdate", (Type[])null, (Type[])null), new HarmonyMethod(typeof(OxygenPatch), "OxygenUpdate_Prefix", (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); } if (flag7) { _harmony.PatchAll(typeof(PeeperAttachHitboxPatch)); } if (flag8) { _harmony.Patch((MethodBase)AccessTools.Method(AccessTools.TypeByName("LCVR.Patches.Spectating.SpectatorPlayerPatches"), "BeforePlayerDeath", (Type[])null, (Type[])null), new HarmonyMethod(typeof(LCVRPatchesPatch), "BeforePlayerDeath_Prefix", (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); _harmony.Patch((MethodBase)AccessTools.Method(AccessTools.TypeByName("LCVR.Patches.Spectating.SpectatorPlayerPatches"), "OnPlayerDeath", (Type[])null, (Type[])null), new HarmonyMethod(typeof(LCVRPatchesPatch), "OnPlayerDeath_Prefix", (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); _harmony.Patch((MethodBase)AccessTools.Method(AccessTools.TypeByName("LCVR.Patches.Items.ShotgunItemPatches"), "DisplaySafetyPatch", (Type[])null, (Type[])null), new HarmonyMethod(typeof(LCVRPatchesPatch), "DisplaySafetyPatch_Prefix", (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); _harmony.Patch((MethodBase)AccessTools.Method(AccessTools.TypeByName("LCVR.Patches.PlayerControllerPatches"), "AfterDamagePlayer", (Type[])null, (Type[])null), new HarmonyMethod(typeof(LCVRPatchesPatch), "AfterDamagePlayer_Prefix", (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); } if (IsModDawnLibLoaded) { _harmony.PatchAll(typeof(DawnMoonNetworkerPatch)); } if (IsModUsualScrapLoaded) { _harmony.PatchAll(typeof(DefibrillatorScriptPatch)); } if (IsModAutoReviveLoaded) { _harmony.PatchAll(typeof(AutoRevivePlayerPatch)); _harmony.Patch((MethodBase)AccessTools.Method(AccessTools.TypeByName("LCAutoRevive.Patches.PlayerControllerBPatcher"), "KillPlayerPostfix", (Type[])null, (Type[])null), new HarmonyMethod(typeof(LethalBotAutoReviveHelper), "KillPlayerPostfix_Prefix", (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); _harmony.Patch((MethodBase)AccessTools.Method(AccessTools.TypeByName("LCAutoRevive.Patches.StartOfRoundPatcher"), "ReviveDeadPlayersPostfix", (Type[])null, (Type[])null), (HarmonyMethod)null, new HarmonyMethod(typeof(LethalBotAutoReviveHelper), "ReviveDeadPlayersPostfix_Postfix", (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); _harmony.Patch((MethodBase)AccessTools.Method(AccessTools.TypeByName("LCAutoRevive.Patches.StartOfRoundPatcher"), "ShipLeavePostfix", (Type[])null, (Type[])null), (HarmonyMethod)null, new HarmonyMethod(typeof(LethalBotAutoReviveHelper), "ShipLeavePostfix_Postfix", (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); _harmony.Patch((MethodBase)AccessTools.Method(AccessTools.TypeByName("LCAutoRevive.Network.NetworkHandler"), "CheckIfAllPlayersDead", (Type[])null, (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null, new HarmonyMethod(typeof(LethalBotAutoReviveHelper), "CheckIfAllPlayersDead_Transpiler", (Type[])null), (HarmonyMethod)null, (HarmonyMethod)null); } } private bool IsModLoaded(string modGUID) { bool flag = Chainloader.PluginInfos.ContainsKey(modGUID); if (flag) { LogInfo("Mod compatibility loaded for mod : GUID " + modGUID); } return flag; } private bool IsPreLoaderLoaded(string dllFileName, List fileNames) { bool flag = fileNames.Contains(dllFileName); if (flag) { LogInfo("Mod compatibility loaded for preloader : " + dllFileName); } return flag; } private static void InitializeNetworkBehaviours() { Type[] types = Assembly.GetExecutingAssembly().GetTypes(); Type[] array = types; foreach (Type type in array) { MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic); MethodInfo[] array2 = methods; foreach (MethodInfo methodInfo in array2) { try { object[] customAttributes = methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false); if (customAttributes.Length != 0) { methodInfo.Invoke(null, null); } } catch { } } } } private static void InitPluginManager() { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Expected O, but got Unknown GameObject val = new GameObject("PluginManager"); val.AddComponent(); PluginManager.Instance.InitManagers(); } [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static void LogDebug(string debugLog) { if (Config.EnableDebugLog.Value) { Logger.LogDebug((object)debugLog); } } [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static void LogInfo(string infoLog) { Logger.LogInfo((object)infoLog); } [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static void LogWarning(string warningLog) { Logger.LogWarning((object)warningLog); } [MethodImpl(MethodImplOptions.AggressiveInlining)] internal static void LogError(string errorLog) { Logger.LogError((object)errorLog); } } public static class MyPluginInfo { public const string PLUGIN_GUID = "LethalBots"; public const string PLUGIN_NAME = "LethalBots"; public const string PLUGIN_VERSION = "7.1.0"; } } namespace LethalBots.Utils { internal static class ComponentUtil { public static void ListAllComponents(GameObject gameObject) { if ((Object)(object)gameObject == (Object)null) { return; } Plugin.LogDebug(" "); Plugin.LogDebug("List of components :"); Component[] components = gameObject.GetComponents(typeof(Component)); Component[] array = components; foreach (Component val in array) { if (!((Object)(object)val == (Object)null)) { Plugin.LogDebug(((object)val).ToString()); } } Plugin.LogDebug("Child components :"); components = gameObject.GetComponentsInChildren(typeof(Component)); Component[] array2 = components; foreach (Component val2 in array2) { if (!((Object)(object)val2 == (Object)null)) { Plugin.LogDebug(((object)val2).ToString()); } } Plugin.LogDebug("Parent components :"); components = gameObject.GetComponentsInParent(typeof(Component)); Component[] array3 = components; foreach (Component val3 in array3) { if (!((Object)(object)val3 == (Object)null)) { Plugin.LogDebug(((object)val3).ToString()); } } } public static void ListAllColliders(GameObject gameObject) { if ((Object)(object)gameObject == (Object)null) { return; } Plugin.LogDebug(" "); Plugin.LogDebug("List of Colliders: "); Component[] components = gameObject.GetComponents(typeof(Collider)); Component[] array = components; foreach (Component val in array) { if (!((Object)(object)val == (Object)null)) { Plugin.LogDebug(((object)val).ToString()); } } Plugin.LogDebug("Child Colliders: "); components = gameObject.GetComponentsInChildren(typeof(Collider)); Component[] array2 = components; foreach (Component val2 in array2) { if (!((Object)(object)val2 == (Object)null)) { Plugin.LogDebug(((object)val2).ToString()); } } Plugin.LogDebug("Parent Colliders: "); components = gameObject.GetComponentsInParent(typeof(Collider)); Component[] array3 = components; foreach (Component val3 in array3) { if (!((Object)(object)val3 == (Object)null)) { Plugin.LogDebug(((object)val3).ToString()); } } } public static void SetFieldValue(object obj, string fieldName, object value) { Type type = obj.GetType(); FieldInfo field = type.GetField(fieldName, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); field.SetValue(obj, value); } public static void SetPropertyValue(object obj, string propertyName, object value) { Type type = obj.GetType(); PropertyInfo property = type.GetProperty(propertyName, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); property.SetValue(obj, value); } public static T GetCopyOf(this Component comp, T other) where T : Component { Type type = ((object)comp).GetType(); if (type != ((object)other).GetType()) { return default(T); } BindingFlags bindingAttr = BindingFlags.DeclaredOnly | BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic; PropertyInfo[] properties = type.GetProperties(bindingAttr); PropertyInfo[] array = properties; foreach (PropertyInfo propertyInfo in array) { if (propertyInfo.CanWrite && propertyInfo.CanRead && !(propertyInfo.Name == "name")) { try { propertyInfo.SetValue(comp, propertyInfo.GetValue(other, null), null); } catch { } } } FieldInfo[] allFields = PropertiesAndFieldsUtils.GetAllFields(type); FieldInfo[] array2 = allFields; foreach (FieldInfo fieldInfo in array2) { if (!fieldInfo.IsStatic) { fieldInfo.SetValue(comp, fieldInfo.GetValue(other)); } } return (T)(object)((comp is T) ? comp : null); } public static T AddCopyOfComponent(this GameObject go, T toAdd) where T : Component { return ((Component)(object)go.AddComponent()).GetCopyOf(toAdd); } public static T CopyComponent(T original, GameObject destination) where T : Component { Type type = ((object)original).GetType(); Component component = destination.GetComponent(type); T val = (T)(object)((component is T) ? component : null); if (!Object.op_Implicit((Object)(object)val)) { Component obj = destination.AddComponent(type); val = (T)(object)((obj is T) ? obj : null); } FieldInfo[] allFields = PropertiesAndFieldsUtils.GetAllFields(type); FieldInfo[] array = allFields; foreach (FieldInfo fieldInfo in array) { if (!fieldInfo.IsStatic) { fieldInfo.SetValue(val, fieldInfo.GetValue(original)); } } PropertyInfo[] properties = type.GetProperties(); PropertyInfo[] array2 = properties; foreach (PropertyInfo propertyInfo in array2) { if (propertyInfo.CanWrite && propertyInfo.CanWrite && !(propertyInfo.Name == "name")) { propertyInfo.SetValue(val, propertyInfo.GetValue(original, null), null); } } return val; } } internal static class DrawUtil { public static void DrawWhiteLine(LineRenderer? lr, Ray ray, float length) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) DrawLine(lr, ray, length, Color.white); } public static void DrawLine(LineRenderer? lr, Ray ray, float length, Color color) { //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) Vector3 origin = ((Ray)(ref ray)).origin; Vector3 origin2 = ((Ray)(ref ray)).origin; Vector3 direction = ((Ray)(ref ray)).direction; DrawLine(lr, origin, origin2 + ((Vector3)(ref direction)).normalized * length, color); } public static void DrawLine(LineRenderer? lr, Vector3 start, Vector3 end, Color color) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) if (!((Object)(object)lr == (Object)null)) { ((Renderer)lr).material = new Material(Shader.Find("Legacy Shaders/Particles/Alpha Blended Premultiply")); lr.startColor = color; lr.endColor = color; lr.startWidth = 0.1f; lr.endWidth = 0.1f; lr.SetPosition(0, start); lr.SetPosition(1, end); } } } public class LineRendererUtil { private LineRenderer[] _listLineRenderers; private Transform _transformToParent; private int _index; public LineRendererUtil(int nbMaxLineRenderer, Transform transformToParent) { _listLineRenderers = (LineRenderer[])(object)new LineRenderer[nbMaxLineRenderer]; _transformToParent = transformToParent; } public LineRenderer? GetLineRenderer() { return null; } private LineRenderer CreateLineRenderer() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) LineRenderer lineRenderer = new GameObject().AddComponent(); return InitLineRenderer(ref lineRenderer); } private LineRenderer InitLineRenderer(ref LineRenderer lineRenderer) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) ((Component)lineRenderer).gameObject.transform.SetParent(((Component)_transformToParent).transform, false); ((Component)lineRenderer).gameObject.transform.SetPositionAndRotation(Vector3.zero, Quaternion.identity); return lineRenderer; } } internal static class PatchesUtil { public static readonly FieldInfo FieldInfoWasUnderwaterLastFrame = AccessTools.Field(typeof(PlayerControllerB), "wasUnderwaterLastFrame"); public static readonly FieldInfo FieldInfoPlayerClientId = AccessTools.Field(typeof(PlayerControllerB), "playerClientId"); public static readonly FieldInfo FieldInfoPreviousAnimationStateHash = AccessTools.Field(typeof(PlayerControllerB), "previousAnimationStateHash"); public static readonly FieldInfo FieldInfoCurrentAnimationStateHash = AccessTools.Field(typeof(PlayerControllerB), "currentAnimationStateHash"); public static readonly FieldInfo FieldInfoTargetPlayer = AccessTools.Field(typeof(EnemyAI), "targetPlayer"); public static readonly FieldInfo FieldInfoDraggingPlayer = AccessTools.Field(typeof(BushWolfEnemy), "draggingPlayer"); public static readonly FieldRef usedTerminalThisSessionField = (FieldRef)(object)AccessTools.FieldRefAccess(typeof(Terminal), "usedTerminalThisSession"); public static readonly FieldRef syncedTerminalValuesField = (FieldRef)(object)AccessTools.FieldRefAccess(typeof(Terminal), "syncedTerminalValues"); public static readonly FieldRef totalCostOfItemsField = (FieldRef)(object)AccessTools.FieldRefAccess(typeof(Terminal), "totalCostOfItems"); public static readonly FieldRef broadcastedCodeThisFrameField = (FieldRef)(object)AccessTools.FieldRefAccess(typeof(Terminal), "broadcastedCodeThisFrame"); public static readonly FieldRef hasGottenNounField = (FieldRef)(object)AccessTools.FieldRefAccess(typeof(Terminal), "hasGottenNoun"); public static readonly FieldRef hasGottenVerbField = (FieldRef)(object)AccessTools.FieldRefAccess(typeof(Terminal), "hasGottenVerb"); public static readonly FieldRef terminalTriggerField = (FieldRef)(object)AccessTools.FieldRefAccess(typeof(Terminal), "terminalTrigger"); public static readonly FieldRef> itemsToDeliverField = (FieldRef>)(object)AccessTools.FieldRefAccess>(typeof(ItemDropship), "itemsToDeliver"); public static readonly FieldRef positionOfDeathField = (FieldRef)(object)AccessTools.FieldRefAccess(typeof(PlayerControllerB), "positionOfDeath"); public static readonly FieldRef timeSinceSwitchingSlotsField = (FieldRef)(object)AccessTools.FieldRefAccess(typeof(PlayerControllerB), "timeSinceSwitchingSlots"); public static readonly FieldRef slimeSlipAudioVolumeSyncField = (FieldRef)(object)AccessTools.FieldRefAccess(typeof(PlayerControllerB), "slimeSlipAudioVolumeSync"); public static readonly FieldRef triggerScriptField = (FieldRef)(object)AccessTools.FieldRefAccess(typeof(EntranceTeleport), "triggerScript"); public static readonly FieldRef stalkingFrozenField = (FieldRef)(object)AccessTools.FieldRefAccess(typeof(PumaAI), "stalkingFrozen"); public static readonly FieldRef stopMovementTimerField = (FieldRef)(object)AccessTools.FieldRefAccess(typeof(SpringManAI), "stopMovementTimer"); public static readonly MethodInfo PlayerLoadedServerRpcMethod = AccessTools.Method(typeof(StartOfRound), "PlayerLoadedServerRpc", (Type[])null, (Type[])null); public static readonly MethodInfo KillPlayerServerRpcMethod = AccessTools.Method(typeof(PlayerControllerB), "KillPlayerServerRpc", (Type[])null, (Type[])null); public static readonly MethodInfo AllEntitiesCountMethod = SymbolExtensions.GetMethodInfo((Expression)(() => AllEntitiesCount())); public static readonly MethodInfo AllRealPlayersCountMethod = SymbolExtensions.GetMethodInfo((Expression)(() => AllRealPlayersCount())); public static readonly MethodInfo IsPlayerLocalOrLethalBotOwnerLocalMethod = SymbolExtensions.GetMethodInfo(Expression.Lambda(Expression.Call(null, (MethodInfo)MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), Expression.New(typeof(PlayerControllerB))), Array.Empty())); public static readonly MethodInfo IsPlayerLocalOrLethalBotMethod = SymbolExtensions.GetMethodInfo(Expression.Lambda(Expression.Call(null, (MethodInfo)MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), Expression.New(typeof(PlayerControllerB))), Array.Empty())); public static readonly MethodInfo IsColliderFromLocalOrLethalBotOwnerLocalMethod = SymbolExtensions.GetMethodInfo(Expression.Lambda(Expression.Call(null, (MethodInfo)MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), Expression.New(typeof(Collider))), Array.Empty())); public static readonly MethodInfo IsPlayerLethalBotMethod = SymbolExtensions.GetMethodInfo(Expression.Lambda(Expression.Call(null, (MethodInfo)MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), Expression.New(typeof(PlayerControllerB))), Array.Empty())); public static readonly MethodInfo IsPlayerLocalMethod = SymbolExtensions.GetMethodInfo(Expression.Lambda(Expression.Call(null, (MethodInfo)MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), Expression.New(typeof(PlayerControllerB))), Array.Empty())); public static readonly MethodInfo IsIdPlayerLethalBotMethod = SymbolExtensions.GetMethodInfo((Expression)(() => IsIdPlayerLethalBot(0))); public static readonly MethodInfo IsRagdollPlayerIdLethalBotMethod = SymbolExtensions.GetMethodInfo(Expression.Lambda(Expression.Call(null, (MethodInfo)MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), Expression.New(typeof(RagdollGrabbableObject))), Array.Empty())); public static readonly MethodInfo IsPlayerLethalBotOwnerLocalMethod = SymbolExtensions.GetMethodInfo(Expression.Lambda(Expression.Call(null, (MethodInfo)MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), Expression.New(typeof(PlayerControllerB))), Array.Empty())); public static readonly MethodInfo IsAnLethalBotAiOwnerOfObjectMethod = SymbolExtensions.GetMethodInfo((Expression)(() => IsAnLethalBotAiOwnerOfObject((GrabbableObject)new object()))); public static readonly MethodInfo DisableOriginalGameDebugLogsMethod = SymbolExtensions.GetMethodInfo((Expression)(() => DisableOriginalGameDebugLogs())); public static readonly MethodInfo IsPlayerLethalBotControlledAndOwnerMethod = SymbolExtensions.GetMethodInfo(Expression.Lambda(Expression.Call(null, (MethodInfo)MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), Expression.New(typeof(PlayerControllerB))), Array.Empty())); public static readonly MethodInfo GetDamageFromSlimeIfLethalBotMethod = SymbolExtensions.GetMethodInfo(Expression.Lambda(Expression.Call(null, (MethodInfo)MethodBase.GetMethodFromHandle((RuntimeMethodHandle)/*OpCode not supported: LdMemberToken*/), Expression.New(typeof(PlayerControllerB))), Array.Empty())); public static readonly MethodInfo SyncJumpMethod = SymbolExtensions.GetMethodInfo((Expression)(() => SyncJump(0uL))); public static readonly MethodInfo SyncLandFromJumpMethod = SymbolExtensions.GetMethodInfo((Expression)(() => SyncLandFromJump(0uL, fallHard: false))); public static List InsertIsPlayerLethalBotInstructions(List codes, ILGenerator generator, int startIndex, int indexToJumpTo) { //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Expected O, but got Unknown //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Expected O, but got Unknown //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Expected O, but got Unknown //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Expected O, but got Unknown List