Decompiled source of LiminalPools v1.0.14

PooluginRooms.dll

Decompiled 2 weeks ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Cryptography;
using System.Security.Permissions;
using System.Text;
using BepInEx;
using BepInEx.Configuration;
using BepInEx.Logging;
using DunGen;
using GameNetcodeStuff;
using HarmonyLib;
using LiminalPoolRoomsDunGen;
using Microsoft.CodeAnalysis;
using PooluginRooms;
using PooluginRooms.NetcodePatcher;
using Unity.Netcode;
using UnityEngine;
using UnityEngine.AI;
using UnityEngine.Events;
using UnityEngine.Rendering;
using UnityEngine.Rendering.HighDefinition;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: AssemblyTitle("LiminalPoolRooms")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("PooluginRooms")]
[assembly: AssemblyCopyright("Copyright ©  2024")]
[assembly: AssemblyTrademark("")]
[assembly: ComVisible(false)]
[assembly: Guid("8be8e828-c018-493d-a159-15463d37bd21")]
[assembly: AssemblyFileVersion("1.0.14")]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.14.0")]
[module: UnverifiableCode]
[module: RefSafetyRules(11)]
[module: NetcodePatchedAssembly]
internal class <Module>
{
	static <Module>()
	{
		NetworkVariableSerializationTypes.InitializeSerializer_UnmanagedByMemcpy<float>();
		NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedIEquatable<float>();
	}
}
namespace Microsoft.CodeAnalysis
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	internal sealed class EmbeddedAttribute : Attribute
	{
	}
}
namespace System.Runtime.CompilerServices
{
	[CompilerGenerated]
	[Microsoft.CodeAnalysis.Embedded]
	[AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)]
	internal sealed class RefSafetyRulesAttribute : Attribute
	{
		public readonly int Version;

		public RefSafetyRulesAttribute(int P_0)
		{
			Version = P_0;
		}
	}
}
public class DrakosCustomWaterPatchThingGuyDudeMcBob : MonoBehaviour
{
	public bool isWater;

	public int audioClipIndex;

	[Space(5f)]
	public bool sinkingLocalPlayer;

	public float movementHinderance = 1.6f;

	public float sinkingSpeedMultiplier = 0.15f;

	private bool hneebJ = true;

	private void OnTriggerStay(Collider other)
	{
		if (isWater)
		{
			if (!((Component)other).gameObject.CompareTag("Player"))
			{
				return;
			}
			PlayerControllerB component = ((Component)other).gameObject.GetComponent<PlayerControllerB>();
			if ((Object)(object)component == (Object)(object)GameNetworkManager.Instance.localPlayerController && (Object)(object)component != (Object)null)
			{
				hneebJ = true;
			}
			if ((Object)(object)component != (Object)(object)GameNetworkManager.Instance.localPlayerController && (Object)(object)component != (Object)null && (Object)(object)component.underwaterCollider != (Object)(object)this)
			{
				component.underwaterCollider = ((Component)this).gameObject.GetComponent<Collider>();
				return;
			}
		}
		if (!GameNetworkManager.Instance.localPlayerController.isInsideFactory || GameNetworkManager.Instance.localPlayerController.isInHangarShipRoom || (!isWater && !((Component)other).gameObject.CompareTag("Player")))
		{
			return;
		}
		PlayerControllerB component2 = ((Component)other).gameObject.GetComponent<PlayerControllerB>();
		if ((Object)(object)component2 != (Object)(object)GameNetworkManager.Instance.localPlayerController)
		{
			return;
		}
		if (isWater && !component2.isUnderwater)
		{
			component2.underwaterCollider = ((Component)this).gameObject.GetComponent<Collider>();
			component2.isUnderwater = true;
		}
		component2.statusEffectAudioIndex = audioClipIndex;
		if (component2.isUnderwater)
		{
			component2.statusEffectAudio.volume = component2.statusEffectAudio.volume * 0.4f;
		}
		if (component2.isSinking)
		{
			return;
		}
		if (sinkingLocalPlayer)
		{
			if (!component2.CheckConditionsForSinkingInQuicksand())
			{
				StopSinkingLocalPlayer(component2);
			}
		}
		else if (component2.CheckConditionsForSinkingInQuicksand())
		{
			Debug.Log((object)"Set local player to sinking!");
			sinkingLocalPlayer = true;
			component2.sourcesCausingSinking++;
			component2.isMovementHindered++;
			component2.hinderedMultiplier *= movementHinderance;
			if (isWater)
			{
				component2.sinkingSpeedMultiplier = 0f;
			}
			else
			{
				component2.sinkingSpeedMultiplier = sinkingSpeedMultiplier;
			}
		}
	}

