using 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 GameNetcodeStuff;
using HarmonyLib;
using Microsoft.CodeAnalysis;
using SynthesisLift.Patches;
using Unity.Netcode;
using UnityEngine;
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("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.SynthesisAssembly")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("0.0.0.0")]
[assembly: AssemblyInformationalVersion("0.0.0-dev")]
[assembly: AssemblyProduct("SynthesisLift")]
[assembly: AssemblyTitle("bauyrsaq.SynthesisAssembly")]
[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 SynthesisLift
{
[BepInPlugin("bauyrsaq.SynthesisAssembly", "SynthesisLift", "0.0.0")]
public class SynthesisLift : BaseUnityPlugin
{
public static SynthesisLift 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(typeof(SynthesisLift));
Harmony.PatchAll(typeof(PlayerControllerBPatch));
Harmony.PatchAll();
Logger.LogDebug((object)"Finished patching!");
Logger.LogDebug((object)"!!!! Lift Controller script is ready to use on Synthesis Moon !!!!");
}
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 = "SynthesisLift";
public const string PLUGIN_VERSION = "0.0.0";
}
}
namespace SynthesisLift.Patches
{
public class LiftController : NetworkBehaviour, INetworkSerializable
{
[Header("Lift Settings")]
[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;
public AudioSource liftSound;
public AudioSource doorsSound;
public AudioSource pffSound;
public AudioSource slamSound;
private PlayerControllerB player;
private void Start()
{
liftDoorL.SetTrigger("Open");
liftDoorR.SetTrigger("Open");
}
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)
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(278409806u, val, (RpcDelivery)0);
((NetworkBehaviour)this).__endSendServerRpc(ref val2, 278409806u, val, (RpcDelivery)0);
}
if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
{
SynthesisLift.Logger.LogDebug((object)"LIFT CONTROLLER: 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)
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(2432315351u, val, (RpcDelivery)0);
((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2432315351u, val, (RpcDelivery)0);
}
if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost))
{
return;
}
if ((Object)(object)liftInterior != (Object)null && (Object)(object)liftSelf != (Object)null)
{
if (!isMoving)
{
if (!isOnUp)
{
((MonoBehaviour)this).StartCoroutine(MoveLift(moveDown: false));
isOnUp = true;
SynthesisLift.Logger.LogDebug((object)"LIFT CONTROLLER: Moving Up Lift");
}
else
{
((MonoBehaviour)this).StartCoroutine(MoveLift(moveDown: true));
isOnUp = false;
SynthesisLift.Logger.LogDebug((object)"LIFT CONTROLLER: Moving Down Lift");
}
}
}
else
{
SynthesisLift.Logger.LogDebug((object)"LIFT CONTROLLER: 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(6.325f);
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;
}
private void OnTriggerEnter(Collider collider)
{
//IL_0067: Unknown result type (might be due to invalid IL or missing references)
//IL_006c: Unknown result type (might be due to invalid IL or missing references)
//IL_0075: Unknown result type (might be due to invalid IL or missing references)
PlayerControllerB val = default(PlayerControllerB);
if (((Component)collider).TryGetComponent<PlayerControllerB>(ref val) && !((Object)(object)((Component)val).transform.parent == (Object)(object)((Component)this).transform))
{
NetworkObject component = ((Component)val).GetComponent<NetworkObject>();
defaultPlayerContainer = ((Component)val).transform.parent;
if (!val.isCameraDisabled && !StartOfRound.Instance.shipIsLeaving)
{
Vector3 position = ((Component)val).transform.position;
UpdatePlayerParentServerRpc(component.NetworkObjectId, position);
}
}
}
private void OnTriggerExit(Collider collider)
{
//IL_0039: Unknown result type (might be due to invalid IL or missing references)
//IL_003e: Unknown result type (might be due to invalid IL or missing references)
//IL_0046: Unknown result type (might be due to invalid IL or missing references)
PlayerControllerB val = default(PlayerControllerB);
if (((Component)collider).TryGetComponent<PlayerControllerB>(ref val) && !((Object)(object)((Component)val).transform.parent != (Object)(object)((Component)this).transform))
{
NetworkObject component = ((Component)val).GetComponent<NetworkObject>();
Vector3 position = ((Component)val).transform.position;
ResetPlayerParentServerRpc(component.NetworkObjectId, position);
}
}
private void SetWorldParent(ulong playerNetworkObjectId, Transform newParent, Vector3 worldPosition)
{
//IL_0028: Unknown result type (might be due to invalid IL or missing references)
NetworkObject val = NetworkManager.Singleton.SpawnManager.SpawnedObjects[playerNetworkObjectId];
Transform transform = ((Component)val).transform;
transform.SetParent(newParent, true);
transform.position = worldPosition;
}
[ServerRpc(RequireOwnership = false)]
private void UpdatePlayerParentServerRpc(ulong playerNetworkObjectId, Vector3 worldPosition)
{
//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_0102: Unknown result type (might be due to invalid IL or missing references)
//IL_010b: 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(3445826659u, val, (RpcDelivery)0);
BytePacker.WriteValueBitPacked(val2, playerNetworkObjectId);
((FastBufferWriter)(ref val2)).WriteValueSafe(ref worldPosition);
((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3445826659u, val, (RpcDelivery)0);
}
if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
{
NetworkObject val3 = NetworkManager.Singleton.SpawnManager.SpawnedObjects[playerNetworkObjectId];
Transform transform = ((Component)val3).transform;
transform.SetParent(((Component)this).transform, true);
transform.position = worldPosition;
UpdatePlayerParentClientRpc(playerNetworkObjectId, worldPosition);
}
}
}
[ServerRpc(RequireOwnership = false)]
private void ResetPlayerParentServerRpc(ulong playerNetworkObjectId, Vector3 worldPosition)
{
//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_0102: Unknown result type (might be due to invalid IL or missing references)
//IL_010b: 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(937137923u, val, (RpcDelivery)0);
BytePacker.WriteValueBitPacked(val2, playerNetworkObjectId);
((FastBufferWriter)(ref val2)).WriteValueSafe(ref worldPosition);
((NetworkBehaviour)this).__endSendServerRpc(ref val2, 937137923u, val, (RpcDelivery)0);
}
if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
{
NetworkObject val3 = NetworkManager.Singleton.SpawnManager.SpawnedObjects[playerNetworkObjectId];
Transform transform = ((Component)val3).transform;
transform.SetParent(defaultPlayerContainer, true);
transform.position = worldPosition;
ResetPlayerParentClientRpc(playerNetworkObjectId, worldPosition);
}
}
}
[ClientRpc]
private void UpdatePlayerParentClientRpc(ulong playerNetworkObjectId, Vector3 worldPosition)
{
//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_010d: 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(927432513u, val, (RpcDelivery)0);
BytePacker.WriteValueBitPacked(val2, playerNetworkObjectId);
((FastBufferWriter)(ref val2)).WriteValueSafe(ref worldPosition);
((NetworkBehaviour)this).__endSendClientRpc(ref val2, 927432513u, val, (RpcDelivery)0);
}
if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
{
NetworkObject val3 = NetworkManager.Singleton.SpawnManager.SpawnedObjects[playerNetworkObjectId];
Transform transform = ((Component)val3).transform;
transform.SetParent(((Component)this).transform, true);
if (val3.IsLocalPlayer)
{
transform.position = worldPosition;
}
}
}
[ClientRpc]
private void ResetPlayerParentClientRpc(ulong playerNetworkObjectId, Vector3 worldPosition)
{
//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_010d: 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(1897243835u, val, (RpcDelivery)0);
BytePacker.WriteValueBitPacked(val2, playerNetworkObjectId);
((FastBufferWriter)(ref val2)).WriteValueSafe(ref worldPosition);
((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1897243835u, val, (RpcDelivery)0);
}
if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
{
NetworkObject val3 = NetworkManager.Singleton.SpawnManager.SpawnedObjects[playerNetworkObjectId];
Transform transform = ((Component)val3).transform;
transform.SetParent(defaultPlayerContainer, true);
if (val3.IsLocalPlayer)
{
transform.position = worldPosition;
}
}
}
public void NetworkSerialize<T>(BufferSerializer<T> serializer) where T : IReaderWriter
{
}
protected override void __initializeVariables()
{
((NetworkBehaviour)this).__initializeVariables();
}
[RuntimeInitializeOnLoadMethod]
internal static void InitializeRPCS_LiftController()
{
//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
//IL_0062: Unknown result type (might be due to invalid IL or missing references)
//IL_006c: Expected O, but got Unknown
//IL_007d: Unknown result type (might be due to invalid IL or missing references)
//IL_0087: Expected O, but got Unknown
//IL_0098: Unknown result type (might be due to invalid IL or missing references)
//IL_00a2: Expected O, but got Unknown
NetworkManager.__rpc_func_table.Add(278409806u, new RpcReceiveHandler(__rpc_handler_278409806));
NetworkManager.__rpc_func_table.Add(2432315351u, new RpcReceiveHandler(__rpc_handler_2432315351));
NetworkManager.__rpc_func_table.Add(3445826659u, new RpcReceiveHandler(__rpc_handler_3445826659));
NetworkManager.__rpc_func_table.Add(937137923u, new RpcReceiveHandler(__rpc_handler_937137923));
NetworkManager.__rpc_func_table.Add(927432513u, new RpcReceiveHandler(__rpc_handler_927432513));
NetworkManager.__rpc_func_table.Add(1897243835u, new RpcReceiveHandler(__rpc_handler_1897243835));
}
private static void __rpc_handler_278409806(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;
((LiftController)(object)target).ToggleLiftServerRpc();
target.__rpc_exec_stage = (__RpcExecStage)0;
}
}
private static void __rpc_handler_2432315351(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;
((LiftController)(object)target).ToggleLiftClientRpc();
target.__rpc_exec_stage = (__RpcExecStage)0;
}
}
private static void __rpc_handler_3445826659(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 playerNetworkObjectId = default(ulong);
ByteUnpacker.ReadValueBitPacked(reader, ref playerNetworkObjectId);
Vector3 worldPosition = default(Vector3);
((FastBufferReader)(ref reader)).ReadValueSafe(ref worldPosition);
target.__rpc_exec_stage = (__RpcExecStage)1;
((LiftController)(object)target).UpdatePlayerParentServerRpc(playerNetworkObjectId, worldPosition);
target.__rpc_exec_stage = (__RpcExecStage)0;
}
}
private static void __rpc_handler_937137923(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 playerNetworkObjectId = default(ulong);
ByteUnpacker.ReadValueBitPacked(reader, ref playerNetworkObjectId);
Vector3 worldPosition = default(Vector3);
((FastBufferReader)(ref reader)).ReadValueSafe(ref worldPosition);
target.__rpc_exec_stage = (__RpcExecStage)1;
((LiftController)(object)target).ResetPlayerParentServerRpc(playerNetworkObjectId, worldPosition);
target.__rpc_exec_stage = (__RpcExecStage)0;
}
}
private static void __rpc_handler_927432513(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 playerNetworkObjectId = default(ulong);
ByteUnpacker.ReadValueBitPacked(reader, ref playerNetworkObjectId);
Vector3 worldPosition = default(Vector3);
((FastBufferReader)(ref reader)).ReadValueSafe(ref worldPosition);
target.__rpc_exec_stage = (__RpcExecStage)2;
((LiftController)(object)target).UpdatePlayerParentClientRpc(playerNetworkObjectId, worldPosition);
target.__rpc_exec_stage = (__RpcExecStage)0;
}
}
private static void __rpc_handler_1897243835(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 playerNetworkObjectId = default(ulong);
ByteUnpacker.ReadValueBitPacked(reader, ref playerNetworkObjectId);
Vector3 worldPosition = default(Vector3);
((FastBufferReader)(ref reader)).ReadValueSafe(ref worldPosition);
target.__rpc_exec_stage = (__RpcExecStage)2;
((LiftController)(object)target).ResetPlayerParentClientRpc(playerNetworkObjectId, worldPosition);
target.__rpc_exec_stage = (__RpcExecStage)0;
}
}
[MethodImpl(MethodImplOptions.NoInlining)]
protected internal override string __getTypeName()
{
return "LiftController";
}
}
[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>();
}
}
}
namespace System.Runtime.CompilerServices
{
[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
internal sealed class IgnoresAccessChecksToAttribute : Attribute
{
public IgnoresAccessChecksToAttribute(string assemblyName)
{
}
}
}
namespace bauyrsaq.SynthesisAssembly.NetcodePatcher
{
[AttributeUsage(AttributeTargets.Module)]
internal class NetcodePatchedAssemblyAttribute : Attribute
{
}
}