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 Open Ship Door And Get Fired v0.0.3
bauyrsaq.OpenDoorFired.dll
Decompiled 2 years agousing System; using System.Collections; 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.Logging; using HarmonyLib; using LobbyCompatibility.Attributes; using Microsoft.CodeAnalysis; using Unity.Netcode; using UnityEngine; using bauyrsaq.OpenDoorFired.NetcodePatcher; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: IgnoresAccessChecksTo("AmazingAssets.TerrainToMesh")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp-firstpass")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: IgnoresAccessChecksTo("ClientNetworkTransform")] [assembly: IgnoresAccessChecksTo("DissonanceVoip")] [assembly: IgnoresAccessChecksTo("Facepunch Transport for Netcode for GameObjects")] [assembly: IgnoresAccessChecksTo("Facepunch.Steamworks.Win64")] [assembly: IgnoresAccessChecksTo("Unity.AI.Navigation")] [assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging")] [assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging.DocCodeExamples")] [assembly: IgnoresAccessChecksTo("Unity.Burst")] [assembly: IgnoresAccessChecksTo("Unity.Burst.Unsafe")] [assembly: IgnoresAccessChecksTo("Unity.Collections")] [assembly: IgnoresAccessChecksTo("Unity.Collections.LowLevel.ILSupport")] [assembly: IgnoresAccessChecksTo("Unity.InputSystem")] [assembly: IgnoresAccessChecksTo("Unity.InputSystem.ForUI")] [assembly: IgnoresAccessChecksTo("Unity.Jobs")] [assembly: IgnoresAccessChecksTo("Unity.Mathematics")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.Common")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.MetricTypes")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStats")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Component")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Configuration")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Implementation")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsReporting")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkProfiler.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkSolutionInterface")] [assembly: IgnoresAccessChecksTo("Unity.Netcode.Components")] [assembly: IgnoresAccessChecksTo("Unity.Netcode.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.Networking.Transport")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Csg")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.KdTree")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Poly2Tri")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Stl")] [assembly: IgnoresAccessChecksTo("Unity.Profiling.Core")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.ShaderLibrary")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Config.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.ShaderGraph.ShaderGraphLibrary")] [assembly: IgnoresAccessChecksTo("Unity.Services.Authentication")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Analytics")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Configuration")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Device")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments.Internal")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Internal")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Networking")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Registration")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Scheduler")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Telemetry")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Threading")] [assembly: IgnoresAccessChecksTo("Unity.Services.QoS")] [assembly: IgnoresAccessChecksTo("Unity.Services.Relay")] [assembly: IgnoresAccessChecksTo("Unity.TextMeshPro")] [assembly: IgnoresAccessChecksTo("Unity.Timeline")] [assembly: IgnoresAccessChecksTo("Unity.VisualEffectGraph.Runtime")] [assembly: IgnoresAccessChecksTo("UnityEngine.ARModule")] [assembly: IgnoresAccessChecksTo("UnityEngine.NVIDIAModule")] [assembly: IgnoresAccessChecksTo("UnityEngine.UI")] [assembly: AssemblyCompany("bauyrsaq.OpenDoorFired")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("0.0.0.0")] [assembly: AssemblyInformationalVersion("0.0.0-dev")] [assembly: AssemblyProduct("OpenHangarDoorAndGetFired")] [assembly: AssemblyTitle("bauyrsaq.OpenDoorFired")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: NetcodePatchedAssembly] internal class <Module> { static <Module>() { } } 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; } } [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 OpenHangarDoorAndGetFired { [BepInPlugin("bauyrsaq.OpenDoorFired", "OpenHangarDoorAndGetFired", "0.0.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [LobbyCompatibility(/*Could not decode attribute arguments.*/)] public class OpenHangarDoorAndGetFired : BaseUnityPlugin { private const string modGUID = "bauyrsaq.OpenHangarDoorAndGetFired"; private const string modName = "Open Ship Door And Get Fired"; private const string modVersion = "0.0.2"; public static bool despawnProps = true; public static bool welcomeSound = true; public static bool despawnBoughtFurniture = true; public static OpenHangarDoorAndGetFired Instance { get; private set; } = null; internal static ManualLogSource Logger { get; private set; } = null; internal static Harmony? Harmony { get; set; } private void Awake() { Logger = ((BaseUnityPlugin)this).Logger; Instance = this; despawnProps = ((BaseUnityPlugin)this).Config.Bind<bool>("Settings", "Despawn Scraps", true, "Makes disappear ur collected scrap >:)").Value; welcomeSound = ((BaseUnityPlugin)this).Config.Bind<bool>("Settings", "Play welcome voice audio", true, "Play the welcome to your new job audio on the ship after restarting?").Value; NetcodePatcher(); Patch(); Logger.LogInfo((object)"bauyrsaq.OpenDoorFired v0.0.0 has loaded!"); Logger.LogInfo((object)"Now you can open hangar door and get suckd into space"); Logger.LogInfo((object)"------------------------------------------------------"); } internal static void Patch() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown if (Harmony == null) { Harmony = new Harmony("bauyrsaq.OpenDoorFired"); } Logger.LogDebug((object)"Patching..."); Harmony.PatchAll(); Logger.LogDebug((object)"Finished patching!"); } internal static void Unpatch() { Logger.LogDebug((object)"Unpatching..."); Harmony? harmony = Harmony; if (harmony != null) { harmony.UnpatchSelf(); } Logger.LogDebug((object)"Finished unpatching!"); } private void NetcodePatcher() { 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) { object[] customAttributes = methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false); if (customAttributes.Length != 0) { methodInfo.Invoke(null, null); } } } } } public static class MyPluginInfo { public const string PLUGIN_GUID = "bauyrsaq.OpenDoorFired"; public const string PLUGIN_NAME = "OpenHangarDoorAndGetFired"; public const string PLUGIN_VERSION = "0.0.0"; } } namespace OpenHangarDoorAndGetFired.Patches { [HarmonyPatch(typeof(HangarShipDoor))] public class HangarShipDoorPatch : NetworkBehaviour { [HarmonyPatch("Update")] [HarmonyPrefix] private static void Update(HangarShipDoor __instance) { __instance.buttonsEnabled = true; } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "HangarShipDoorPatch"; } } public class OpenHangarDoorManager : NetworkBehaviour, INetworkSerializable { private bool didOpenDoor = false; private HangarShipDoor door; public static OpenHangarDoorManager Instance { get; private set; } public override void OnNetworkSpawn() { if (NetworkManager.Singleton.IsHost || NetworkManager.Singleton.IsServer) { OpenHangarDoorManager instance = Instance; if (instance != null) { ((Component)instance).gameObject.GetComponent<NetworkObject>().Despawn(true); } } Instance = this; ((NetworkBehaviour)this).OnNetworkSpawn(); } private void Awake() { door = Object.FindAnyObjectByType<HangarShipDoor>(); } private void Update() { if (StartOfRound.Instance.travellingToNewLevel || !StartOfRound.Instance.inShipPhase || (!StartOfRound.Instance.hangarDoorsClosed && StartOfRound.Instance.shipHasLanded)) { return; } if (!door.shipDoorsAnimator.GetBool("Closed")) { if (!didOpenDoor) { FirePlayersAfterDeadlineMine_ClientRpc(); didOpenDoor = true; } } else { didOpenDoor = false; } } private IEnumerator OpenDoorCoroutine() { StartOfRound __instance = StartOfRound.Instance; ((Component)__instance.shipAnimatorObject).gameObject.GetComponent<Animator>().SetBool("AlarmRinging", true); __instance.shipRoomLights.SetShipLightsOnLocalClientOnly(false); __instance.shipDoorAudioSource.PlayOneShot(__instance.alarmSFX); __instance.shipDoorsAnimator.SetBool("OpenInOrbit", true); __instance.shipDoorAudioSource.PlayOneShot(__instance.airPressureSFX); __instance.starSphereObject.SetActive(true); __instance.starSphereObject.transform.position = ((Component)GameNetworkManager.Instance.localPlayerController).transform.position; yield return (object)new WaitForSeconds(0.25f); __instance.suckingPlayersOutOfShip = true; __instance.suckingFurnitureOutOfShip = true; PlaceableShipObject[] array = Object.FindObjectsOfType<PlaceableShipObject>(); for (int i = 0; i < array.Length; i++) { if ((Object)(object)array[i].parentObject == (Object)null) { Debug.Log((object)("Error! No parentObject for placeable object: " + __instance.unlockablesList.unlockables[array[i].unlockableID].unlockableName)); continue; } array[i].parentObject.StartSuckingOutOfShip(); if (__instance.unlockablesList.unlockables[array[i].unlockableID].spawnPrefab) { Collider[] componentsInChildren = ((Component)array[i].parentObject).GetComponentsInChildren<Collider>(); for (int j = 0; j < componentsInChildren.Length; j++) { componentsInChildren[j].enabled = false; } } } GameNetworkManager.Instance.localPlayerController.inSpecialInteractAnimation = true; HUDManager.Instance.UIAudio.PlayOneShot(__instance.suckedIntoSpaceSFX); yield return (object)new WaitForSeconds(6f); SoundManager.Instance.SetDiageticMixerSnapshot(3, 2f); yield return (object)new WaitForSeconds(2f); __instance.starSphereObject.SetActive(false); __instance.shipDoorAudioSource.Stop(); __instance.speakerAudioSource.Stop(); __instance.suckingFurnitureOutOfShip = false; Debug.Log((object)"Calling reset ship!"); ResetShipMine(); yield return (object)new WaitForSeconds(6f); ((Component)__instance.shipAnimatorObject).gameObject.GetComponent<Animator>().SetBool("AlarmRinging", false); GameNetworkManager.Instance.localPlayerController.TeleportPlayer(__instance.playerSpawnPositions[(int)(IntPtr)checked((long)GameNetworkManager.Instance.localPlayerController.playerClientId)].position, false, 0f, false, true); __instance.shipDoorsAnimator.SetBool("OpenInOrbit", false); __instance.currentPlanetPrefab.transform.position = ((Component)__instance.planetContainer).transform.position; __instance.suckingPlayersOutOfShip = false; __instance.choseRandomFlyDirForPlayer = false; __instance.suckingPower = 0f; __instance.shipRoomLights.SetShipLightsOnLocalClientOnly(true); yield return (object)new WaitForSeconds(2f); if (((NetworkBehaviour)this).IsServer) { StartOfRound obj = __instance; obj.playersRevived++; yield return (object)new WaitUntil((Func<bool>)(() => __instance.playersRevived >= GameNetworkManager.Instance.connectedPlayers)); __instance.playersRevived = 0; EndPlayersFiredSequenceMine_ClientRpc(); } else { StartOfRound.Instance.PlayerHasRevivedServerRpc(); } } private void ResetShipFurnitureMine(bool onlyClearBoughtFurniture = false, bool despawnProps = true) { StartOfRound instance = StartOfRound.Instance; Debug.Log((object)"Resetting ship furniture"); if (((NetworkBehaviour)this).IsServer) { for (int i = 0; i < instance.unlockablesList.unlockables.Count; i++) { if (instance.unlockablesList.unlockables[i].alreadyUnlocked || !instance.unlockablesList.unlockables[i].spawnPrefab) { continue; } if (!instance.SpawnedShipUnlockables.TryGetValue(i, out var value)) { instance.SpawnedShipUnlockables.Remove(i); continue; } if ((Object)(object)value == (Object)null) { instance.SpawnedShipUnlockables.Remove(i); continue; } instance.SpawnedShipUnlockables.Remove(i); NetworkObject component = value.GetComponent<NetworkObject>(); if ((Object)(object)component != (Object)null && component.IsSpawned) { component.Despawn(true); } } if (despawnProps) { RoundManager.Instance.DespawnPropsAtEndOfRound(true); } instance.closetLeftDoor.SetBoolOnClientOnly(false); instance.closetRightDoor.SetBoolOnClientOnly(false); } ShipTeleporter.hasBeenSpawnedThisSession = false; ShipTeleporter.hasBeenSpawnedThisSessionInverse = false; if (!onlyClearBoughtFurniture) { PlaceableShipObject[] array = Object.FindObjectsOfType<PlaceableShipObject>(); for (int j = 0; j < array.Length; j++) { if (instance.unlockablesList.unlockables[array[j].unlockableID].alreadyUnlocked && !instance.unlockablesList.unlockables[array[j].unlockableID].spawnPrefab) { array[j].parentObject.disableObject = false; ShipBuildModeManager.Instance.ResetShipObjectToDefaultPosition(array[j]); } } } GameNetworkManager.Instance.ResetUnlockablesListValues(onlyClearBoughtFurniture); for (int k = 0; k < instance.allPlayerScripts.Length; k++) { SoundManager.Instance.playerVoicePitchTargets[k] = 1f; instance.allPlayerScripts[k].ResetPlayerBloodObjects(true); if (instance.isChallengeFile) { UnlockableSuit.SwitchSuitForPlayer(instance.allPlayerScripts[k], 24, true); } else { UnlockableSuit.SwitchSuitForPlayer(instance.allPlayerScripts[k], 0, true); } } } public void ResetShipMine() { StartOfRound instance = StartOfRound.Instance; ResetShipFurnitureMine(onlyClearBoughtFurniture: true, OpenHangarDoorAndGetFired.despawnProps); instance.ResetPooledObjects(true); } [ClientRpc] public void EndPlayersFiredSequenceMine_ClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(150771941u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 150771941u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } StartOfRound instance = StartOfRound.Instance; NetworkManager networkManager2 = ((NetworkBehaviour)this).NetworkManager; if (!((Object)(object)networkManager2 == (Object)null) && networkManager2.IsListening) { instance.firingPlayersCutsceneRunning = false; instance.timeAtStartOfRun = Time.realtimeSinceStartup; instance.ReviveDeadPlayers(); SoundManager.Instance.SetDiageticMixerSnapshot(0, 0.25f); HUDManager.Instance.ShowPlayersFiredScreen(false); GameNetworkManager.Instance.localPlayerController.inSpecialInteractAnimation = false; instance.SetShipReadyToLand(); instance.SetDiscordStatusDetails(); if (!instance.isChallengeFile && OpenHangarDoorAndGetFired.welcomeSound) { instance.PlayFirstDayShipAnimation(false); } door.PlayDoorAnimation(true); } } [ClientRpc] public void FirePlayersAfterDeadlineMine_ClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1325079501u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1325079501u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } StartOfRound instance = StartOfRound.Instance; if (instance.shipDoorsEnabled) { return; } NetworkManager networkManager2 = ((NetworkBehaviour)this).NetworkManager; if (!((Object)(object)networkManager2 == (Object)null) && networkManager2.IsListening) { instance.firingPlayersCutsceneRunning = true; if (Object.FindObjectOfType<Terminal>().terminalInUse) { Object.FindObjectOfType<Terminal>().QuitTerminal(); } if (GameNetworkManager.Instance.localPlayerController.inSpecialInteractAnimation && (Object)(object)GameNetworkManager.Instance.localPlayerController.currentTriggerInAnimationWith != (Object)null) { GameNetworkManager.Instance.localPlayerController.currentTriggerInAnimationWith.StopSpecialAnimation(); } instance.gameStats.daysSpent = 0; instance.gameStats.scrapValueCollected = 0; instance.gameStats.deaths = 0; instance.gameStats.allStepsTaken = 0; instance.SetDiscordStatusDetails(); ((MonoBehaviour)this).StartCoroutine(OpenDoorCoroutine()); } } public void NetworkSerialize<T>(BufferSerializer<T> serializer) where T : IReaderWriter { } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } [RuntimeInitializeOnLoadMethod] internal static void InitializeRPCS_OpenHangarDoorManager() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Expected O, but got Unknown //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown NetworkManager.__rpc_func_table.Add(150771941u, new RpcReceiveHandler(__rpc_handler_150771941)); NetworkManager.__rpc_func_table.Add(1325079501u, new RpcReceiveHandler(__rpc_handler_1325079501)); } private static void __rpc_handler_150771941(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)2; ((OpenHangarDoorManager)(object)target).EndPlayersFiredSequenceMine_ClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1325079501(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)2; ((OpenHangarDoorManager)(object)target).FirePlayersAfterDeadlineMine_ClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "OpenHangarDoorManager"; } } [HarmonyPatch(typeof(StartOfRound))] public class StartOfRoundPatch : NetworkBehaviour { [HarmonyPostfix] [HarmonyPatch("Awake")] private static void Awake_Postfix() { ((Component)StartOfRound.Instance).gameObject.AddComponent<OpenHangarDoorManager>(); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "StartOfRoundPatch"; } } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { public IgnoresAccessChecksToAttribute(string assemblyName) { } } } namespace bauyrsaq.OpenDoorFired.NetcodePatcher { [AttributeUsage(AttributeTargets.Module)] internal class NetcodePatchedAssemblyAttribute : Attribute { } }