	public void FixedUpdate()
	{
		//IL_0025: Unknown result type (might be due to invalid IL or missing references)
		//IL_002a: Unknown result type (might be due to invalid IL or missing references)
		//IL_0038: Unknown result type (might be due to invalid IL or missing references)
		if (hneebJ)
		{
			Bounds bounds = ((Component)GameNetworkManager.Instance.localPlayerController).gameObject.GetComponent<Collider>().bounds;
			if (!((Bounds)(ref bounds)).Intersects(((Component)this).gameObject.GetComponent<Collider>().bounds))
			{
				OnExit(((Component)GameNetworkManager.Instance.localPlayerController).gameObject.GetComponent<Collider>());
			}
		}
	}

	private void OnTriggerExit(Collider other)
	{
		OnExit(other);
	}

	public void OnExit(Collider other)
	{
		hneebJ = false;
		if (!sinkingLocalPlayer)
		{
			if (isWater && ((Component)other).CompareTag("Player") && !((Object)(object)((Component)other).gameObject.GetComponent<PlayerControllerB>() == (Object)(object)GameNetworkManager.Instance.localPlayerController))
			{
				((Component)other).gameObject.GetComponent<PlayerControllerB>().isUnderwater = false;
			}
		}
		else if (((Component)other).CompareTag("Player"))
		{
			PlayerControllerB component = ((Component)other).gameObject.GetComponent<PlayerControllerB>();
			if (!((Object)(object)component != (Object)(object)GameNetworkManager.Instance.localPlayerController))
			{
				StopSinkingLocalPlayer(component);
			}
		}
	}

	public void StopSinkingLocalPlayer(PlayerControllerB playerScript)
	{
		if (sinkingLocalPlayer)
		{
			sinkingLocalPlayer = false;
			playerScript.sourcesCausingSinking = Mathf.Clamp(playerScript.sourcesCausingSinking - 1, 0, 100);
			playerScript.isMovementHindered = Mathf.Clamp(playerScript.isMovementHindered - 1, 0, 100);
			playerScript.hinderedMultiplier = Mathf.Clamp(playerScript.hinderedMultiplier / movementHinderance, 1f, 100f);
			if (playerScript.isMovementHindered == 0 && isWater)
			{
				playerScript.isUnderwater = false;
			}
		}
	}
}
namespace LiminalPoolRoomsDunGen
{
	[BepInPlugin("LiminalPoolRooms", "LiminalPoolRooms", "1.0.14")]
	public class LiminalPoolRoomsDunGen : BaseUnityPlugin
	{
		[Flags]
		private enum RefAccept
		{
			None = 0,
			Tile = 1,
			Water = 2
		}

		[Flags]
		public enum FireEnabler
		{
			Disabled = 0,
			Enabled = 1,
			Guaranteed = 2,
			Lowered = 4
		}

		[HarmonyPatch(typeof(Object))]
		private class ItemGroupPatch
		{
			[HarmonyPatch("Equals")]
			[HarmonyPrefix]
			public static bool FixItemGroupEquals(ref bool __result, object __instance, object other)
			{
				//IL_000d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0013: Expected O, but got Unknown
				//IL_002b: Unknown result type (might be due to invalid IL or missing references)
				//IL_0031: Expected O, but got Unknown
				ItemGroup val = (ItemGroup)((__instance is ItemGroup) ? __instance : null);
				if ((Object)(object)val != (Object)null)
				{
					ItemGroup val2 = (ItemGroup)((other is ItemGroup) ? other : null);
					if ((Object)(object)val2 != (Object)null)
					{
						__result = val.itemSpawnTypeName == val2.itemSpawnTypeName;
						return false;
					}
				}
				return true;
			}
		}

		[HarmonyPatch(typeof(RoundManager))]
		internal class QuickWaterPatch
		{
			[HarmonyPatch("GenerateNewFloor")]
			[HarmonyPostfix]
			public static void SwitchPoolWater(ref RuntimeDungeon ___dungeonGenerator)
			{
				GameObject[] array = Object.FindObjectsOfType<GameObject>();
				GameObject[] array2 = array;
				foreach (GameObject val in array2)
				{
					if (((Object)val).name == "LiminalPoolsIdentifier")
					{
						quickWater = val;
						Instance.mls.LogInfo((object)"Found PoolWater");
						break;
					}
					quickWater = null;
				}
			}
		}

		[HarmonyPatch(typeof(PlayerControllerB))]
		internal class PlayerControllerPatch
		{
			[HarmonyPatch("CheckConditionsForSinkingInQuicksand")]
			[HarmonyPrefix]
			private static void CheckPrefix(ref PlayerControllerB __instance)
			{
				if (GameNetworkManager.Instance.localPlayerController.isInsideFactory)
				{
					__instance.currentFootstepSurfaceIndex = 1;
				}
			}
		}

