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 Interstellar Moon v1.2.1
DynamicCulling.dll
Decompiled 2 years agousing System; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using GameNetcodeStuff; using Microsoft.CodeAnalysis; using UnityEngine; [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: AssemblyCompany("DynamicCulling")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyDescription("Test")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("DynamicCulling")] [assembly: AssemblyTitle("DynamicCulling")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [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; } } } [BepInPlugin("DynamicCulling", "Dynamic Culling Plugin", "1.0.0")] public class DynamicCullingPlugin : BaseUnityPlugin { private DynamicCullingController dynamicCullingController; private void Awake() { Debug.Log((object)"DynamicCulling loaded"); } } public class DynamicCullingController : MonoBehaviour { [Header("Player Settings")] public float viewDistance; private float tempDistance; private Camera gameplayCamera; private GameObject player; private PlayerControllerB playerScript; public void Awake() { player = GameObject.Find("Player"); Debug.Log((object)("[DynamicCulling]: Found: " + (object)player)); playerScript = player.GetComponent<PlayerControllerB>(); Debug.Log((object)("[DynamicCulling]: Found: " + (object)playerScript)); gameplayCamera = playerScript.gameplayCamera; tempDistance = gameplayCamera.farClipPlane; Debug.Log((object)("[DynamicCulling]: tempdistance is " + tempDistance)); } public void OnTriggerEnter(Collider other) { if ((Object)(object)gameplayCamera != (Object)null) { gameplayCamera.farClipPlane = viewDistance; } else { Debug.LogError((object)"[DynamicCulling]: FarClipPlane not adjusted"); } } public void OnTriggerExit(Collider other) { if ((Object)(object)gameplayCamera != (Object)null) { gameplayCamera.farClipPlane = tempDistance; } else { Debug.LogError((object)"[DynamicCulling]: FarClipPlane not adjusted"); } } }
FallOutMoon.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 FallOutMoon.NetcodePatcher; using Microsoft.CodeAnalysis; using Unity.Netcode; using UnityEngine; [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: AssemblyCompany("FallOutMoon")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyDescription("FallOut Moon for Lethal Company.")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("FallOutMoon")] [assembly: AssemblyTitle("FallOutMoon")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: NetcodePatchedAssembly] internal class <Module> { static <Module>() { NetworkVariableSerializationTypes.InitializeSerializer_UnmanagedByMemcpy<bool>(); NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedIEquatable<bool>(); } } namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [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; } } } public class CameraActivation : NetworkBehaviour { public Camera renderTextureCamera; public float delayTime = 2f; private void Start() { if (((NetworkBehaviour)this).IsServer || (((NetworkBehaviour)this).IsHost && ((NetworkBehaviour)this).IsClient)) { ((MonoBehaviour)this).StartCoroutine(ActivateCameraAfterDelay()); } else if (!NetworkManager.Singleton.IsListening) { ((MonoBehaviour)this).StartCoroutine(ActivateCameraAfterDelay()); } } private IEnumerator ActivateCameraAfterDelay() { ((Behaviour)renderTextureCamera).enabled = false; yield return (object)new WaitForSeconds(delayTime); ((Behaviour)renderTextureCamera).enabled = true; } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected internal override string __getTypeName() { return "CameraActivation"; } } public class DrivableObject : NetworkBehaviour { [Header("Drivable Settings")] public float speed = 5f; public Transform drivePathStart; public Transform drivePathEnd; [Header("Network")] public NetworkVariable<bool> isBeingDriven = new NetworkVariable<bool>(false, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0); private Transform driver; private void Update() { if (isBeingDriven.Value && (Object)(object)driver != (Object)null) { Drive(); } } private void Drive() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0018: 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) //IL_003a: 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) ((Component)this).transform.position = Vector3.MoveTowards(((Component)this).transform.position, drivePathEnd.position, speed * Time.deltaTime); if (((Component)this).transform.position == drivePathEnd.position) { StopDrivingServerRpc(); } } private void OnTriggerEnter(Collider other) { if (((Component)other).CompareTag("Player") && !isBeingDriven.Value) { StartDrivingServerRpc(((Component)((Component)other).transform).GetComponent<NetworkObject>().NetworkObjectId); } } [ServerRpc(RequireOwnership = false)] public void StartDrivingServerRpc(ulong playerNetId) { //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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(376638807u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerNetId); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 376638807u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost) && !isBeingDriven.Value) { isBeingDriven.Value = true; if (NetworkManager.Singleton.SpawnManager.SpawnedObjects.TryGetValue(playerNetId, out var value)) { driver = ((Component)value).transform; AttachPlayerToVehicle(driver); } } } [ServerRpc(RequireOwnership = false)] public void StopDrivingServerRpc() { //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 != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2968045105u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2968045105u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost) && isBeingDriven.Value) { isBeingDriven.Value = false; if ((Object)(object)driver != (Object)null) { DetachPlayerFromVehicle(driver); driver = null; } } } private void AttachPlayerToVehicle(Transform player) { player.SetParent(((Component)this).transform); } private void DetachPlayerFromVehicle(Transform player) { player.SetParent((Transform)null); } protected override void __initializeVariables() { if (isBeingDriven == null) { throw new Exception("DrivableObject.isBeingDriven cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)isBeingDriven).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)isBeingDriven, "isBeingDriven"); base.NetworkVariableFields.Add((NetworkVariableBase)(object)isBeingDriven); ((NetworkBehaviour)this).__initializeVariables(); } [RuntimeInitializeOnLoadMethod] internal static void InitializeRPCS_DrivableObject() { //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(376638807u, new RpcReceiveHandler(__rpc_handler_376638807)); NetworkManager.__rpc_func_table.Add(2968045105u, new RpcReceiveHandler(__rpc_handler_2968045105)); } private static void __rpc_handler_376638807(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) { ulong playerNetId = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref playerNetId); target.__rpc_exec_stage = (__RpcExecStage)1; ((DrivableObject)(object)target).StartDrivingServerRpc(playerNetId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2968045105(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; ((DrivableObject)(object)target).StopDrivingServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "DrivableObject"; } } public class SimpleTeleport : NetworkBehaviour { public Transform teleportTarget; public AudioSource teleportAudio; public AudioClip teleportSound; public Animator teleportAnimator; private void OnTriggerEnter(Collider other) { if (((Component)other).CompareTag("Player")) { TeleportPlayerServerRpc(((Component)other).gameObject.GetComponent<NetworkObject>().NetworkObjectId); } } [ServerRpc] private void TeleportPlayerServerRpc(ulong networkObjectId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Invalid comparison between Unknown and I4 //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(4210687768u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, networkObjectId); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 4210687768u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { NetworkObject val3 = NetworkManager.Singleton.SpawnManager.SpawnedObjects[networkObjectId]; if ((Object)(object)val3 != (Object)null) { TeleportPlayer(((Component)val3).gameObject); } } } private void TeleportPlayer(GameObject player) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) player.transform.position = teleportTarget.position; TeleportEffect(); UpdatePlayerPositionClientRpc(player.GetComponent<NetworkObject>().NetworkObjectId, teleportTarget.position); } [ClientRpc] private void UpdatePlayerPositionClientRpc(ulong networkObjectId, Vector3 newPosition) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: 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_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: 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(1608512231u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, networkObjectId); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref newPosition); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1608512231u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { NetworkObject val3 = NetworkManager.Singleton.SpawnManager.SpawnedObjects[networkObjectId]; if ((Object)(object)val3 != (Object)null) { ((Component)val3).transform.position = newPosition; } } } private void TeleportEffect() { if ((Object)(object)teleportAudio != (Object)null && (Object)(object)teleportSound != (Object)null) { teleportAudio.PlayOneShot(teleportSound); } if ((Object)(object)teleportAnimator != (Object)null) { teleportAnimator.SetTrigger("Teleport"); } TeleportEffectClientRpc(); } [ClientRpc] private void TeleportEffectClientRpc() { //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(2713107618u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2713107618u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { if ((Object)(object)teleportAudio != (Object)null && (Object)(object)teleportSound != (Object)null) { teleportAudio.PlayOneShot(teleportSound); } if ((Object)(object)teleportAnimator != (Object)null) { teleportAnimator.SetTrigger("Teleport"); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } [RuntimeInitializeOnLoadMethod] internal static void InitializeRPCS_SimpleTeleport() { //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 //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown NetworkManager.__rpc_func_table.Add(4210687768u, new RpcReceiveHandler(__rpc_handler_4210687768)); NetworkManager.__rpc_func_table.Add(1608512231u, new RpcReceiveHandler(__rpc_handler_1608512231)); NetworkManager.__rpc_func_table.Add(2713107618u, new RpcReceiveHandler(__rpc_handler_2713107618)); } private static void __rpc_handler_4210687768(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: 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) //IL_0070: 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_009d: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { ulong networkObjectId = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref networkObjectId); target.__rpc_exec_stage = (__RpcExecStage)1; ((SimpleTeleport)(object)target).TeleportPlayerServerRpc(networkObjectId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1608512231(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ulong networkObjectId = default(ulong); ByteUnpacker.ReadValueBitPacked(reader, ref networkObjectId); Vector3 newPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref newPosition); target.__rpc_exec_stage = (__RpcExecStage)2; ((SimpleTeleport)(object)target).UpdatePlayerPositionClientRpc(networkObjectId, newPosition); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2713107618(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; ((SimpleTeleport)(object)target).TeleportEffectClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "SimpleTeleport"; } } public class UwUActivate : NetworkBehaviour { public GameObject objectToActivate; private void OnTriggerEnter(Collider other) { if (((Component)other).CompareTag("Player")) { ActivateObjectServerRpc(); } } [ServerRpc] private void ActivateObjectServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1673065479u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1673065479u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { objectToActivate.SetActive(true); ActivateObjectClientRpc(); ((MonoBehaviour)this).StartCoroutine(DeactivateAfterDelay(83f)); } } [ClientRpc] private void ActivateObjectClientRpc() { //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) { if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3868428513u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3868428513u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { objectToActivate.SetActive(true); ((MonoBehaviour)this).StartCoroutine(DeactivateAfterDelay(83f)); } } } private IEnumerator DeactivateAfterDelay(float delay) { yield return (object)new WaitForSeconds(delay); objectToActivate.SetActive(false); DeactivateObjectClientRpc(); } [ClientRpc] private void DeactivateObjectClientRpc() { //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) { if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(868509980u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 868509980u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { objectToActivate.SetActive(false); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } [RuntimeInitializeOnLoadMethod] internal static void InitializeRPCS_UwUActivate() { //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 //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Expected O, but got Unknown NetworkManager.__rpc_func_table.Add(1673065479u, new RpcReceiveHandler(__rpc_handler_1673065479)); NetworkManager.__rpc_func_table.Add(3868428513u, new RpcReceiveHandler(__rpc_handler_3868428513)); NetworkManager.__rpc_func_table.Add(868509980u, new RpcReceiveHandler(__rpc_handler_868509980)); } private static void __rpc_handler_1673065479(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: 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) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((UwUActivate)(object)target).ActivateObjectServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3868428513(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; ((UwUActivate)(object)target).ActivateObjectClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_868509980(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; ((UwUActivate)(object)target).DeactivateObjectClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "UwUActivate"; } } namespace FallOut { [BepInPlugin("FallOutMoon", "FallOutMoon", "1.0.0")] public class Plugin : BaseUnityPlugin { internal static ManualLogSource Logger; private void Awake() { Logger = ((BaseUnityPlugin)this).Logger; InitializeNetworkBehaviours(); Logger.LogInfo((object)"Plugin FallOutMoon is loaded!"); } private 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) { object[] customAttributes = methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false); if (customAttributes.Length != 0) { methodInfo.Invoke(null, null); } } } } } public static class PluginInfo { public const string PLUGIN_GUID = "FallOutMoon"; public const string PLUGIN_NAME = "FallOutMoon"; public const string PLUGIN_VERSION = "1.0.0"; } } namespace FallOutMoon.NetcodePatcher { [AttributeUsage(AttributeTargets.Module)] internal class NetcodePatchedAssemblyAttribute : Attribute { } }