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 Synthesis Moon v1.1.5
bauyrsaq.SynthesisAssembly.dll
Decompiled 3 weeks agousing System; using System.Collections; 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.Logging; using GameNetcodeStuff; using HarmonyLib; using Microsoft.CodeAnalysis; using NewSynthesis; using Unity.Netcode; using UnityEngine; using UnityEngine.Events; using UnityEngine.UI; using bauyrsaq.SynthesisAssembly.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("com.olegknyazev.softmask")] [assembly: IgnoresAccessChecksTo("DissonanceVoip")] [assembly: IgnoresAccessChecksTo("EasyTextEffects")] [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.Components")] [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.SynthesisAssembly")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("0.0.0.0")] [assembly: AssemblyInformationalVersion("0.0.0-dev")] [assembly: AssemblyProduct("NewSynthesis")] [assembly: AssemblyTitle("bauyrsaq.SynthesisAssembly")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.0.0.0")] [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] [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 SynthesisLift.Patches { public class MaskedLeverTrigger : MonoBehaviour { [Header("Trigger for Maskeds to open Big Door")] [Space] [SerializeField] private SynthesisController liftScript; private void OnTriggerEnter(Collider other) { MaskedPlayerEnemy val = default(MaskedPlayerEnemy); if (((Component)other).CompareTag("Player") && ((Component)other).TryGetComponent<MaskedPlayerEnemy>(ref val)) { OpenBigDoor(); } } public void OpenBigDoor() { if (!liftScript.isOpen) { liftScript.ToggleBigDoor(); global::NewSynthesis.NewSynthesis.Logger.LogDebug((object)"Masked using big door inside entrance building."); } } } [HarmonyPatch(typeof(PlayerControllerB))] internal class PlayerControllerBPatch { [HarmonyPrefix] [HarmonyPatch("Start")] private static void Start_Prefix(PlayerControllerB __instance, ref bool ___isCameraDisabled) { ((Component)__instance).gameObject.AddComponent<PlayerElevatorManager>(); } } public class PlayerElevatorManager : MonoBehaviour { private PlayerControllerB playerControllerB; private void Start() { playerControllerB = ((Component)this).GetComponent<PlayerControllerB>(); } } public class SynthesisController : NetworkBehaviour { [Header("Lift Settings")] [SerializeField] private GameObject liftLightsObj; [SerializeField] private Animator liftSelf; [SerializeField] private Animator liftInterior; [Space] [SerializeField] private Animator liftDoorL; [SerializeField] private Animator liftDoorR; [HideInInspector] public bool isOnUp = true; [HideInInspector] public bool isMoving = false; private Transform defaultPlayerContainer; [SerializeField] private Text lift3dText; [SerializeField] private GameObject liftApparatus; [SerializeField] private Transform liftApparatusPos; [SerializeField] private GameObject apparatusTrigger; [SerializeField] private List<Transform> apparatusPositions = new List<Transform>(); [SerializeField] private List<MeshRenderer> lights = new List<MeshRenderer>(); [SerializeField] private Material lightsOffMat; [SerializeField] private Material lightsOnMat; public bool liftHasPower = false; public AudioSource liftSound; public AudioSource doorsSound; public AudioSource pffSound; public AudioSource slamSound; private PlayerControllerB player; [Space] [Header("Big Door Settings")] [SerializeField] private Animator bigDoorAnimator; [SerializeField] private GameObject killTrigger; [SerializeField] private Animator leverAnimator1; [SerializeField] private Animator leverAnimator2; [Space] [SerializeField] private MeshRenderer lightMesh; [SerializeField] private Material lightRed_Off; [SerializeField] private Material lightRed_On; [HideInInspector] public bool isOpen = false; [HideInInspector] public bool isBeingUsed = false; [SerializeField] private Transform spinLight; public AudioSource doorSound; private bool updateApparatusPos = false; private bool gameStarted = false; private bool startChecking = true; private GameObject liftHolder; public GameObject shelfSpawner; private GameObject shelfSelf; private InteractTrigger fireExitDoor; [Space(5f)] public bool hasLungPower = false; public Transform lungHolder; private LungProp attachedLungProp = null; public UnityEvent onLungDocked; public UnityEvent onLungTaken; public void Awake() { global::NewSynthesis.NewSynthesis.Logger.LogDebug((object)"Flashing light. lights.. lights..."); ((MonoBehaviour)this).StartCoroutine(FlashingLights()); } public IEnumerator FlashingLights() { global::NewSynthesis.NewSynthesis.Logger.LogDebug((object)"On coroutine"); yield return (object)new WaitForSeconds(3f); SetStartCheck(); global::NewSynthesis.NewSynthesis.Logger.LogDebug((object)"Start Checking!"); } public void SetStartCheck() { startChecking = true; } private GameObject FindGameObjectStartingWith(string prefix) { GameObject[] array = Object.FindObjectsOfType<GameObject>(); GameObject[] array2 = array; foreach (GameObject val in array2) { if (((Object)val).name.StartsWith(prefix)) { return val; } } return null; } public void SynthStartLater() { //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) isOpen = false; if ((Object)(object)liftApparatus == (Object)null) { liftHolder = GameObject.Find("LiftLungApparatus"); global::NewSynthesis.NewSynthesis.Logger.LogWarning((object)"Setting null apparatus"); } ((GrabbableObject)liftApparatus.GetComponent<LungProp>()).grabbable = true; ((GrabbableObject)liftApparatus.GetComponent<LungProp>()).isHeld = false; ((GrabbableObject)liftApparatus.GetComponent<LungProp>()).isHeldByEnemy = false; liftHolder = GameObject.Find("_LHolder"); if ((Object)(object)liftHolder == (Object)null) { global::NewSynthesis.NewSynthesis.Logger.LogError((object)"Lift Holder is null!"); } shelfSelf = FindGameObjectStartingWith("LiftStorageShelf"); if ((Object)(object)shelfSelf == (Object)null) { global::NewSynthesis.NewSynthesis.Logger.LogError((object)"Shelf is null!"); } else { shelfSelf.transform.parent = liftHolder.transform.parent; shelfSelf.transform.position = shelfSpawner.transform.position; shelfSelf.transform.rotation = shelfSpawner.transform.rotation; } fireExitDoor = GameObject.Find("EntranceTeleportB").GetComponent<InteractTrigger>(); if ((Object)(object)fireExitDoor == (Object)null) { global::NewSynthesis.NewSynthesis.Logger.LogError((object)"Fire exit is null!"); } foreach (MeshRenderer light in lights) { ((Renderer)light).material = lightsOffMat; } PlaceApparatusRandomPos(); killTrigger.SetActive(false); liftLightsObj.SetActive(false); liftDoorL.SetTrigger("Open"); liftDoorR.SetTrigger("Open"); lift3dText.text = " "; } [ServerRpc(RequireOwnership = false)] public void StartGame_ServerRpc() { //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) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3211725304u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3211725304u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; StartGame_ClientRpc(); } } } [ClientRpc] public void StartGame_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) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_017b: 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 != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1282339256u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1282339256u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; isOpen = false; apparatusTrigger = GameObject.Find("ApparatusTrigger"); liftHolder = GameObject.Find("_!LHolder"); shelfSpawner = GameObject.Find("LiftStorageShelfSpawn"); shelfSelf = GameObject.Find("LiftStorageShelfContainer"); fireExitDoor = GameObject.Find("EntranceTeleportB").GetComponent<InteractTrigger>(); shelfSelf.transform.parent = liftHolder.transform.parent; shelfSelf.transform.position = shelfSpawner.transform.position; shelfSelf.transform.rotation = shelfSpawner.transform.rotation; foreach (MeshRenderer light in lights) { ((Renderer)light).material = lightsOffMat; } PlaceApparatusRandomPos(); killTrigger.SetActive(false); liftLightsObj.SetActive(false); liftDoorL.SetTrigger("Open"); liftDoorR.SetTrigger("Open"); } private void Update() { if (startChecking && !gameStarted && (Object)(object)GameNetworkManager.Instance != (Object)null && (Object)(object)StartOfRound.Instance != (Object)null && StartOfRound.Instance.fullyLoadedPlayers.Count >= GameNetworkManager.Instance.connectedPlayers) { ((MonoBehaviour)this).Invoke("SynthStartLater", 4f); gameStarted = true; } if (hasLungPower && (Object)(object)attachedLungProp != (Object)null && !attachedLungProp.isLungDocked) { SetLungPower_ServerRpc(newValue: false); } } public void PlayerUseApparatus(PlayerControllerB usedPlayer) { LungProp val = default(LungProp); if (!hasLungPower && (Object)(object)usedPlayer.currentlyHeldObjectServer != (Object)null && ((Component)usedPlayer.currentlyHeldObjectServer).TryGetComponent<LungProp>(ref val) && (Object)(object)val != (Object)null) { DockLungProp((int)((NetworkBehaviour)val).NetworkObject.NetworkObjectId); Debug.Log((object)"[Aeclis/LungDocker] Got apparatus script;"); } } public void DockLungProp(int lungNetworkId) { DockLungProp_ServerRpc(lungNetworkId); } [ServerRpc(RequireOwnership = false)] public void DockLungProp_ServerRpc(int lungNetworkId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: 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_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2957985298u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, lungNetworkId); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2957985298u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; DockLungProp_ClientRpc(lungNetworkId); Debug.Log((object)"[Aeclis/LungDocker] ServerRpc dock;"); } } } [ClientRpc] public void DockLungProp_ClientRpc(int lungNetworkId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: 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_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0181: 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 != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1359851734u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, lungNetworkId); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1359851734u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (NetworkManager.Singleton.SpawnManager.SpawnedObjects.TryGetValue((ulong)lungNetworkId, out var value)) { LungProp component = ((Component)value).GetComponent<LungProp>(); if ((Object)(object)component != (Object)null) { Debug.Log((object)"[Aeclis/LungDocker] Found LungProp component on client."); attachedLungProp = component; ((GrabbableObject)component).playerHeldBy.DiscardHeldObject(true, ((Component)lungHolder).GetComponent<NetworkObject>(), lungHolder.position, true); ((GrabbableObject)component).targetFloorPosition = Vector3.zero; component.isLungDocked = true; component.isLungDockedInElevator = true; ((GrabbableObject)component).hasHitGround = true; ((GrabbableObject)component).isHeldByEnemy = false; ((GrabbableObject)component).hasBeenHeld = false; ((GrabbableObject)component).reachedFloorTarget = true; ((Component)component).transform.rotation = lungHolder.rotation; ((Component)component).GetComponent<AudioSource>().Play(); component.sparkParticle.SetActive(true); ((MonoBehaviour)this).Invoke("DisableSparkleEffect", 0.3f); onLungDocked.Invoke(); hasLungPower = true; PlaceApparatusLiftServerRpc(); } else { Debug.LogWarning((object)"[Aeclis/LungDocker] NetworkObject found, but LungProp component is missing."); } } else { Debug.LogWarning((object)("[Aeclis/LungDocker] Failed to find NetworkObject with ID: " + lungNetworkId)); } Debug.Log((object)"[Aeclis/LungDocker] ClientRpc dock;"); } private void DisableSparkleEffect() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) attachedLungProp.sparkParticle.SetActive(false); ((Component)attachedLungProp).transform.rotation = lungHolder.rotation; } [ServerRpc(RequireOwnership = false)] public void SetLungPower_ServerRpc(bool newValue) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: 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_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(4146058954u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref newValue, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 4146058954u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SetLungPower_ClientRpc(newValue); } } } [ClientRpc] public void SetLungPower_ClientRpc(bool newValue) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: 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_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: 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 != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3116699192u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref newValue, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3116699192u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; hasLungPower = newValue; if (!hasLungPower) { onLungTaken.Invoke(); } else { onLungDocked.Invoke(); } Debug.Log((object)$"[Aeclis/LungDocker] SetLungPower_ClientRpc called with value: {newValue}."); } } public void PlaceApparatusRandomPos() { int lastDigit = GetLastDigit(StartOfRound.Instance.randomMapSeed); int num = lastDigit; } private int GetLastDigit(int number) { return Mathf.Abs(number) % 10; } public void ToggleLift() { ToggleLiftServerRpc(); } [ServerRpc(RequireOwnership = false)] public void ToggleLiftServerRpc() { //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) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(454021743u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 454021743u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; global::NewSynthesis.NewSynthesis.Logger.LogDebug((object)"Tryna use Lift"); ToggleLiftClientRpc(); } } } [ClientRpc] public void ToggleLiftClientRpc() { //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) //IL_00c1: 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 != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3765726848u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3765726848u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (!liftHasPower) { return; } if ((Object)(object)liftInterior != (Object)null && (Object)(object)liftSelf != (Object)null) { if (!isMoving) { if (!isOnUp) { ((MonoBehaviour)this).StartCoroutine(MoveLift(moveDown: false)); isOnUp = true; global::NewSynthesis.NewSynthesis.Logger.LogDebug((object)"Moving Up Lift"); } else { ((MonoBehaviour)this).StartCoroutine(MoveLift(moveDown: true)); isOnUp = false; global::NewSynthesis.NewSynthesis.Logger.LogDebug((object)"Moving Down Lift"); } } } else { global::NewSynthesis.NewSynthesis.Logger.LogDebug((object)"Animators are null!"); } } public IEnumerator MoveLift(bool moveDown) { isMoving = true; yield return (object)new WaitForSeconds(0.1f); doorsSound.Play(); liftDoorL.SetTrigger("Close"); liftDoorR.SetTrigger("Close"); yield return (object)new WaitForSeconds(0.55f); slamSound.Play(); lift3dText.text = "Moving"; liftInterior.SetTrigger("start"); yield return (object)new WaitForSeconds(0.47f); liftSound.Play(); if (moveDown) { liftSelf.SetTrigger("goDown"); } else { liftSelf.SetTrigger("goUp"); } yield return (object)new WaitForSeconds(9f); liftSound.Stop(); doorsSound.Play(); liftDoorL.SetTrigger("Open"); liftDoorR.SetTrigger("Open"); yield return (object)new WaitForSeconds(0.1f); pffSound.Play(); yield return (object)new WaitForSeconds(0.45f); lift3dText.text = "Free"; isMoving = false; } public void PlaceApparatusLift() { if (!liftHasPower && ((GrabbableObject)liftApparatus.GetComponent<LungProp>()).isHeld && (Object)(object)((GrabbableObject)liftApparatus.GetComponent<LungProp>()).playerHeldBy == (Object)(object)StartOfRound.Instance.localPlayerController) { PlaceApparatusLiftServerRpc(); } } [ServerRpc(RequireOwnership = false)] public void PlaceApparatusLiftServerRpc() { //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) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3462126603u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3462126603u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PlaceApparatusLiftClientRpc(); PlaceApparatusLiftNoRpc(); } } } [ClientRpc] private void PlaceApparatusLiftClientRpc() { //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) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2332923323u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2332923323u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PlaceApparatusLiftNoRpc(); } } } public void PlaceApparatusLiftNoRpc() { ((Collider)((Component)attachedLungProp).GetComponent<BoxCollider>()).enabled = false; ((Collider)apparatusTrigger.GetComponent<BoxCollider>()).enabled = false; liftLightsObj.SetActive(true); foreach (MeshRenderer light in lights) { ((Renderer)light).material = lightsOnMat; } updateApparatusPos = true; ((MonoBehaviour)this).Invoke("ResetApparatus", 1.8f); liftHasPower = true; } private void ResetApparatus() { updateApparatusPos = false; } public void ToggleBigDoor() { ToggleBigDoorServerRpc(); } [ServerRpc(RequireOwnership = false)] public void ToggleBigDoorServerRpc() { //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) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3809848559u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3809848559u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ToggleBigDoorClientRpc(); } } } [ClientRpc] public void ToggleBigDoorClientRpc() { //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) //IL_00c1: 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 != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2764790813u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2764790813u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (!isBeingUsed) { if (!isOpen) { ((MonoBehaviour)this).StartCoroutine(UseBigDoorCoroutine(open: true)); isOpen = true; } else { ((MonoBehaviour)this).StartCoroutine(UseBigDoorCoroutine(open: false)); isOpen = false; } } } public IEnumerator UseBigDoorCoroutine(bool open) { isBeingUsed = true; leverAnimator1.SetBool("Open", open); leverAnimator2.SetBool("Open", open); yield return (object)new WaitForSeconds(0.1f); ((Renderer)lightMesh).material = lightRed_On; ((Component)spinLight).gameObject.SetActive(true); yield return (object)new WaitForSeconds(0.3f); doorSound.Play(); bigDoorAnimator.SetBool("Open", open); if (!open) { killTrigger.SetActive(true); } yield return (object)new WaitForSeconds(8f); ((Renderer)lightMesh).material = lightRed_Off; ((Component)spinLight).gameObject.SetActive(false); killTrigger.SetActive(false); isBeingUsed = false; } public void OnDestroy() { Object.Destroy((Object)(object)liftApparatus.gameObject); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3211725304u, new RpcReceiveHandler(__rpc_handler_3211725304), "StartGame_ServerRpc"); ((NetworkBehaviour)this).__registerRpc(1282339256u, new RpcReceiveHandler(__rpc_handler_1282339256), "StartGame_ClientRpc"); ((NetworkBehaviour)this).__registerRpc(2957985298u, new RpcReceiveHandler(__rpc_handler_2957985298), "DockLungProp_ServerRpc"); ((NetworkBehaviour)this).__registerRpc(1359851734u, new RpcReceiveHandler(__rpc_handler_1359851734), "DockLungProp_ClientRpc"); ((NetworkBehaviour)this).__registerRpc(4146058954u, new RpcReceiveHandler(__rpc_handler_4146058954), "SetLungPower_ServerRpc"); ((NetworkBehaviour)this).__registerRpc(3116699192u, new RpcReceiveHandler(__rpc_handler_3116699192), "SetLungPower_ClientRpc"); ((NetworkBehaviour)this).__registerRpc(454021743u, new RpcReceiveHandler(__rpc_handler_454021743), "ToggleLiftServerRpc"); ((NetworkBehaviour)this).__registerRpc(3765726848u, new RpcReceiveHandler(__rpc_handler_3765726848), "ToggleLiftClientRpc"); ((NetworkBehaviour)this).__registerRpc(3462126603u, new RpcReceiveHandler(__rpc_handler_3462126603), "PlaceApparatusLiftServerRpc"); ((NetworkBehaviour)this).__registerRpc(2332923323u, new RpcReceiveHandler(__rpc_handler_2332923323), "PlaceApparatusLiftClientRpc"); ((NetworkBehaviour)this).__registerRpc(3809848559u, new RpcReceiveHandler(__rpc_handler_3809848559), "ToggleBigDoorServerRpc"); ((NetworkBehaviour)this).__registerRpc(2764790813u, new RpcReceiveHandler(__rpc_handler_2764790813), "ToggleBigDoorClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_3211725304(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)1; ((SynthesisController)(object)target).StartGame_ServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1282339256(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)1; ((SynthesisController)(object)target).StartGame_ClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2957985298(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int lungNetworkId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref lungNetworkId); target.__rpc_exec_stage = (__RpcExecStage)1; ((SynthesisController)(object)target).DockLungProp_ServerRpc(lungNetworkId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1359851734(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int lungNetworkId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref lungNetworkId); target.__rpc_exec_stage = (__RpcExecStage)1; ((SynthesisController)(object)target).DockLungProp_ClientRpc(lungNetworkId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4146058954(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool lungPower_ServerRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref lungPower_ServerRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((SynthesisController)(object)target).SetLungPower_ServerRpc(lungPower_ServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3116699192(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool lungPower_ClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref lungPower_ClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((SynthesisController)(object)target).SetLungPower_ClientRpc(lungPower_ClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_454021743(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)1; ((SynthesisController)(object)target).ToggleLiftServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3765726848(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)1; ((SynthesisController)(object)target).ToggleLiftClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3462126603(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)1; ((SynthesisController)(object)target).PlaceApparatusLiftServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2332923323(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)1; ((SynthesisController)(object)target).PlaceApparatusLiftClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3809848559(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)1; ((SynthesisController)(object)target).ToggleBigDoorServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2764790813(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)1; ((SynthesisController)(object)target).ToggleBigDoorClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "SynthesisController"; } } public class SynthesisReplaceShip : MonoBehaviour { public AnimationClip customHangarShipLandClip; public AnimationClip customFlyingFromMoonClip; private Animator hangarShipAnimator; private AnimationClip originalHangarShipLandClip; private AnimationClip originalFlyingFromMoonClip; private RuntimeAnimatorController animatorController; private void Start() { GameObject val = GameObject.Find("HangarShip"); if ((Object)(object)val == (Object)null) { Debug.LogError((object)"HangarShip GameObject not found."); return; } hangarShipAnimator = val.GetComponent<Animator>(); if ((Object)(object)hangarShipAnimator == (Object)null) { Debug.LogError((object)"Animator component not found on HangarShip."); return; } animatorController = hangarShipAnimator.runtimeAnimatorController; AnimationClip[] animationClips = animatorController.animationClips; foreach (AnimationClip val2 in animationClips) { if (((Object)val2).name == "HangarShipLandB") { originalHangarShipLandClip = val2; } else if (((Object)val2).name == "ShipLeave") { originalFlyingFromMoonClip = val2; } } if ((Object)(object)originalHangarShipLandClip == (Object)null) { Debug.LogError((object)"Animation clip HangarShipLand not found in the Animator."); } if ((Object)(object)originalFlyingFromMoonClip == (Object)null) { Debug.LogError((object)"Animation clip FlyingFromMoon not found in the Animator."); } ReplaceAnimationClips(customHangarShipLandClip, customFlyingFromMoonClip); } private void ReplaceAnimationClips(AnimationClip newHangarShipLandClip, AnimationClip newFlyingFromMoonClip) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Expected O, but got Unknown if ((Object)(object)animatorController != (Object)null) { AnimatorOverrideController val = new AnimatorOverrideController(animatorController); if ((Object)(object)originalHangarShipLandClip != (Object)null && (Object)(object)newHangarShipLandClip != (Object)null) { val[originalHangarShipLandClip] = newHangarShipLandClip; Debug.Log((object)"Replaced HangarShipLand with the custom animation clip."); } hangarShipAnimator.runtimeAnimatorController = (RuntimeAnimatorController)(object)val; } } private void OnDestroy() { if ((Object)(object)hangarShipAnimator != (Object)null && (Object)(object)animatorController != (Object)null) { hangarShipAnimator.runtimeAnimatorController = animatorController; Debug.Log((object)"Reverted to the original HangarShipLand and FlyingFromMoon animation clips."); } } } } namespace NewSynthesis { [BepInPlugin("bauyrsaq.SynthesisAssembly", "NewSynthesis", "0.0.0")] public class NewSynthesis : BaseUnityPlugin { public static NewSynthesis Instance { get; private set; } internal static ManualLogSource Logger { get; private set; } internal static Harmony? Harmony { get; set; } private void Awake() { Logger = ((BaseUnityPlugin)this).Logger; Instance = this; NetcodePatcher(); Patch(); Logger.LogInfo((object)"bauyrsaq.SynthesisAssembly v0.0.0 has loaded!"); } 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.SynthesisAssembly"); } 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.SynthesisAssembly"; public const string PLUGIN_NAME = "NewSynthesis"; public const string PLUGIN_VERSION = "0.0.0"; } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { public IgnoresAccessChecksToAttribute(string assemblyName) { } } } namespace __GEN { internal class NetworkVariableSerializationHelper { [RuntimeInitializeOnLoadMethod] internal static void InitializeSerialization() { } } } namespace bauyrsaq.SynthesisAssembly.NetcodePatcher { [AttributeUsage(AttributeTargets.Module)] internal class NetcodePatchedAssemblyAttribute : Attribute { } }