		[HarmonyPatch(typeof(StartOfRound))]
		internal static class StartPatch
		{
			[HarmonyPatch("OnClientConnect")]
			[HarmonyPostfix]
			private static void PlayerJoinedGuessWhatHesHere(StartOfRound __instance)
			{
				if (((NetworkBehaviour)__instance).IsHost || ((NetworkBehaviour)__instance).IsServer)
				{
					FolgaConfiguratorMachineMomentAMOGUSAMOGUSnotTheFemurBreakerAARGGGGHHHH.Instance.PissOverwatch3();
				}
			}

			[HarmonyPatch("Start")]
			[HarmonyPostfix]
			private static void gho(StartOfRound __instance)
			{
				if (((NetworkBehaviour)__instance).IsHost || ((NetworkBehaviour)__instance).IsServer)
				{
					Debug.Log((object)"Hello World!");
					GameObject val = Object.Instantiate<GameObject>(powerfulGerber);
					val.GetComponent<NetworkObject>().Spawn(false);
				}
			}
		}

		[HarmonyPatch(typeof(GameNetworkManager))]
		internal static class GNMPatch
		{
			[HarmonyPatch("Start")]
			[HarmonyPrefix]
			private static void pointlessTitle()
			{
				powerfulGerber = SetUpNetworkManagerObject<FolgaConfiguratorMachineMomentAMOGUSAMOGUSnotTheFemurBreakerAARGGGGHHHH>();
			}
		}

		[HarmonyPatch(typeof(LungProp))]
		internal class PatchLungProp
		{
			[HarmonyTranspiler]
			[HarmonyPatch(/*Could not decode attribute arguments.*/)]
			private static IEnumerable<CodeInstruction> DisconnectFromMachineryTranspiler(IEnumerable<CodeInstruction> instructions)
			{
				//IL_0003: Unknown result type (might be due to invalid IL or missing references)
				//IL_0031: Unknown result type (might be due to invalid IL or missing references)
				//IL_0037: Expected O, but got Unknown
				//IL_0058: Unknown result type (might be due to invalid IL or missing references)
				//IL_005e: Expected O, but got Unknown
				//IL_0075: Unknown result type (might be due to invalid IL or missing references)
				//IL_007b: Expected O, but got Unknown
				//IL_00bc: Unknown result type (might be due to invalid IL or missing references)
				//IL_00c2: Expected O, but got Unknown
				//IL_010c: Unknown result type (might be due to invalid IL or missing references)
				//IL_0112: Expected O, but got Unknown
				CodeMatcher val = new CodeMatcher(instructions, (ILGenerator)null).MatchForward(true, (CodeMatch[])(object)new CodeMatch[4]
				{
					new CodeMatch((Func<CodeInstruction, bool>)((CodeInstruction insn) => CodeInstructionExtensions.IsLdloc(insn, (LocalBuilder)null)), (string)null),
					new CodeMatch((OpCode?)OpCodes.Ldfld, (object)typeof(LungProp).GetField("disconnectSFX"), (string)null),
					new CodeMatch((OpCode?)OpCodes.Ldc_R4, (object)0.7f, (string)null),
					new CodeMatch((OpCode?)OpCodes.Callvirt, (object)typeof(AudioSource).GetMethod("PlayOneShot", new Type[2]
					{
						typeof(AudioClip),
						typeof(float)
					}), (string)null)
				});
				if (val.IsInvalid)
				{
					Debug.Log((object)"Failed to patch DisconnectFromMachinery()");
					return instructions;
				}
				val.Advance(1).Insert((CodeInstruction[])(object)new CodeInstruction[1]
				{
					new CodeInstruction(OpCodes.Call, (object)typeof(AppEventListener).GetMethod("TriggerAllEvents", BindingFlags.Static | BindingFlags.NonPublic))
				});
				return val.Instructions();
			}
		}

		internal const string guiDo = "LiminalPoolRooms";

		internal const string superHeroName = "LiminalPoolRooms";

		internal const string vNum = "1.0.14";

		private GameObject newObj;

		private readonly Harmony harmony = new Harmony("LiminalPoolRooms");

		private static LiminalPoolRoomsDunGen Instance;

		public static GameObject quickWater;

		public static QuicksandTrigger quickWater2;

		public static GameObject powerfulGerber;

		internal ManualLogSource mls;

		public static AssetBundle LiminalPoolRoomsAssets;

		[HideInInspector]
		public static ConfigEntry<bool> configLiminalPoolRoomsReflectionFloor;

		[HideInInspector]
		public static ConfigEntry<bool> configLiminalPoolRoomsReflectionWater;

		[HideInInspector]
		public static ConfigEntry<FireEnabler> configLiminalPoolRoomsFolga;

		[HideInInspector]
		public static ConfigEntry<bool> configLiminalPoolRoomsKiller;

