Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of Zeranos Moon v0.1.8
kite.ZelevatorCode.dll
Decompiled 6 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Logging; using DunGen; using DunGen.Graph; using ElevatorMod.Patches.Utils; using GameNetcodeStuff; using HarmonyLib; using LethalLevelLoader; using LethalLib.Modules; using Microsoft.CodeAnalysis; using TMPro; using Unity.Netcode; using UnityEngine; using UnityEngine.AI; using UnityEngine.Events; using UnityEngine.Rendering; using UnityEngine.Rendering.HighDefinition; using UnityEngine.SceneManagement; using UnityEngine.UI; using WeatherRegistry; using kite.ZelevatorCode.NetcodePatcher; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [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: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("kite.ZelevatorCode")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("ElevatorMod")] [assembly: AssemblyTitle("kite.ZelevatorCode")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.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; } } } [HarmonyPriority(99999)] [HarmonyPatch(typeof(TimeOfDay))] [HarmonyPatch("TimeOfDayEvents")] public static class TimeOfDayEventsPatch { private static bool Prefix(TimeOfDay __instance) { //IL_0031: 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_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) if (StartOfRound.Instance.currentLevel.PlanetName != "7510 Zeranos") { return true; } __instance.dayMode = __instance.GetDayPhase(__instance.globalTime / __instance.totalTime); if (__instance.dayMode > __instance.dayModeLastTimePlayerWasOutside) { __instance.PlayerSeesNewTimeOfDay(); } float num = __instance.globalTime / __instance.totalTime; if (!(num >= 0.25f) || num <= 0.75f) { } return false; } } namespace ElevatorMod { [BepInPlugin("kite.ZelevatorCode", "ElevatorMod", "1.0.0")] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] public class ElevatorMod : BaseUnityPlugin { public static AssetBundle zeranosWeathersBundle; public Weather WinterWeather; public GameObject WinterPermanentEffectPrefab; public Weather AutumnWeather; public GameObject AutumnPermanentEffectPrefab; public Weather BloodMoonWeather; public GameObject BloodMoonPermanentEffectPrefab; public Weather RadiationWeather; public GameObject RadiationPermanentEffectPrefab; public static GameObject RadiationZonePrefab; public static AssetBundle elevatorAnimationsBundle; public static AssetBundle elevatorEnemiesBundle; public static RuntimeAnimatorController elevatorAnimController; public static GameObject planetTimeMonitor; public static ElevatorMod 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; string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); elevatorAnimationsBundle = AssetBundle.LoadFromFile(Path.Combine(directoryName, "zeranosmisc")); elevatorEnemiesBundle = AssetBundle.LoadFromFile(Path.Combine(directoryName, "zeranosenemies")); zeranosWeathersBundle = AssetBundle.LoadFromFile(Path.Combine(directoryName, "zeranosweathers")); if ((Object)(object)elevatorAnimationsBundle == (Object)null || (Object)(object)elevatorEnemiesBundle == (Object)null || (Object)(object)zeranosWeathersBundle == (Object)null) { Logger.LogError((object)"Failed to load assets."); } else { Logger.LogInfo((object)"------------------------------------------------------"); planetTimeMonitor = elevatorAnimationsBundle.LoadAsset<GameObject>("PlanetTime_MPf.prefab"); NetworkPrefabs.RegisterNetworkPrefab(planetTimeMonitor); LoadScrapsBundlesAndRegister(); LoadEnemiesBundlesAndRegister(); LoadWeatherBundles(); RegisterAllWeathers(); } NetcodePatcher(); Patch(); Logger.LogInfo((object)"kite.ZelevatorCode v1.0.0 has loaded!"); } public void LoadScrapsBundlesAndRegister() { } public void LoadEnemiesBundlesAndRegister() { EnemyType val = elevatorEnemiesBundle.LoadAsset<EnemyType>("ShadowPlayerEnemy"); TerminalNode val2 = elevatorEnemiesBundle.LoadAsset<TerminalNode>("ShadowEnemyTN"); TerminalKeyword val3 = elevatorEnemiesBundle.LoadAsset<TerminalKeyword>("ShadowEnemyTK"); Dictionary<string, int> dictionary = new Dictionary<string, int> { { "7510 Zeranos", 19 } }; NetworkPrefabs.RegisterNetworkPrefab(val.enemyPrefab); } public void LoadWeatherBundles() { WinterPermanentEffectPrefab = zeranosWeathersBundle.LoadAsset<GameObject>("WinterWeatherPermanentEffect.prefab"); AutumnPermanentEffectPrefab = zeranosWeathersBundle.LoadAsset<GameObject>("AutumnWeatherPermanentEffect.prefab"); BloodMoonPermanentEffectPrefab = zeranosWeathersBundle.LoadAsset<GameObject>("BloodMoonPermanentEffect.prefab"); RadiationPermanentEffectPrefab = zeranosWeathersBundle.LoadAsset<GameObject>("RadiationStormPermanentEffect.prefab"); RadiationZonePrefab = zeranosWeathersBundle.LoadAsset<GameObject>("RadiationAnomaly.prefab"); NetworkPrefabs.RegisterNetworkPrefab(RadiationZonePrefab); } public void RegisterAllWeathers() { RegisterSeasonWeathers(); RegisterBloodMoonWeather(); RegisterRadiationStormWeather(); } private void RegisterSeasonWeathers() { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Expected O, but got Unknown //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Expected O, but got Unknown //IL_00a9: 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_00c9: Expected O, but got Unknown //IL_00f4: Unknown result type (might be due to invalid IL or missing references) GameObject val = Object.Instantiate<GameObject>(WinterPermanentEffectPrefab); GameObject val2 = Object.Instantiate<GameObject>(AutumnPermanentEffectPrefab); ((Object)val).hideFlags = (HideFlags)61; ((Object)val2).hideFlags = (HideFlags)61; Object.DontDestroyOnLoad((Object)(object)val); Object.DontDestroyOnLoad((Object)(object)val2); ImprovedWeatherEffect val3 = new ImprovedWeatherEffect((GameObject)null, val) { SunAnimatorBool = "" }; ImprovedWeatherEffect val4 = new ImprovedWeatherEffect((GameObject)null, val2) { SunAnimatorBool = "" }; Weather val5 = new Weather("Winter", val3); val5.DefaultWeight = 20; val5.DefaultLevelFilters = new string[1] { "7510 Zeranos" }; val5.LevelFilteringOption = (FilteringOption)0; val5.Color = new Color(255f, 173f, 30f); WinterWeather = val5; val5 = new Weather("Autumn", val4); val5.DefaultWeight = 20; val5.DefaultLevelFilters = new string[1] { "7510 Zeranos" }; val5.LevelFilteringOption = (FilteringOption)0; val5.Color = Color.yellow; AutumnWeather = val5; WeatherManager.RegisterWeather(WinterWeather); WeatherManager.RegisterWeather(AutumnWeather); } private void RegisterBloodMoonWeather() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Expected O, but got Unknown //IL_0065: Unknown result type (might be due to invalid IL or missing references) GameObject val = Object.Instantiate<GameObject>(BloodMoonPermanentEffectPrefab); ((Object)val).hideFlags = (HideFlags)61; Object.DontDestroyOnLoad((Object)(object)val); ImprovedWeatherEffect val2 = new ImprovedWeatherEffect((GameObject)null, val) { SunAnimatorBool = "" }; Weather val3 = new Weather("Murrey Moon", val2); val3.DefaultWeight = 20; val3.DefaultLevelFilters = new string[1] { "7510 Zeranos" }; val3.LevelFilteringOption = (FilteringOption)0; val3.Color = Color.red; BloodMoonWeather = val3; WeatherManager.RegisterWeather(BloodMoonWeather); } private void RegisterRadiationStormWeather() { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Expected O, but got Unknown //IL_0065: Unknown result type (might be due to invalid IL or missing references) GameObject val = Object.Instantiate<GameObject>(RadiationPermanentEffectPrefab); ((Object)val).hideFlags = (HideFlags)61; Object.DontDestroyOnLoad((Object)(object)val); ImprovedWeatherEffect val2 = new ImprovedWeatherEffect((GameObject)null, val) { SunAnimatorBool = "" }; Weather val3 = new Weather("Radioactive Zones", val2); val3.DefaultWeight = 25; val3.DefaultLevelFilters = new string[1] { "7510 Zeranos" }; val3.LevelFilteringOption = (FilteringOption)0; val3.Color = Color.yellow; RadiationWeather = val3; WeatherManager.RegisterWeather(RadiationWeather); } 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("kite.ZelevatorCode"); } 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 = "kite.ZelevatorCode"; public const string PLUGIN_NAME = "ElevatorMod"; public const string PLUGIN_VERSION = "1.0.0"; } } namespace ElevatorMod.Patches { public class AttachmentToStartOfRound : NetworkBehaviour { public static AttachmentToStartOfRound Instance; public List<float> levelTimes = new List<float>(); public float zeranosTime; public float currentLevelTime; private void Awake() { if ((Object)(object)Instance == (Object)null) { Instance = this; } else { Object.Destroy((Object)(object)((Component)this).gameObject); } } private void Start() { RandomizePlanetTime(); } [ServerRpc(RequireOwnership = false)] public void ClearList_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(1314414026u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1314414026u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ClearList_ClientRpc(); } } } [ClientRpc] public void ClearList_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) 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(1856846744u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1856846744u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; levelTimes.Clear(); } } } [ServerRpc(RequireOwnership = false)] public void AddToList_ServerRpc(float time) { //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(1893358891u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref time, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1893358891u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; AddToList_ClientRpc(time); } } } [ClientRpc] public void AddToList_ClientRpc(float time) { //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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(71325336u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref time, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 71325336u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; levelTimes.Add(time); Debug.Log((object)("Adding to the list: " + time)); } } } public void RandomizePlanetTime() { StartOfRound instance = StartOfRound.Instance; if (((NetworkBehaviour)instance).IsServer) { Instance.ClearList_ServerRpc(); string currentSaveFileName = GameNetworkManager.Instance.currentSaveFileName; Terminal val = Object.FindObjectOfType<Terminal>(); SelectableLevel[] moonsCatalogueList = val.moonsCatalogueList; SelectableLevel[] array = moonsCatalogueList; foreach (SelectableLevel val2 in array) { float num = Random.Range(0f, 1f); ES3.Save<float>(val2.PlanetName + "_globaltime", num); Instance.AddToList_ServerRpc(num); } SetZeranosTime_ClientRpc(zeranosTime = Random.Range(0f, 1f)); } } [ClientRpc] public void SetZeranosTime_ClientRpc(float newTime) { //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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3755566542u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref newTime, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3755566542u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; zeranosTime = newTime; } } } 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 ((NetworkBehaviour)this).__registerRpc(1314414026u, new RpcReceiveHandler(__rpc_handler_1314414026), "ClearList_ServerRpc"); ((NetworkBehaviour)this).__registerRpc(1856846744u, new RpcReceiveHandler(__rpc_handler_1856846744), "ClearList_ClientRpc"); ((NetworkBehaviour)this).__registerRpc(1893358891u, new RpcReceiveHandler(__rpc_handler_1893358891), "AddToList_ServerRpc"); ((NetworkBehaviour)this).__registerRpc(71325336u, new RpcReceiveHandler(__rpc_handler_71325336), "AddToList_ClientRpc"); ((NetworkBehaviour)this).__registerRpc(3755566542u, new RpcReceiveHandler(__rpc_handler_3755566542), "SetZeranosTime_ClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1314414026(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; ((AttachmentToStartOfRound)(object)target).ClearList_ServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1856846744(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; ((AttachmentToStartOfRound)(object)target).ClearList_ClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1893358891(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) { float time = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref time, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((AttachmentToStartOfRound)(object)target).AddToList_ServerRpc(time); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_71325336(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) { float time = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref time, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((AttachmentToStartOfRound)(object)target).AddToList_ClientRpc(time); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3755566542(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) { float zeranosTime_ClientRpc = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref zeranosTime_ClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((AttachmentToStartOfRound)(object)target).SetZeranosTime_ClientRpc(zeranosTime_ClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "AttachmentToStartOfRound"; } } public class CameraMonitor : MonoBehaviour { public MeshRenderer monitorRenderer; public Material blackMat; public Material screenMat; private RenderTexture selectedRt; public void Init() { Material[] materials = ((Renderer)monitorRenderer).materials; materials[1] = blackMat; ((Renderer)monitorRenderer).materials = materials; } public void EnableMonitor(RenderTexture renderTexture) { selectedRt = renderTexture; screenMat.SetTexture("_UnlitColorMap", (Texture)(object)renderTexture); screenMat.EnableKeyword("_UNLIT_COLOR_MAP"); Material[] materials = ((Renderer)monitorRenderer).materials; materials[1] = screenMat; ((Renderer)monitorRenderer).materials = materials; Debug.Log((object)"Enabling Monitors"); } public void ToggleMonitor(bool enable) { if (enable) { screenMat.SetTexture("_UnlitColorMap", (Texture)(object)selectedRt); screenMat.EnableKeyword("_UNLIT_COLOR_MAP"); Material[] materials = ((Renderer)monitorRenderer).materials; materials[1] = screenMat; ((Renderer)monitorRenderer).materials = materials; Debug.Log((object)"Enabling Monitors"); } else { Material[] materials2 = ((Renderer)monitorRenderer).materials; materials2[1] = blackMat; ((Renderer)monitorRenderer).materials = materials2; Debug.Log((object)"Disabling Monitors"); } } } public class CCTVMonitors : MonoBehaviour { public int seed = 6516451; public List<FacilityCCTV> cameras = new List<FacilityCCTV>(); public List<CameraMonitor> monitors = new List<CameraMonitor>(); public void Init() { seed = StartOfRound.Instance.randomMapSeed; foreach (CameraMonitor monitor in monitors) { monitor.Init(); } FacilityCCTV[] array = Object.FindObjectsOfType<FacilityCCTV>(); FacilityCCTV[] array2 = array; foreach (FacilityCCTV facilityCCTV in array2) { cameras.Add(facilityCCTV); facilityCCTV.Init(); facilityCCTV.ToggleCamera(enable: false); Debug.Log((object)("Found camera " + ((Object)((Component)facilityCCTV).gameObject).name + ", adding to the List.")); } ShuffleMonitors(monitors, seed); int randomIntFromSeed = KiteUtilities.GetRandomIntFromSeed(seed, 2, monitors.Count - 8); for (int j = 0; j < randomIntFromSeed; j++) { monitors[j].EnableMonitor(cameras[j].GetRenderTexture()); } } public void ToggleRendering(bool enable) { foreach (FacilityCCTV camera in cameras) { camera.ToggleCamera(enable); } foreach (CameraMonitor monitor in monitors) { monitor.ToggleMonitor(enable); } } public void ShuffleMonitors(List<CameraMonitor> list, int seed) { Random random = new Random(seed); int count = list.Count; for (int num = count - 1; num > 0; num--) { int index = random.Next(num + 1); CameraMonitor value = list[num]; list[num] = list[index]; list[index] = value; } } public static int GetRandomIntFromSeed(int seed, int min, int max) { if (min >= max) { throw new ArgumentException("Min value must be less than Max value."); } Random random = new Random(seed); return random.Next(min, max); } } public class ElevatorApparatus : NetworkBehaviour { [Header("Used by EndlessElevator")] [Space] public int lightMaterialIndex = 1; private LungProp apparatus; private Light light; private MeshRenderer apparatusRenderer; public float apparatusPower = -1f; public float maxApparatusPower = 50f; public float minApparatusPower = 150f; public bool lungPowered = true; public bool server_starLowerPower = false; public static ElevatorApparatus Instance { get; private set; } public void Awake() { Instance = this; } public void Initialize() { GetLigtAndMesh(); RandomizePower(); Debug.Log((object)$"{((Object)((Component)this).gameObject).name} : Init, {lungPowered}, {apparatusPower}"); } public void Update() { if (((NetworkBehaviour)this).IsServer && server_starLowerPower) { apparatusPower -= EndlessElevator.Instance.chargeMultiplier; apparatusPower = Mathf.Clamp(apparatusPower, 0f, 200f); SetLungPower_ClientRpc(apparatusPower); if (apparatusPower <= 0f) { ToggleOffLung(); server_starLowerPower = false; } } } [ServerRpc(RequireOwnership = false)] public void DockToElevator_ServerRpc(ServerRpcParams rpcParams = default(ServerRpcParams)) { //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.IsClient || networkManager.IsHost)) { FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1270789991u, rpcParams, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1270789991u, rpcParams, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; NetworkObject component = ((Component)apparatus).GetComponent<NetworkObject>(); if ((Object)(object)component != (Object)null) { component.ChangeOwnership(0uL); } DockToElevator_ClientRpc(); } } [ClientRpc] public void DockToElevator_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) 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(2693657390u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2693657390u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; DockToElevator(); } } } public void DockToElevator() { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Unknown result type (might be due to invalid IL or missing references) Debug.LogWarning((object)"Docking apparatus to elevator"); ((GrabbableObject)apparatus).playerHeldBy.DiscardHeldObject(false, (NetworkObject)null, default(Vector3), true); ((GrabbableObject)apparatus).isHeldByEnemy = false; ((GrabbableObject)apparatus).hasBeenHeld = true; apparatus.isLungDockedInElevator = true; apparatus.sparkParticle.SetActive(true); ((Component)apparatus).GetComponentInChildren<Collider>().enabled = false; ((Component)apparatus).transform.parent = ((Component)EndlessElevator.Instance.apparatusPosition).transform; ((Component)apparatus).transform.SetPositionAndRotation(((Component)EndlessElevator.Instance.apparatusPosition).transform.position, ((Component)EndlessElevator.Instance.apparatusPosition).transform.rotation); EndlessElevator.Instance.SetApparatus(apparatus, this); EndlessElevator.Instance.updateAppPosition = true; EndlessElevator.Instance.StopUpdateApparatusPosition_Invoke(5f); if (!(EndlessElevator.Instance.elevatorPower >= EndlessElevator.Instance.maxElevatorPower)) { server_starLowerPower = true; EndlessElevator.Instance.server_startCharging = true; EndlessElevator.Instance.server_startDecreasing = false; Debug.Log((object)$"{server_starLowerPower} - {EndlessElevator.Instance.server_startCharging} : {EndlessElevator.Instance.server_startDecreasing}"); } } [ServerRpc(RequireOwnership = false)] public void DeattachFromElevator_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(1024670841u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1024670841u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; DeattachFromElevator_ClientRpc(); } } } [ClientRpc] public void DeattachFromElevator_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) 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(3340352423u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3340352423u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; DeattachFromElevator(); } } } public void DeattachFromElevator() { //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) Debug.LogWarning((object)"Deattaching apparatus from elevator"); ((GrabbableObject)apparatus).isHeldByEnemy = false; ((GrabbableObject)apparatus).hasBeenHeld = false; apparatus.isLungDockedInElevator = false; if ((Object)(object)apparatus.sparkParticle != (Object)null) { apparatus.sparkParticle.SetActive(false); } ((Component)apparatus).GetComponentInChildren<Collider>().enabled = true; ((Component)apparatus).transform.parent = RoundManager.Instance.mapPropsContainer.transform; ((Component)apparatus).transform.position = ((Component)EndlessElevator.Instance.apparatusPosition).transform.position; ((Component)apparatus).transform.rotation = ((Component)EndlessElevator.Instance.apparatusPosition).transform.rotation; EndlessElevator.Instance.hasApparatus = false; EndlessElevator.Instance.server_startCharging = false; server_starLowerPower = false; } public void RandomizePower() { if (((NetworkBehaviour)this).IsServer) { float randomRange = EndlessElevator.Instance.GetRandomRange(minApparatusPower, maxApparatusPower, StartOfRound.Instance.randomMapSeed); apparatusPower = randomRange; SetLungPower_ClientRpc(apparatusPower); } } [ClientRpc] public void SetLungPower_ClientRpc(float 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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3729071495u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref newValue, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3729071495u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; apparatusPower = newValue; } } } public void GetLigtAndMesh() { light = GetChildWithPrefix(((Component)this).gameObject.transform, "Point Light").GetComponent<Light>(); apparatusRenderer = GetChildWithPrefix(((Component)this).gameObject.transform, "Mesh").GetComponent<MeshRenderer>(); } [ServerRpc(RequireOwnership = false)] public void ToggleOffLung_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(4092688392u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 4092688392u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ToggleOffLung_ClientRpc(); } } } [ClientRpc] public void ToggleOffLung_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) 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(4158817614u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4158817614u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ToggleLung(enable: false); } } } public void ToggleOffLung() { ToggleLung(enable: false); Debug.Log((object)(((Object)((Component)this).gameObject).name + " : lung apparatus has no power")); } public void ToggleLung(bool enable) { if (enable) { ((Behaviour)light).enabled = true; ((Renderer)apparatusRenderer).materials[1] = EndlessElevator.Instance.lungLightOnMat; lungPowered = true; } else { ((Behaviour)light).enabled = false; ((Renderer)apparatusRenderer).materials[1] = EndlessElevator.Instance.lungLightOffMat; lungPowered = false; } } public void SetLungProp(LungProp newProp) { apparatus = newProp; } public LungProp GetLungProp() { return apparatus; } public static GameObject GetChildWithPrefix(Transform parent, string prefix) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0017: Expected O, but got Unknown foreach (Transform item in parent) { Transform val = item; if (((Object)val).name.StartsWith(prefix)) { return ((Component)val).gameObject; } } return null; } 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 ((NetworkBehaviour)this).__registerRpc(1270789991u, new RpcReceiveHandler(__rpc_handler_1270789991), "DockToElevator_ServerRpc"); ((NetworkBehaviour)this).__registerRpc(2693657390u, new RpcReceiveHandler(__rpc_handler_2693657390), "DockToElevator_ClientRpc"); ((NetworkBehaviour)this).__registerRpc(1024670841u, new RpcReceiveHandler(__rpc_handler_1024670841), "DeattachFromElevator_ServerRpc"); ((NetworkBehaviour)this).__registerRpc(3340352423u, new RpcReceiveHandler(__rpc_handler_3340352423), "DeattachFromElevator_ClientRpc"); ((NetworkBehaviour)this).__registerRpc(3729071495u, new RpcReceiveHandler(__rpc_handler_3729071495), "SetLungPower_ClientRpc"); ((NetworkBehaviour)this).__registerRpc(4092688392u, new RpcReceiveHandler(__rpc_handler_4092688392), "ToggleOffLung_ServerRpc"); ((NetworkBehaviour)this).__registerRpc(4158817614u, new RpcReceiveHandler(__rpc_handler_4158817614), "ToggleOffLung_ClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1270789991(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_0033: 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_004d: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ServerRpcParams server = rpcParams.Server; target.__rpc_exec_stage = (__RpcExecStage)1; ((ElevatorApparatus)(object)target).DockToElevator_ServerRpc(server); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2693657390(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; ((ElevatorApparatus)(object)target).DockToElevator_ClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1024670841(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; ((ElevatorApparatus)(object)target).DeattachFromElevator_ServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3340352423(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; ((ElevatorApparatus)(object)target).DeattachFromElevator_ClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3729071495(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) { float lungPower_ClientRpc = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref lungPower_ClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((ElevatorApparatus)(object)target).SetLungPower_ClientRpc(lungPower_ClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4092688392(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; ((ElevatorApparatus)(object)target).ToggleOffLung_ServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4158817614(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; ((ElevatorApparatus)(object)target).ToggleOffLung_ClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "ElevatorApparatus"; } } public class ElevatorGasTank : NetworkBehaviour { [HideInInspector] public float power; public float minPower = 70f; public float maxPower = 150f; public bool isApparatus = false; public int pickedUpCounter = -1; private RoundManager roundManager; public void Start() { roundManager = Object.FindObjectOfType<RoundManager>(); SetRandomPowerLocal(); } [ClientRpc] public void SetRandomPower_ClientRpc(float value) { //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.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(765644298u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref value, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 765644298u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; power = value; Debug.Log((object)$"Got power : {power}"); } } } public void SetRandomPowerLocal() { if (((NetworkBehaviour)this).IsServer) { float randomRange = EndlessElevator.Instance.GetRandomRange(minPower, maxPower, StartOfRound.Instance.randomMapSeed); power = randomRange; Debug.Log((object)$"Server add random power : {power}"); SetRandomPower_ClientRpc(power); } } public void DockToElevator(EndlessElevator Instance) { if (((NetworkBehaviour)this).IsServer && !(power <= 0f)) { Instance.AddPower_ServerRpc(power); Instance.hasApparatus = true; Instance.server_startCharging = false; Instance.server_startDecreasing = false; Instance.noPower = false; Instance.SetLightState_ServerRpc(on: true); power = 0f; SetRandomPower_ClientRpc(power); } } public void AddOneEquipCounter() { AddOneEquipCounter_ServerRpc(); } [ClientRpc] public void AddOneEquipCounter_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) 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(4144836029u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4144836029u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; pickedUpCounter++; } } } [ServerRpc(RequireOwnership = false)] public void AddOneEquipCounter_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(2805873084u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2805873084u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; AddOneEquipCounter_ClientRpc(); } } } 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 ((NetworkBehaviour)this).__registerRpc(765644298u, new RpcReceiveHandler(__rpc_handler_765644298), "SetRandomPower_ClientRpc"); ((NetworkBehaviour)this).__registerRpc(4144836029u, new RpcReceiveHandler(__rpc_handler_4144836029), "AddOneEquipCounter_ClientRpc"); ((NetworkBehaviour)this).__registerRpc(2805873084u, new RpcReceiveHandler(__rpc_handler_2805873084), "AddOneEquipCounter_ServerRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_765644298(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) { float randomPower_ClientRpc = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe<float>(ref randomPower_ClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((ElevatorGasTank)(object)target).SetRandomPower_ClientRpc(randomPower_ClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4144836029(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; ((ElevatorGasTank)(object)target).AddOneEquipCounter_ClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2805873084(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; ((ElevatorGasTank)(object)target).AddOneEquipCounter_ServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "ElevatorGasTank"; } } public class ElevatorLungDocker : NetworkBehaviour { [Header("Apparatus Docker Place")] [Space(5f)] public AudioSource attachLungAudioSource; public Transform lungHolder; public bool hasLungPower = false; private LungProp attachedLungProp = null; private ElevatorGasTank lungPropTank = null; [Space(5f)] public UnityEvent onLungDocked; public UnityEvent onLungTaken; private void Update() { if (hasLungPower && (Object)(object)attachedLungProp != (Object)null && !attachedLungProp.isLungDocked) { SetLungPower_ServerRpc(newValue: false); } } public void PlayerUse(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(3896143349u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, lungNetworkId); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3896143349u, 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_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) //IL_01a5: 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(1799343121u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, lungNetworkId); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1799343121u, 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>(); ElevatorGasTank component2 = ((Component)value).GetComponent<ElevatorGasTank>(); if ((Object)(object)component != (Object)null && (Object)(object)component2 != (Object)null && component2.isApparatus) { Debug.Log((object)"[Aeclis/LungDocker] Found LungProp component on client."); attachedLungProp = component; lungPropTank = component2; ((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(); attachLungAudioSource.Play(); component.sparkParticle.SetActive(true); ((MonoBehaviour)this).Invoke("DisableSparkleEffect", 0.3f); component2.DockToElevator(EndlessElevator.Instance); onLungDocked.Invoke(); hasLungPower = true; } 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(4284268040u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref newValue, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 4284268040u, 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(324262889u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref newValue, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 324262889u, 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}."); } } 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 ((NetworkBehaviour)this).__registerRpc(3896143349u, new RpcReceiveHandler(__rpc_handler_3896143349), "DockLungProp_ServerRpc"); ((NetworkBehaviour)this).__registerRpc(1799343121u, new RpcReceiveHandler(__rpc_handler_1799343121), "DockLungProp_ClientRpc"); ((NetworkBehaviour)this).__registerRpc(4284268040u, new RpcReceiveHandler(__rpc_handler_4284268040), "SetLungPower_ServerRpc"); ((NetworkBehaviour)this).__registerRpc(324262889u, new RpcReceiveHandler(__rpc_handler_324262889), "SetLungPower_ClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_3896143349(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; ((ElevatorLungDocker)(object)target).DockLungProp_ServerRpc(lungNetworkId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1799343121(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; ((ElevatorLungDocker)(object)target).DockLungProp_ClientRpc(lungNetworkId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4284268040(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; ((ElevatorLungDocker)(object)target).SetLungPower_ServerRpc(lungPower_ServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_324262889(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; ((ElevatorLungDocker)(object)target).SetLungPower_ClientRpc(lungPower_ClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "ElevatorLungDocker"; } } public class ElevatorStartRoom : NetworkBehaviour { public static ElevatorStartRoom Instance; public List<GameObject> defaultStartRoomObjects = new List<GameObject>(); public List<GameObject> elevatorStartRoomObjects = new List<GameObject>(); public GameObject mainEntranceDoorObject; public Transform mainEntranceDefaultPos; public Transform mainEntranceElevatorPos; private GameObject entranceTeleport; public void Awake() { Instance = this; } public void Start() { SetStartRoom(defaultSR: true); } public void Update() { if ((Object)(object)entranceTeleport == (Object)null && (!((Object)(object)EndlessElevator.Instance != (Object)null) || EndlessElevator.Instance.firstTimeElevator)) { Transform val = FindTransformInAllScenes("EntranceTeleportA", "(Clone)"); if ((Object)(object)val != (Object)null) { entranceTeleport = ((Component)val).gameObject; Debug.Log((object)("Found EntranceTeleportA gameObject: " + ((Object)val).name)); } else { Debug.Log((object)"Cannot find entrance in the scene."); } } } private Transform FindTransformInAllScenes(string startsWith, string contains) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < SceneManager.sceneCount; i++) { Scene sceneAt = SceneManager.GetSceneAt(i); if (!((Scene)(ref sceneAt)).isLoaded) { continue; } GameObject[] rootGameObjects = ((Scene)(ref sceneAt)).GetRootGameObjects(); GameObject[] array = rootGameObjects; foreach (GameObject val in array) { Transform val2 = SearchHierarchy(val.transform, startsWith, contains); if ((Object)(object)val2 != (Object)null) { return val2; } } } return null; } public Transform SearchHierarchy(Transform parent, string startsWith, string contains) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown if (((Object)parent).name.StartsWith(startsWith) && ((Object)parent).name.Contains(contains)) { return parent; } foreach (Transform item in parent) { Transform parent2 = item; Transform val = SearchHierarchy(parent2, startsWith, contains); if ((Object)(object)val != (Object)null) { return val; } } return null; } public void SetStartRoom(bool defaultSR) { //IL_013d: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009e: 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) if (defaultSR) { foreach (GameObject defaultStartRoomObject in defaultStartRoomObjects) { defaultStartRoomObject.SetActive(true); } foreach (GameObject elevatorStartRoomObject in elevatorStartRoomObjects) { elevatorStartRoomObject.SetActive(false); } mainEntranceDoorObject.transform.SetPositionAndRotation(mainEntranceDefaultPos.position, mainEntranceDefaultPos.rotation); } else { foreach (GameObject defaultStartRoomObject2 in defaultStartRoomObjects) { defaultStartRoomObject2.SetActive(false); } foreach (GameObject elevatorStartRoomObject2 in elevatorStartRoomObjects) { elevatorStartRoomObject2.SetActive(true); } mainEntranceDoorObject.transform.SetPositionAndRotation(mainEntranceElevatorPos.position, mainEntranceElevatorPos.rotation); if ((Object)(object)entranceTeleport != (Object)null) { entranceTeleport.transform.position = mainEntranceDoorObject.transform.position; } } ElevatorMod.Logger.LogInfo((object)$"Changing start room to defaultSR : {defaultSR}"); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "ElevatorStartRoom"; } } public class EndlessElevator : NetworkBehaviour { private Random random; [Header("Elevator Controller")] [Space] public List<string> elevatorNamings = new List<string>(); [HideInInspector] public string elevatorName; [HideInInspector] public int floorIndex = 0; [HideInInspector] public bool isUpperFloor = true; [HideInInspector] public bool isMoving = false; [HideInInspector] public bool tryStop = false; [HideInInspector] public int movingDirection = -1; [HideInInspector] public bool noPower = true; [HideInInspector] public float elevatorPower = 0f; public float maxElevatorPower = 200f; public int minFloorSetRange = 1; public int maxFloorSetRange = 9; public Animator elevatorAnim; public Animator elevatorInteriorAnimator; public Animator[] elevatorDoorsAnimators; public GameObject elevatorShaftInteriorWalls; public GameObject elevatorWall; public GameObject elevatorWallWithDoor; public Transform facilityBuildingPos; private Transform interiorPos; [Space] public AudioSource elevatorAudioPlayer; public AudioSource elevatorBreathAudioPlayer; public AudioSource elevatorSpeakerAudioPlayer; public AudioSource elevatorDoorAudioPlayer; public AudioSource elevatorDoorSlamAudioPlayer; public AudioSource elevatorLightFlickerAudioPlayer; public AudioSource elevatorLightFlickerEnableAudioPlayer; [Space] public Text elevatorMonitorText; [HideInInspector] public bool monitorEnabled = true; [HideInInspector] public bool showPowerOnMonitor = false; public string monitorDirectionUpText = "Dir: Up"; public string monitorDirectionDownText = "Dir: down"; public string monitorStopText = "Stop"; public string monitorMoveText = "Move"; public string monitorPowerText = "Power: "; public string monitorErrorText = "ERROR 0x468d54"; [Space] public float chargeMultiplier = 0.05f; public float decreaseMultiplier = 0.085f; public Transform apparatusPosition; public bool hasApparatus = false; public bool server_startCharging = false; public bool server_startDecreasing = false; public bool server_startCheckFloorsWhileMoving = false; private LungProp attachedApparatus = null; private ElevatorApparatus apparatus = null; public Material lungLightOnMat; public Material lungLightOffMat; public AnimationCurve flickerCurve; public float lightsOnIntensity = 70.4954f; public List<Light> lightsToDisable = new List<Light>(); public List<Light> lightsToDisableInstant = new List<Light>(); public List<MeshRenderer> lightRenderers = new List<MeshRenderer>(); public Material lightsOnMat; public Material lightsOffMat; [HideInInspector] public bool lightsOn = false; [Space] public UnityEvent OnStartMove; public UnityEvent OnMoveProcess; public UnityEvent OnStopMove; public UnityEvent OnDoneGenerate; private bool testCallOnce = false; [HideInInspector] public List<GameObject> grabbableObjectsInElevator = new List<GameObject>(); [HideInInspector] public List<GameObject> playersInElevator = new List<GameObject>(); private bool checkedForFirstTime; private bool updateLightsOffOnce = false; public bool updateAppPosition = false; public bool usedOneChance = false; public int oneChanceConfirmationState = 0; [HideInInspector] public bool firstTimeElevator = true; [HideInInspector] public bool fueledAtLeastOnce = false; [HideInInspector] public bool patch_entranceTeleport_checkedAlready = false; private PlayerPhysicsRegion playerPhysicsRegion_elevator; public GameObject loadingUiObject; public GameObject deathUiObject; public Animator deathUiAnimator; public TMP_Text loadingSeedText; public bool doorsClosedByUser = false; public float currentDoorHoldPercent = 100f; public float maxDoorHoldPercent = 100f; public float doorHoldPercentDecrease = 0.05f; public bool server_decreaseDoorsPower = false; public bool canUserUseDoors = true; [Space] public Animator pipeMeterAnimator; public List<Animator> miscInteriorAnimators = new List<Animator>(); public MeshRenderer[] redDots; public Material redDotOnMat; public Material redDotOffMat; public float floorDecreaseTimeInSeconds = 4f; private float floorDecreaseTimer = 0f; private List<EntranceTeleport> entrances = new List<EntranceTeleport>(); public GameObject teleportUIObject; public Animator teleportAnimator; public string mapHazardsLayerName = "MapHazards"; public string mapRadarLayerName = "MapRadar"; public string enemiesLayerName = "Enemies"; private OffMeshLink doorOffmeshLink; private const float UpAxisThreshold = -0.3f; private static readonly string[] ExcludedNames = new string[14] { "MapDot", "MapCamera", "MapDirectionIndicator", "CameraGreenTransition", "RadarCamNightVision", "MapScreenUI", "PlanetVideoReel", "PlayerBeingMonitored", "PlanetDescription", "ArrowUI", "ShipIcon", "ArrowContainer", "Arrow", "MapScreenUIWorldSpace" }; [HideInInspector] public bool dungeonCompletedGenerating = false; private RuntimeDungeon rtdungeonGenerator; public Material orangeAppNoGlowMat; public static EndlessElevator Instance { get; private set; } public void Awake() { Instance = this; elevatorPower = 150f; noPower = false; SetLightState_ServerRpc(on: true); TryGetPhysicsRegion(); Debug.Log((object)("Woke up. Instance = " + (object)Instance)); } public void Start() { ((MonoBehaviour)this).StartCoroutine(InitializeElevator()); Debug.Log((object)("Start. Instance = " + (object)Instance)); elevatorPower = 150f; noPower = false; SetLightState_ServerRpc(on: true); TryGetPhysicsRegion(); elevatorAnim.SetInteger("direction", -1); elevatorInteriorAnimator.SetTrigger("move"); elevatorAnim.SetBool("isMoving", true); } private void ActivateEntranceTeleports() { EntranceTeleport[] array = Object.FindObjectsOfType<EntranceTeleport>(); EntranceTeleport[] array2 = array; foreach (EntranceTeleport val in array2) { entrances.Add(val); Debug.Log((object)$"Found entrance teleport : {((Component)val).gameObject}"); ((Component)val).gameObject.SetActive(true); } } public void SetOffmeshLinkState(bool enable) { if ((Object)(object)doorOffmeshLink == (Object)null) { doorOffmeshLink = ((Component)this).GetComponentInChildren<OffMeshLink>(); } ((Behaviour)doorOffmeshLink).enabled = enable; } public void Update() { if ((Object)(object)interiorPos == (Object)null) { GetInteriorElevatorPosition(); } if ((Object)(object)elevatorAnim.runtimeAnimatorController == (Object)null) { Debug.Log((object)"Bro ur animator is null -----------------------------"); } if (testCallOnce) { UpdateDoorsPower(); UpdateApparatusCharge(); CalculateElevatorFloorsWhileMoving(); } if (elevatorPower <= 0f) { noPower = true; } else { noPower = false; } } public IEnumerator InitializeElevator() { Scene scene = SceneManager.GetSceneByName("LevelZeranos"); yield return (object)new WaitUntil((Func<bool>)(() => ((Scene)(ref scene)).isLoaded)); ActivateEntranceTeleports(); GameObject generatorObj = GameObject.FindGameObjectWithTag("DungeonGenerator"); generatorObj.GetComponent<RuntimeDungeon>(); Debug.Log((object)"Initialize : Start waitin"); yield return (object)new WaitUntil((Func<bool>)(() => StartOfRound.Instance.fullyLoadedPlayers.Count >= StartOfRound.Instance.connectedPlayersAmount + 1)); yield return (object)new WaitUntil((Func<bool>)(() => RoundManager.Instance.dungeonCompletedGenerating)); yield return (object)new WaitUntil((Func<bool>)(() => RoundManager.Instance.playersFinishedGeneratingFloor.Count >= GameNetworkManager.Instance.connectedPlayers)); if ((Object)(object)FloorNumber.Instance != (Object)null && FloorNumber.Instance.number <= 0 && !isUpperFloor) { FloorNumber.Instance.SetNumber(Mathf.Abs(floorIndex)); } Debug.Log((object)"LOADING NEW ANIMATOR -----------------------------"); Debug.Log((object)"Start."); SetRandomName(); LogAnimatorInfo(); PlanetTimeMonitor.Instance.ToggleMonitor(show: false); TryGetPhysicsRegion(); noPower = false; elevatorPower = 150f; maxElevatorPower = 200f; lightsOnIntensity = 65f; floorIndex = 1; server_startCharging = false; server_startDecreasing = false; fueledAtLeastOnce = true; SetLightState_ServerRpc(on: true); Animator[] array = elevatorDoorsAnimators; foreach (Animator elevatorDoor in array) { elevatorDoor.SetTrigger("Open"); SetOffmeshLinkState(enable: true); } testCallOnce = true; GetInteriorElevatorPosition(); EntranceTeleport[] teleports = Object.FindObjectsOfType<EntranceTeleport>(); EntranceTeleport[] array2 = teleports; foreach (EntranceTeleport telep in array2) { entrances.Add(telep); Debug.Log((object)$"Found entrance teleport : {((Component)telep).gameObject}"); } ActivateEntranceTeleports(); Debug.Log((object)"Initialize : Finished waitin"); if ((Object)(object)interiorPos == (Object)null && (Object)(object)ElevatorStartRoom.Instance == (Object)null) { ShowZeranosInteriorError(); SetMonitorText_WithoutPower_ServerRpc(monitorErrorText); } } public void ShowZeranosInteriorError() { HUDManager.Instance.DisplayTip("ERROR", "You are not using ZeranosFacility as an interior, so your moon will not be correct and will not work!!!", true, false, "LC_Tip1"); } public void GetInteriorElevatorPosition() { GameObject val = GameObject.Find("ElevatorConnectionPosition"); if ((Object)(object)val != (Object)null) { interiorPos = val.transform; Debug.Log((object)"Found interiorPos from StartRoom."); } else { interiorPos = null; Debug.LogWarning((object)"Cannot find interiorPos from StartRoom!"); } } public void TryGetPhysicsRegion() { playerPhysicsRegion_elevator = ((Component)this).GetComponentInChildren<PlayerPhysicsRegion>(); } [ClientRpc] public void TeleportToInterior_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) 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(527571229u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 527571229u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; TeleportToInterior(); } } } [ServerRpc(RequireOwnership = false)] public void TeleportToInterior_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(2343998794u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2343998794u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; TeleportToInterior_ClientRpc(); } } } public void TeleportToInterior() { //IL_000d: 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) ((Component)this).transform.position = interiorPos.position; (