		private ConfigEntry<string> configLiminalPoolRoomsMoons;

		private ConfigEntry<string> configLiminalPoolRoomsMoonsList;

		private ConfigEntry<bool> configGuaranteedLiminalPoolRooms;

		private ConfigEntry<int> configLengthOverride;

		private string[] configLiminalPoolRoomsMoonsValues = new string[6] { "vanilla", "modded", "all", "paid", "free", "list" };

		private void InitializeNetworkBehaviour(Type type)
		{
			MethodInfo method = type.GetMethod("InitializeRPCS_" + type.Name, BindingFlags.Static | BindingFlags.NonPublic);
			if (method == null)
			{
				mls.LogError((object)$"{type} does not have a static RPC initializer method.");
			}
			else
			{
				method.Invoke(null, null);
			}
		}

		public static GameObject SetUpNetworkManagerObject<T>() where T : NetworkBehaviour
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Expected O, but got Unknown
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0039: Expected O, but got Unknown
			GameObject val = new GameObject("TheParentTM");
			((Object)val).hideFlags = (HideFlags)61;
			Object.DontDestroyOnLoad((Object)(object)val);
			val.SetActive(false);
			GameObject val2 = new GameObject(typeof(T).Name);
			val2.transform.SetParent(val.transform);
			T val3 = val2.AddComponent<T>();
			NetworkObject val4 = val2.AddComponent<NetworkObject>();
			byte[] value = MD5.Create().ComputeHash(Encoding.UTF8.GetBytes(Assembly.GetCallingAssembly().GetName().Name + typeof(T).Name));
			val4.GlobalObjectIdHash = BitConverter.ToUInt32(value, 0);
			NetworkManager.Singleton.AddNetworkPrefab(val2);
			return val2;
		}

		private void Start()
		{
		}

		private void Awake()
		{
			//IL_005c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0066: Expected O, but got Unknown
			//IL_0095: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Expected O, but got Unknown
			//IL_00ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Expected O, but got Unknown
			//IL_00f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_0103: Expected O, but got Unknown
			mls = Logger.CreateLogSource("LiminalPoolRoomsDunGen");
			string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
			mls.LogInfo((object)"        //     .ii.\r\n        //    @@@@@@.\r\n        //   V@Mio@@o\r\n        //   :i.  V@V\r\n        //     :oM@@M\r\n        //   :@@@MM@M\r\n        //   @@o  o@M\r\n        //  :@@.  M@M\r\n        //   @@@o@@@@\r\n        //   :M@@V:@@.");
			configLiminalPoolRoomsReflectionFloor = ((BaseUnityPlugin)this).Config.Bind<bool>("Liminal Pools Interior", "Floor Reflection Enabled", false, new ConfigDescription("Whether or not reflections on the floor are enabled (Set false for best performance). \nDefault value: true\nAcceptable value: false, true", (AcceptableValueBase)(object)new AcceptableValueList<bool>(new bool[2] { false, true }), Array.Empty<object>()));
			configLiminalPoolRoomsReflectionWater = ((BaseUnityPlugin)this).Config.Bind<bool>("Liminal Pools Interior", "Water Reflection Enabled", true, new ConfigDescription("Whether or not reflections on the water are enabled (Set false for best performance). \nDefault value: true\nAcceptable value: false, true", (AcceptableValueBase)(object)new AcceptableValueList<bool>(new bool[2] { false, true }), Array.Empty<object>()));
			configLiminalPoolRoomsKiller = ((BaseUnityPlugin)this).Config.Bind<bool>("Liminal Pools Interior", "Kill triggers Enabled", false, new ConfigDescription("Decides whether or not kill triggers are enabled.\n Default value: false\nAcceptable values: false, true", (AcceptableValueBase)(object)new AcceptableValueList<bool>(new bool[2] { false, true }), Array.Empty<object>()));
			configLiminalPoolRoomsFolga = ((BaseUnityPlugin)this).Config.Bind<FireEnabler>("Liminal Pools Interior", "One Way Fire Exit", FireEnabler.Enabled, new ConfigDescription("Settings for the One Way Fire Exit.\nDefault value: Enabled\nAcceptable values: Disabled, Enabled, Guaranteed, Lowered\nMultiple options can be selected by separating options with a ',' e.g(Enabled, Guaranteed, Lowered)", (AcceptableValueBase)null, Array.Empty<object>()));
			configLiminalPoolRoomsFolga.SettingChanged += delegate
			{
				if ((Object)(object)FolgaConfiguratorMachineMomentAMOGUSAMOGUSnotTheFemurBreakerAARGGGGHHHH.Instance != (Object)null)
				{
					FolgaConfiguratorMachineMomentAMOGUSAMOGUSnotTheFemurBreakerAARGGGGHHHH.Instance.PissOverwatch3();
				}
			};
			InitializeNetworkBehaviour(typeof(FolgaConfiguratorMachineMomentAMOGUSAMOGUSnotTheFemurBreakerAARGGGGHHHH));
			harmony.PatchAll(typeof(LiminalPoolRoomsDunGen));
			harmony.PatchAll(typeof(Object));
			harmony.PatchAll(typeof(PlayerControllerPatch));
			harmony.PatchAll(typeof(PatchLungProp));
			harmony.PatchAll(typeof(StartPatch));
			harmony.PatchAll(typeof(GNMPatch));
		}
	}
}
namespace PooluginRooms
{
	public class AppEventListener : MonoBehaviour
	{
		public UnityEvent Event = new UnityEvent();

		internal void TriggerEvent()
		{
			Event.Invoke();
		}

		internal static void TriggerAllEvents()
		{
			AppEventListener[] array = Object.FindObjectsByType<AppEventListener>((FindObjectsSortMode)0);
			foreach (AppEventListener appEventListener in array)
			{
				appEventListener.TriggerEvent();
			}
		}
	}
	public class FartPoop : MonoBehaviour
	{
		[SerializeField]
		private List<Material> wawt;

		[SerializeField]
		private PlanarReflectionProbe prp;

		public void Update()
		{
			if (wawt == null)
			{
				Debug.Log((object)"My asshole burns and prp is nul");
				return;
			}
			foreach (Material item in wawt)
			{
				item.SetTexture("_pweej", ((HDProbe)prp).realtimeTexture, (RenderTextureSubElement)3);
			}
		}
	}
	internal class FolgaConfiguratorMachineMomentAMOGUSAMOGUSnotTheFemurBreakerAARGGGGHHHH : NetworkBehaviour
	{
		[SerializeField]
		private GlobalProp gp;

		public GameObject owf;

		public static global::LiminalPoolRoomsDunGen.LiminalPoolRoomsDunGen.FireEnabler configFireEnablerHolder;

		public static bool configKillHolder;

		internal static FolgaConfiguratorMachineMomentAMOGUSAMOGUSnotTheFemurBreakerAARGGGGHHHH Instance;

		public override void OnNetworkSpawn()
		{
			((NetworkBehaviour)this).OnNetworkSpawn();
			if ((Object)(object)Instance == (Object)null)
			{
				Instance = this;
			}
			configKillHolder = global::LiminalPoolRoomsDunGen.LiminalPoolRoomsDunGen.configLiminalPoolRoomsKiller.Value;
			configFireEnablerHolder = global::LiminalPoolRoomsDunGen.LiminalPoolRoomsDunGen.configLiminalPoolRoomsFolga.Value;
			Debug.Log((object)"        //     .ii.\r\n        //    @@@@@@.\r\n        //   V@Mio@@o\r\n        //   :i.  V@V\r\n        //     :oM@@M\r\n        //   :@@@MM@M\r\n        //   @@o  o@M\r\n        //  :@@.  M@M\r\n        //   @@@o@@@@\r\n        //   :M@@V:@@.55555555555");
			Debug.Log((object)("FireEnabler: " + configFireEnablerHolder));
			Debug.Log((object)("KillEnabler: " + configKillHolder));
		}

		[ClientRpc]
		internal void PassOverwatch2ClientRpc(global::LiminalPoolRoomsDunGen.LiminalPoolRoomsDunGen.FireEnabler _fireEnabler, bool _configKillHolder)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: 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_0098: 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_00b2: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2931786590u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe<global::LiminalPoolRoomsDunGen.LiminalPoolRoomsDunGen.FireEnabler>(ref _fireEnabler, default(ForEnums));
					((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref _configKillHolder, default(ForPrimitives));
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2931786590u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					configKillHolder = _configKillHolder;
					configFireEnablerHolder = _fireEnabler;
					Debug.Log((object)"        //     .ii.\r\n        //    @@@@@@.\r\n        //   V@Mio@@o\r\n        //   :i.  V@V\r\n        //     :oM@@M\r\n        //   :@@@MM@M\r\n        //   @@o  o@M\r\n        //  :@@.  M@M\r\n        //   @@@o@@@@\r\n        //   :M@@V:@@.444444444");
					Debug.Log((object)("FireEnabler: " + configFireEnablerHolder));
					Debug.Log((object)("KillEnabler: " + configKillHolder));
				}
			}
		}

		internal void PissOverwatch3()
		{
			configKillHolder = global::LiminalPoolRoomsDunGen.LiminalPoolRoomsDunGen.configLiminalPoolRoomsKiller.Value;
			configFireEnablerHolder = global::LiminalPoolRoomsDunGen.LiminalPoolRoomsDunGen.configLiminalPoolRoomsFolga.Value;
			Debug.Log((object)"        //     .ii.\r\n        //    @@@@@@.\r\n        //   V@Mio@@o\r\n        //   :i.  V@V\r\n        //     :oM@@M\r\n        //   :@@@MM@M\r\n        //   @@o  o@M\r\n        //  :@@.  M@M\r\n        //   @@@o@@@@\r\n        //   :M@@V:@@.3333333333");
			Debug.Log((object)("FireEnabler: " + configFireEnablerHolder));
			PassOverwatch2ClientRpc(configFireEnablerHolder, configKillHolder);
		}

		protected override void __initializeVariables()
		{
			((NetworkBehaviour)this).__initializeVariables();
		}

		[RuntimeInitializeOnLoadMethod]
		internal static void InitializeRPCS_FolgaConfiguratorMachineMomentAMOGUSAMOGUSnotTheFemurBreakerAARGGGGHHHH()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			NetworkManager.__rpc_func_table.Add(2931786590u, new RpcReceiveHandler(__rpc_handler_2931786590));
		}

		private static void __rpc_handler_2931786590(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_004a: 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)
			//IL_005f: 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)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				global::LiminalPoolRoomsDunGen.LiminalPoolRoomsDunGen.FireEnabler fireEnabler = default(global::LiminalPoolRoomsDunGen.LiminalPoolRoomsDunGen.FireEnabler);
				((FastBufferReader)(ref reader)).ReadValueSafe<global::LiminalPoolRoomsDunGen.LiminalPoolRoomsDunGen.FireEnabler>(ref fireEnabler, default(ForEnums));
				bool flag = default(bool);
				((FastBufferReader)(ref reader)).ReadValueSafe<bool>(ref flag, default(ForPrimitives));
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((FolgaConfiguratorMachineMomentAMOGUSAMOGUSnotTheFemurBreakerAARGGGGHHHH)(object)target).PassOverwatch2ClientRpc(fireEnabler, flag);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		[MethodImpl(MethodImplOptions.NoInlining)]
		protected internal override string __getTypeName()
		{
			return "FolgaConfiguratorMachineMomentAMOGUSAMOGUSnotTheFemurBreakerAARGGGGHHHH";
		}
	}
	internal class KillConfigMB : MonoBehaviour
	{
		internal void OnEnable()
		{
			((Component)this).gameObject.SetActive(FolgaConfiguratorMachineMomentAMOGUSAMOGUSnotTheFemurBreakerAARGGGGHHHH.configKillHolder);
		}
	}
	internal class owfRPCclass : MonoBehaviour
	{
		[SerializeField]
		private GlobalProp gp;

		[SerializeField]
		private GameObject OML;

		private void OnEnable()
		{
			//IL_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_009f: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			if (FolgaConfiguratorMachineMomentAMOGUSAMOGUSnotTheFemurBreakerAARGGGGHHHH.configFireEnablerHolder.HasFlag(global::LiminalPoolRoomsDunGen.LiminalPoolRoomsDunGen.FireEnabler.Guaranteed))
			{
				gp.MainPathWeight = 999999f;
				gp.BranchPathWeight = 9999999f;
			}
			if (FolgaConfiguratorMachineMomentAMOGUSAMOGUSnotTheFemurBreakerAARGGGGHHHH.configFireEnablerHolder == global::LiminalPoolRoomsDunGen.LiminalPoolRoomsDunGen.FireEnabler.Disabled)
			{
				gp.MainPathWeight = 0f;
				gp.BranchPathWeight = 0f;
			}
			if (FolgaConfiguratorMachineMomentAMOGUSAMOGUSnotTheFemurBreakerAARGGGGHHHH.configFireEnablerHolder.HasFlag(global::LiminalPoolRoomsDunGen.LiminalPoolRoomsDunGen.FireEnabler.Lowered))
			{
				Transform transform = ((Component)this).transform;
				transform.position -= new Vector3(0f, 1.85f, 0f);
				OML.SetActive(true);
			}
		}
	}
	public class ReflectionConfig : MonoBehaviour
	{
		[SerializeField]
		private PlanarReflectionProbe whyDontIHaveApensi;

		private void OnEnable()
		{
			CheckConfigSettings();
		}

		private void CheckConfigSettings()
		{
			if (!global::LiminalPoolRoomsDunGen.LiminalPoolRoomsDunGen.configLiminalPoolRoomsReflectionFloor.Value)
			{
				((Component)whyDontIHaveApensi).gameObject.SetActive(false);
			}
			if (global::LiminalPoolRoomsDunGen.LiminalPoolRoomsDunGen.configLiminalPoolRoomsReflectionFloor.Value)
			{
				((Component)whyDontIHaveApensi).gameObject.SetActive(true);
			}
		}
	}
	public class ShadowIncrement : MonoBehaviour
	{
		private int originalMaxShadowRequests;

		public void OnEnable()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Unknown result type (might be due to invalid IL or missing references)
			//IL_0037: Unknown result type (might be due to invalid IL or missing references)
			RenderPipelineSettings currentPlatformRenderPipelineSettings = ((HDRenderPipelineAsset)QualitySettings.renderPipeline).currentPlatformRenderPipelineSettings;
			ref int maxShadowRequests = ref currentPlatformRenderPipelineSettings.hdShadowInitParams.maxShadowRequests;
			originalMaxShadowRequests = maxShadowRequests;
			maxShadowRequests = 256;
			((HDRenderPipelineAsset)QualitySettings.renderPipeline).currentPlatformRenderPipelineSettings = currentPlatformRenderPipelineSettings;
		}

		public void OnDisable()
		{
			//IL_0006: Unknown result type (might be due to invalid IL or missing references)
			//IL_000b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_0028: Unknown result type (might be due to invalid IL or missing references)
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			RenderPipelineSettings currentPlatformRenderPipelineSettings = ((HDRenderPipelineAsset)QualitySettings.renderPipeline).currentPlatformRenderPipelineSettings;
			currentPlatformRenderPipelineSettings.hdShadowInitParams.maxShadowRequests = originalMaxShadowRequests;
			((HDRenderPipelineAsset)QualitySettings.renderPipeline).currentPlatformRenderPipelineSettings = currentPlatformRenderPipelineSettings;
		}
	}
	internal class SliderGoonSesh : NetworkBehaviour
	{
		public float teleportCooldownTime = 0.5f;

		private NetworkVariable<float> teleportCooldown = new NetworkVariable<float>(0f, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0);

		private List<PlayerControllerB> braveSoldiers = new List<PlayerControllerB>();

		public AudioSource splashSource;

		public AudioClip splashSFX;

		public void Update()
		{
			if (((NetworkBehaviour)this).IsHost && teleportCooldown.Value > 0f)
			{
				NetworkVariable<float> obj = teleportCooldown;
				obj.Value -= Time.deltaTime;
			}
		}

		private void OnTriggerEnter(Collider other)
		{
			//IL_00c3: 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)
			//IL_00cf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00de: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			//IL_0134: Unknown result type (might be due to invalid IL or missing references)
			if (teleportCooldown.Value > 0f || !((Component)other).CompareTag("Player"))
			{
				return;
			}
			PlayerControllerB component = ((Component)other).gameObject.GetComponent<PlayerControllerB>();
			if (!((Object)(object)component != (Object)(object)GameNetworkManager.Instance.localPlayerController) && (Object)(object)component != (Object)null && !component.isPlayerDead && !braveSoldiers.Contains(component) && RoundManager.Instance.insideAINodes.Length != 0)
			{
				braveSoldiers.Add(component);
				Vector3 position = RoundManager.Instance.insideAINodes[Random.Range(0, RoundManager.Instance.insideAINodes.Length)].transform.position;
				position = RoundManager.Instance.GetRandomNavMeshPositionInRadiusSpherical(position, 10f, default(NavMeshHit));
				if (((NetworkBehaviour)this).IsHost)
				{
					teleportCooldown.Value = teleportCooldownTime;
				}
				splashSource.PlayOneShot(splashSFX);
				if (!((Object)(object)component.deadBody != (Object)null))
				{
					((MonoBehaviour)this).StartCoroutine(TeleportPlayerCoroutine((int)component.playerClientId, position));
				}
			}
		}

		private IEnumerator TeleportPlayerCoroutine(int playerObj, Vector3 teleportPos)
		{
			//IL_0015: Unknown result type (might be due to invalid IL or missing references)
			//IL_0016: Unknown result type (might be due to invalid IL or missing references)
			yield return (object)new WaitForSeconds(0f);
			TeleportPlayer(playerObj, teleportPos);
			braveSoldiers.Remove(StartOfRound.Instance.allPlayerScripts[playerObj]);
			TeleportPlayerServerRpc(playerObj, teleportPos);
		}

		[ServerRpc(RequireOwnership = false)]
		public void TeleportPlayerServerRpc(int playerObj, Vector3 teleportPos)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d8: 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(3298444699u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, playerObj);
					((FastBufferWriter)(ref val2)).WriteValueSafe(ref teleportPos);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3298444699u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					TeleportPlayerClientRpc(playerObj, teleportPos);
				}
			}
		}

		[ClientRpc]
		public void TeleportPlayerClientRpc(int playerObj, Vector3 teleportPos)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_0106: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2457569246u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, playerObj);
					((FastBufferWriter)(ref val2)).WriteValueSafe(ref teleportPos);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2457569246u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					splashSource.PlayOneShot(splashSFX);
					StartOfRound.Instance.allPlayerScripts[playerObj].movementAudio.PlayOneShot(splashSFX);
					TeleportPlayer(playerObj, teleportPos);
				}
			}
		}

		public static void TeleportPlayer(int playerObj, Vector3 teleportPos)
		{
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0057: 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)
			PlayerControllerB val = StartOfRound.Instance.allPlayerScripts[playerObj];
			if (Object.op_Implicit((Object)(object)Object.FindObjectOfType<AudioReverbPresets>()))
			{
				Object.FindObjectOfType<AudioReverbPresets>().audioPresets[2].ChangeAudioReverbForPlayer(val);
			}
			val.isInElevator = false;
			val.isInHangarShipRoom = false;
			val.isInsideFactory = true;
			val.averageVelocity = 0f;
			val.velocityLastFrame = Vector3.zero;
			StartOfRound.Instance.allPlayerScripts[playerObj].TeleportPlayer(teleportPos, false, 0f, false, true);
			if ((Object)(object)val == (Object)(object)GameNetworkManager.Instance.localPlayerController)
			{
				HUDManager.Instance.ShakeCamera((ScreenShakeType)1);
			}
		}

		protected override void __initializeVariables()
		{
			if (teleportCooldown == null)
			{
				throw new Exception("SliderGoonSesh.teleportCooldown cannot be null. All NetworkVariableBase instances must be initialized.");
			}
			((NetworkVariableBase)teleportCooldown).Initialize((NetworkBehaviour)(object)this);
			((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)teleportCooldown, "teleportCooldown");
			base.NetworkVariableFields.Add((NetworkVariableBase)(object)teleportCooldown);
			((NetworkBehaviour)this).__initializeVariables();
		}

		[RuntimeInitializeOnLoadMethod]
		internal static void InitializeRPCS_SliderGoonSesh()
		{
			//IL_0011: Unknown result type (might be due to invalid IL or missing references)
			//IL_001b: Expected O, but got Unknown
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0036: Expected O, but got Unknown
			NetworkManager.__rpc_func_table.Add(3298444699u, new RpcReceiveHandler(__rpc_handler_3298444699));
			NetworkManager.__rpc_func_table.Add(2457569246u, new RpcReceiveHandler(__rpc_handler_2457569246));
		}

		private static void __rpc_handler_3298444699(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				int playerObj = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref playerObj);
				Vector3 teleportPos = default(Vector3);
				((FastBufferReader)(ref reader)).ReadValueSafe(ref teleportPos);
				target.__rpc_exec_stage = (__RpcExecStage)1;
				((SliderGoonSesh)(object)target).TeleportPlayerServerRpc(playerObj, teleportPos);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		private static void __rpc_handler_2457569246(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams)
		{
			//IL_0023: Unknown result type (might be due to invalid IL or missing references)
			//IL_0043: Unknown result type (might be due to invalid IL or missing references)
			//IL_0052: Unknown result type (might be due to invalid IL or missing references)
			//IL_0061: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = target.NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				int playerObj = default(int);
				ByteUnpacker.ReadValueBitPacked(reader, ref playerObj);
				Vector3 teleportPos = default(Vector3);
				((FastBufferReader)(ref reader)).ReadValueSafe(ref teleportPos);
				target.__rpc_exec_stage = (__RpcExecStage)2;
				((SliderGoonSesh)(object)target).TeleportPlayerClientRpc(playerObj, teleportPos);
				target.__rpc_exec_stage = (__RpcExecStage)0;
			}
		}

		[MethodImpl(MethodImplOptions.NoInlining)]
		protected internal override string __getTypeName()
		{
			return "SliderGoonSesh";
		}
	}
	public class WaterRefConf : MonoBehaviour
	{
		[SerializeField]
		private PlanarReflectionProbe whyDontIHaveApensi;

		private void OnEnable()
		{
			CheckConfigSettings();
		}

		private void CheckConfigSettings()
		{
			if (!global::LiminalPoolRoomsDunGen.LiminalPoolRoomsDunGen.configLiminalPoolRoomsReflectionWater.Value)
			{
				((Component)whyDontIHaveApensi).gameObject.SetActive(false);
			}
			if (global::LiminalPoolRoomsDunGen.LiminalPoolRoomsDunGen.configLiminalPoolRoomsReflectionWater.Value)
			{
				((Component)whyDontIHaveApensi).gameObject.SetActive(true);
			}
		}
	}
}
namespace System.Runtime.CompilerServices
{
	[AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
	internal sealed class IgnoresAccessChecksToAttribute : Attribute
	{
		public IgnoresAccessChecksToAttribute(string assemblyName)
		{
		}
	}
}
namespace PooluginRooms.NetcodePatcher
{
	[AttributeUsage(AttributeTargets.Module)]
	internal class NetcodePatchedAssemblyAttribute : Attribute
	{
	}
}