Decompiled source of Oerrdown v0.1.7

Plugins/Oerrdown.dll

Decompiled 8 months ago
using System;
using System.CodeDom.Compiler;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Security;
using System.Security.Permissions;
using AIGraph;
using Agents;
using BepInEx;
using BepInEx.Logging;
using BepInEx.Unity.IL2CPP;
using BepInEx.Unity.IL2CPP.Utils.Collections;
using Enemies;
using FloatingTextAPI;
using GTFO.API;
using GameData;
using Il2CppInterop.Runtime.InteropTypes;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using Il2CppSystem;
using Il2CppSystem.Collections.Generic;
using LevelGeneration;
using Localization;
using Microsoft.CodeAnalysis;
using Player;
using SNetwork;
using TMPro;
using UnityEngine;
using UnityEngine.Video;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)]
[assembly: TargetFramework(".NETCoreApp,Version=v6.0", FrameworkDisplayName = ".NET 6.0")]
[assembly: AssemblyCompany("Oerrdown")]
[assembly: AssemblyConfiguration("Release")]
[assembly: AssemblyFileVersion("1.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("Oerrdown")]
[assembly: AssemblyTitle("Oerrdown")]
[assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)]
[assembly: AssemblyVersion("1.0.0.0")]
[module: UnverifiableCode]
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;
		}
	}
}
namespace Oerrdown
{
	public class Level_A1 : MonoBehaviour
	{
		public static void LevelA1()
		{
			CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(A1()), (Action)null);
			CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(A1EnemySpawner()), (Action)null);
			CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(tekstiruutu()), (Action)null);
			Log.LogInfo("We are in A1 - Commence");
		}

		private static IEnumerator A1EnemySpawner()
		{
			List<EnemyAgent> enemywave = new List<EnemyAgent>();
			Vector3 pos = new Vector3(-45f, 4f, 65f);
			Vector3 val = default(Vector3);
			((Vector3)(ref val))..ctor(0f, 0f, 40f);
			AIG_CourseNode keskusnode = default(AIG_CourseNode);
			AIG_CourseNode.TryGetCourseNode((eDimensionIndex)0, val, 0f, ref keskusnode);
			AIG_CourseNode node = default(AIG_CourseNode);
			AIG_CourseNode.GetCourseNode(1, ref node);
			while (true)
			{
				if (WorldEventManager.GetCondition(15) && SNet.IsMaster)
				{
					enemywave.Clear();
					AIG_CourseNode.GetEnemiesInNodes(keskusnode, 2, enemywave);
					int enemyscore = enemywave.Count;
					while (enemyscore < 18)
					{
						EnemyAgent.SpawnEnemy(31u, pos, node, (AgentMode)1);
						enemyscore++;
						yield return (object)new WaitForSeconds(1f);
					}
					yield return (object)new WaitForSeconds(4f);
				}
				else
				{
					enemywave.Clear();
					yield return (object)new WaitForSeconds(1f);
				}
			}
		}

		private static IEnumerator tekstiruutu()
		{
			GameObject val = new GameObject();
			MeshRenderer val2 = val.AddComponent<MeshRenderer>();
			val.AddComponent<MeshCollider>();
			((Renderer)val2).sharedMaterial = new Material(Shader.Find("Standard"));
			MeshFilter val3 = val.AddComponent<MeshFilter>();
			Mesh val4 = new Mesh();
			Vector3[] array = (Vector3[])(object)new Vector3[4]
			{
				new Vector3(0f, 0f, 0f),
				new Vector3(1.5f, 0f, 0f),
				new Vector3(0f, 0.84f, 0f),
				new Vector3(1.5f, 0.84f, 0f)
			};
			val4.vertices = Il2CppStructArray<Vector3>.op_Implicit(array);
			int[] array2 = new int[6] { 0, 2, 1, 2, 3, 1 };
			val4.triangles = Il2CppStructArray<int>.op_Implicit(array2);
			val4.RecalculateNormals();
			Vector2[] array3 = (Vector2[])(object)new Vector2[4]
			{
				new Vector2(0f, 0f),
				new Vector2(1f, 0f),
				new Vector2(0f, 1f),
				new Vector2(1f, 1f)
			};
			val4.uv = Il2CppStructArray<Vector2>.op_Implicit(array3);
			val3.mesh = val4;
			val.transform.position = new Vector3(0f, 1f, 28f);
			List<Color> list = new List<Color>
			{
				Color.black,
				Color.black,
				Color.black,
				Color.black
			};
			val4.SetColors(Il2CppStructArray<Color>.op_Implicit(list.ToArray()));
			((Renderer)val2).material.color = Color.black;
			GameObject val5 = new GameObject();
			((Renderer)val5.AddComponent<MeshRenderer>()).sharedMaterial = new Material(Shader.Find("Standard"));
			val5.AddComponent<MeshFilter>().mesh = val4;
			val5.transform.position = new Vector3(205.53f, -17f, 64f);
			val5.transform.Rotate(0f, 90f, 0f);
			TextMeshPro tm = val5.AddComponent<TextMeshPro>();
			((TMP_Text)tm).overflowMode = (TextOverflowModes)3;
			((TMP_Text)tm).autoSizeTextContainer = false;
			((TMP_Text)tm).verticalAlignment = (VerticalAlignmentOptions)512;
			((TMP_Text)tm).horizontalAlignment = (HorizontalAlignmentOptions)2;
			tm.transform.localScale = Vector3.one;
			((TMP_Text)tm).isTextObjectScaleStatic = true;
			((TMP_Text)tm).fontSize = 1f;
			((TMP_Text)tm).text = "<align=center><color=yellow>POWER <color=red>OFF\r\n\r\n<color=yellow>RELAY STATUS\r\n[<color=red>==<color=yellow>] [<color=red>==<color=yellow>] [<color=red>==<color=yellow>] [<color=red>==<color=yellow>]";
			((TMP_Text)tm).fontSharedMaterial.SetFloat(ShaderUtilities.ID_GlowPower, 0f);
			((TMP_Text)tm).fontSharedMaterial.SetFloat(ShaderUtilities.ID_Shininess, 0f);
			val.transform.Rotate(0f, 90f, 0f);
			val.transform.position = new Vector3(tm.transform.position.x + 0.001f, tm.transform.position.y - 0.42f, tm.transform.position.z + 0.75f);
			bool kaikkisanottu = false;
			string teksti1 = "<color=red>==";
			string teksti2 = "<color=red>==";
			string teksti3 = "<color=red>==";
			string teksti4 = "<color=red>==";
			string kaikki4 = "<color=red>OFF";
			while (!kaikkisanottu)
			{
				if (WorldEventManager.GetCondition(1))
				{
					teksti1 = "<color=green>==";
				}
				if (WorldEventManager.GetCondition(2))
				{
					teksti2 = "<color=green>==";
				}
				if (WorldEventManager.GetCondition(3))
				{
					teksti3 = "<color=green>==";
				}
				if (WorldEventManager.GetCondition(4))
				{
					teksti4 = "<color=green>==";
				}
				if (WorldEventManager.GetCondition(1) && WorldEventManager.GetCondition(2) && WorldEventManager.GetCondition(3) && WorldEventManager.GetCondition(4))
				{
					kaikki4 = "<color=green>ON";
					kaikkisanottu = true;
				}
				((TMP_Text)tm).text = "<align=center><color=yellow>POWER " + kaikki4 + "\r\n\r\n<color=yellow>RELAY STATUS\r\n[" + teksti1 + "<color=yellow>] [" + teksti2 + "<color=yellow>] [" + teksti3 + "<color=yellow>] [" + teksti4 + "<color=yellow>]";
				((TMP_Text)tm).fontSharedMaterial.SetFloat(ShaderUtilities.ID_GlowPower, 0f);
				((TMP_Text)tm).fontSharedMaterial.SetFloat(ShaderUtilities.ID_Shininess, 0f);
				yield return (object)new WaitForSeconds(1f);
			}
			yield return null;
		}

		private static IEnumerator A1()
		{
			List<EnemyAgent> snatcherit = new List<EnemyAgent>();
			List<EnemyAgent> tankkilist = new List<EnemyAgent>();
			Vector3 val = default(Vector3);
			((Vector3)(ref val))..ctor(0f, 0f, 120f);
			Vector3 val2 = default(Vector3);
			((Vector3)(ref val2))..ctor(204f, -17f, 64f);
			AIG_CourseNode tankkinode = default(AIG_CourseNode);
			AIG_CourseNode.TryGetCourseNode((eDimensionIndex)0, val2, 0f, ref tankkinode);
			AIG_CourseNode snatchernode = default(AIG_CourseNode);
			AIG_CourseNode.TryGetCourseNode((eDimensionIndex)0, val, 0f, ref snatchernode);
			EnemyAgent tankki = new EnemyAgent();
			bool ovi4 = false;
			bool ovi5 = false;
			bool tanksanottu = false;
			bool snatchersanottu = false;
			bool sumulaskettu = false;
			DamageNumberFactory.CreateFloatingText<FloatingTextBase>((IFloatingTextInfo)(object)new Plugin.FloaterInfo(Vector3.zero, new Vector3(0f, 4f, 30f), 0f, 20f, "<size=150%><color=#0055ff>O E R R D O W N\n<size=100%>A1: COMMENCE</color>"));
			yield return (object)new WaitForSeconds(3f);
			AIG_CourseNode.GetEnemiesInNodes(snatchernode, 1, snatcherit);
			AIG_CourseNode.GetEnemiesInNodes(tankkinode, 1, tankkilist);
			if (tankkilist.Count > 0)
			{
				tankki = tankkilist[0];
			}
			while (!ovi4)
			{
				if (WorldEventManager.GetCondition(1) && WorldEventManager.GetCondition(2) && WorldEventManager.GetCondition(3) && WorldEventManager.GetCondition(4) && !sumulaskettu)
				{
					sumulaskettu = true;
					WardenObjectiveEventData val3 = new WardenObjectiveEventData
					{
						Type = (eWardenObjectiveEventType)6,
						FogSetting = 59u,
						FogTransitionDuration = 4f
					};
					if (SNet.IsMaster)
					{
						WorldEventManager.ExecuteEvent(val3, 0f);
					}
					yield return (object)new WaitForSeconds(4f);
					if (SNet.IsMaster)
					{
						WorldEventManager.SetCondition(14, true);
					}
					yield return (object)new WaitForSeconds(4f);
					string untranslatedText = "Biocide successful, ventilating...";
					LocalizedText wardenIntel = new LocalizedText
					{
						UntranslatedText = untranslatedText,
						Id = 0u
					};
					WardenObjectiveEventData val4 = new WardenObjectiveEventData
					{
						Type = (eWardenObjectiveEventType)6,
						FogSetting = 180u,
						WardenIntel = wardenIntel,
						FogTransitionDuration = 50f
					};
					if (SNet.IsMaster)
					{
						WorldEventManager.ExecuteEvent(val4, 0f);
					}
				}
				if (WorldEventManager.GetCondition(1) && WorldEventManager.GetCondition(2) && WorldEventManager.GetCondition(3) && WorldEventManager.GetCondition(4) && tankki.m_alive && !tanksanottu)
				{
					tanksanottu = true;
					string untranslatedText2 = "Tank must be destroyed to proceed";
					LocalizedText wardenIntel2 = new LocalizedText
					{
						UntranslatedText = untranslatedText2,
						Id = 0u
					};
					WardenObjectiveEventData val5 = new WardenObjectiveEventData
					{
						Type = (eWardenObjectiveEventType)11,
						CustomSubObjectiveHeader = LocalizedText.op_Implicit(50001u),
						WardenIntel = wardenIntel2,
						LocalIndex = (eLocalZoneIndex)3,
						DimensionIndex = (eDimensionIndex)0,
						ChainPuzzle = 0u,
						Trigger = (eWardenObjectiveEventTrigger)0,
						Layer = (LG_LayerType)0
					};
					if (SNet.IsMaster)
					{
						WorldEventManager.ExecuteEvent(val5, 0f);
					}
				}
				if (WorldEventManager.GetCondition(1) && WorldEventManager.GetCondition(2) && WorldEventManager.GetCondition(3) && WorldEventManager.GetCondition(4) && !tankki.m_alive)
				{
					ovi4 = true;
					string untranslatedText3 = "finish objective in [ZONE_4]";
					LocalizedText wardenIntel3 = new LocalizedText
					{
						UntranslatedText = untranslatedText3,
						Id = 0u
					};
					WardenObjectiveEventData val6 = new WardenObjectiveEventData
					{
						Type = (eWardenObjectiveEventType)2,
						WardenIntel = wardenIntel3,
						LocalIndex = (eLocalZoneIndex)4,
						DimensionIndex = (eDimensionIndex)0,
						ChainPuzzle = 0u,
						Trigger = (eWardenObjectiveEventTrigger)0,
						Layer = (LG_LayerType)0
					};
					if (SNet.IsMaster)
					{
						WorldEventManager.ExecuteEvent(val6, 0f);
					}
					WardenObjectiveEventData val7 = new WardenObjectiveEventData
					{
						Type = (eWardenObjectiveEventType)11,
						CustomSubObjectiveHeader = LocalizedText.op_Implicit(50009u),
						LocalIndex = (eLocalZoneIndex)0,
						DimensionIndex = (eDimensionIndex)0,
						ChainPuzzle = 0u,
						Trigger = (eWardenObjectiveEventTrigger)0,
						Layer = (LG_LayerType)0
					};
					if (SNet.IsMaster)
					{
						WorldEventManager.ExecuteEvent(val7, 0f);
					}
				}
				yield return (object)new WaitForSeconds(5f);
			}
			while (!ovi5)
			{
				if (WorldEventManager.GetCondition(12))
				{
					int num = 0;
					if (!snatchersanottu)
					{
						snatchersanottu = true;
						string untranslatedText4 = "All hostile entities in [ZONE_4] must be killed";
						LocalizedText wardenIntel4 = new LocalizedText
						{
							UntranslatedText = untranslatedText4,
							Id = 0u
						};
						WardenObjectiveEventData val8 = new WardenObjectiveEventData
						{
							Type = (eWardenObjectiveEventType)11,
							CustomSubObjectiveHeader = LocalizedText.op_Implicit(50010u),
							WardenIntel = wardenIntel4,
							LocalIndex = (eLocalZoneIndex)5,
							DimensionIndex = (eDimensionIndex)0,
							ChainPuzzle = 0u,
							Trigger = (eWardenObjectiveEventTrigger)0,
							Layer = (LG_LayerType)0
						};
						if (SNet.IsMaster)
						{
							WorldEventManager.ExecuteEvent(val8, 0f);
						}
					}
					Enumerator<EnemyAgent> enumerator = snatcherit.GetEnumerator();
					while (enumerator.MoveNext())
					{
						if (enumerator.Current.m_alive)
						{
							num++;
						}
					}
					if (num == 0 && !ovi5)
					{
						ovi5 = true;
						string untranslatedText5 = "extraction allowed, proceed to [ZONE_5]";
						LocalizedText wardenIntel5 = new LocalizedText
						{
							UntranslatedText = untranslatedText5,
							Id = 0u
						};
						WardenObjectiveEventData val9 = new WardenObjectiveEventData
						{
							Type = (eWardenObjectiveEventType)12,
							WardenIntel = wardenIntel5,
							LocalIndex = (eLocalZoneIndex)5,
							DimensionIndex = (eDimensionIndex)0,
							ChainPuzzle = 0u,
							Trigger = (eWardenObjectiveEventTrigger)0,
							Layer = (LG_LayerType)0
						};
						if (SNet.IsMaster)
						{
							WorldEventManager.ExecuteEvent(val9, 0f);
						}
						WardenObjectiveEventData val10 = new WardenObjectiveEventData
						{
							Type = (eWardenObjectiveEventType)2,
							LocalIndex = (eLocalZoneIndex)5,
							DimensionIndex = (eDimensionIndex)0,
							ChainPuzzle = 0u,
							Trigger = (eWardenObjectiveEventTrigger)0,
							Layer = (LG_LayerType)0
						};
						if (SNet.IsMaster)
						{
							WorldEventManager.ExecuteEvent(val10, 0f);
						}
						WardenObjectiveEventData val11 = new WardenObjectiveEventData
						{
							Type = (eWardenObjectiveEventType)11,
							CustomSubObjectiveHeader = LocalizedText.op_Implicit(50002u),
							LocalIndex = (eLocalZoneIndex)5,
							DimensionIndex = (eDimensionIndex)0,
							ChainPuzzle = 0u,
							Trigger = (eWardenObjectiveEventTrigger)0,
							Layer = (LG_LayerType)0
						};
						if (SNet.IsMaster)
						{
							WorldEventManager.ExecuteEvent(val11, 0f);
						}
					}
				}
				yield return (object)new WaitForSeconds(5f);
			}
			yield return null;
		}
	}
	public class Level_A2 : MonoBehaviour
	{
		public static void LevelA2()
		{
			CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(A2()), (Action)null);
			Log.LogInfo("We are in A2 - Christmas");
		}

		private static IEnumerator A2()
		{
			DamageNumberFactory.CreateFloatingText<FloatingTextBase>((IFloatingTextInfo)(object)new Plugin.FloaterInfo(Vector3.zero, new Vector3(0f, 4f, 30f), 0f, 20f, "<size=150%><color=#0055ff>MERRY CHRISTMAS</color>"));
			CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(videoruutu()), (Action)null);
			Vector3 position = default(Vector3);
			((Vector3)(ref position))..ctor(0f, 50f, 64f);
			GameObject go = new GameObject();
			go.transform.position = position;
			List<LG_Light> list = new List<LG_Light>();
			list.Clear();
			foreach (LG_Light item in Object.FindObjectsOfType<LG_Light>())
			{
				item.ChangeIntensity(5f);
				if (((Component)item).transform.position.x <= 0f)
				{
					item.ChangeColor(Color.green);
				}
				if (((Component)item).transform.position.x > 0f)
				{
					item.ChangeColor(Color.red);
				}
				if (((Component)item).transform.position.y < -2f)
				{
					item.ChangeColor(Color.white);
				}
				list.Add(item);
			}
			AIG_CourseNode node = default(AIG_CourseNode);
			AIG_CourseNode.TryGetCourseNode((eDimensionIndex)0, new Vector3(0f, 0f, 34f), 0f, ref node);
			Vector3 katsomo = new Vector3(0f, 4f, 45f);
			new Vector3(0f, 10f, 64f);
			List<Vector3> list2 = new List<Vector3>();
			list2.Clear();
			Dictionary<Vector3, EnemyAgent> tankkilista = new Dictionary<Vector3, EnemyAgent>();
			tankkilista.Clear();
			list2.Add(new Vector3(-8f, 4f, 44f));
			list2.Add(new Vector3(-21f, 4.1f, 53.2f));
			list2.Add(new Vector3(-24f, 0f, 63f));
			list2.Add(new Vector3(-14.5f, -1.8f, 66.5f));
			list2.Add(new Vector3(-12.8f, -1.8f, 73.85f));
			list2.Add(new Vector3(-8.4f, -1.8f, 78.8f));
			list2.Add(new Vector3(-0.83f, 0f, 83.34f));
			list2.Add(new Vector3(6.8f, 0f, 86.3f));
			list2.Add(new Vector3(14.1f, 4f, 78.76f));
			list2.Add(new Vector3(22f, 0f, 74.66f));
			list2.Add(new Vector3(20.2f, -1.8f, 65.5f));
			list2.Add(new Vector3(17.6f, -1.8f, 58.6f));
			list2.Add(new Vector3(13.13f, -2.8f, 53.3f));
			list2.Add(new Vector3(5.13f, -2.8f, 47.7f));
			Vector3 val;
			foreach (Vector3 item2 in list2)
			{
				val = go.transform.position - item2;
				Vector3 normalized = ((Vector3)(ref val)).normalized;
				normalized.y = 0f;
				Quaternion val2 = Quaternion.LookRotation(normalized);
				EnemyAgent value = EnemyAllocator.Current.SpawnEnemy(29u, node, (AgentMode)4, item2, val2, (EnemyGroup)null, -1);
				tankkilista[item2] = value;
			}
			bool katsomossa = false;
			while (!katsomossa)
			{
				if (Vector3.Distance(((Component)PlayerManager.PlayerAgentsInLevel[0]).transform.position, katsomo) < 2f)
				{
					katsomossa = true;
				}
				yield return (object)new WaitForSeconds(0.5f);
			}
			yield return (object)new WaitForSeconds(18f);
			foreach (KeyValuePair<Vector3, EnemyAgent> item3 in tankkilista)
			{
				CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(tappaja(item3.Value)), (Action)null);
				yield return (object)new WaitForSeconds(0.5f);
			}
			yield return (object)new WaitForSeconds(3f);
			uint otokka = 31u;
			Vector3 pos1 = new Vector3(13.13f, -2.8f, 53.3f);
			Vector3 pos2 = new Vector3(-24f, 0f, 63f);
			for (int laskuri = 0; laskuri < 100; laskuri++)
			{
				int num = Random.Range(1, 7);
				if (num == 1)
				{
					otokka = 28u;
				}
				if (num == 2)
				{
					otokka = 30u;
				}
				if (num == 3)
				{
					otokka = 39u;
				}
				if (num == 4)
				{
					otokka = 29u;
				}
				if (num == 5)
				{
					otokka = 36u;
				}
				if (num == 6)
				{
					otokka = 37u;
				}
				val = go.transform.position - pos1;
				Vector3 normalized2 = ((Vector3)(ref val)).normalized;
				normalized2.y = 0f;
				Quaternion val3 = Quaternion.LookRotation(normalized2);
				EnemyAgent enemy = EnemyAllocator.Current.SpawnEnemy(otokka, node, (AgentMode)1, pos1, val3, (EnemyGroup)null, -1);
				val = go.transform.position - pos2;
				normalized2 = ((Vector3)(ref val)).normalized;
				normalized2.y = 0f;
				val3 = Quaternion.LookRotation(normalized2);
				EnemyAgent enemy2 = EnemyAllocator.Current.SpawnEnemy(otokka, node, (AgentMode)1, pos2, val3, (EnemyGroup)null, -1);
				CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(tappaja(enemy)), (Action)null);
				CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(tappaja(enemy2)), (Action)null);
				yield return (object)new WaitForSeconds(0.4f);
			}
			yield return null;
		}

		private static IEnumerator tappaja(EnemyAgent enemy)
		{
			Vector3 position = default(Vector3);
			((Vector3)(ref position))..ctor(0f, 50f, 64f);
			GameObject go = new GameObject();
			go.transform.position = position;
			yield return (object)new WaitForFixedUpdate();
			Vector3 dir = go.transform.position - ((Component)enemy).transform.position;
			enemy.Damage.MeleeDamage(((Dam_SyncedDamageBase)enemy.Damage).DamageMax, (Agent)null, default(Vector3), default(Vector3), 0, 1f, 1f, 1f, 1f, false, (DamageNoiseLevel)0, 0u);
			Rigidbody rb = ((Component)enemy).gameObject.AddComponent<Rigidbody>();
			rb.isKinematic = false;
			rb.useGravity = true;
			rb.mass = 2f;
			for (int i = 0; i < 10; i++)
			{
				if ((Object)(object)enemy.RagdollInstance != (Object)null)
				{
					enemy.RagdollInstance.transform.position = ((Component)rb).transform.position;
				}
				rb.AddForce(dir * 20f);
				enemy.Position = ((Component)rb).transform.position;
				enemy.m_goodPosition = ((Component)rb).transform.position;
				((Agent)enemy).m_position = ((Component)rb).transform.position;
				yield return (object)new WaitForFixedUpdate();
			}
			yield return null;
		}

		private static IEnumerator videoruutu()
		{
			GameObject val = new GameObject();
			MeshRenderer val2 = val.AddComponent<MeshRenderer>();
			val.AddComponent<MeshCollider>();
			MeshFilter val3 = val.AddComponent<MeshFilter>();
			Mesh val4 = new Mesh();
			Vector3[] array = (Vector3[])(object)new Vector3[4]
			{
				new Vector3(0f, 0f, 0f),
				new Vector3(13.3f, 0f, 0f),
				new Vector3(0f, 7.5f, 0f),
				new Vector3(13.3f, 7.5f, 0f)
			};
			val4.vertices = Il2CppStructArray<Vector3>.op_Implicit(array);
			int[] array2 = new int[6] { 0, 2, 1, 2, 3, 1 };
			val4.triangles = Il2CppStructArray<int>.op_Implicit(array2);
			val4.RecalculateNormals();
			Vector2[] array3 = (Vector2[])(object)new Vector2[4]
			{
				new Vector2(0f, 0f),
				new Vector2(1f, 0f),
				new Vector2(0f, 1f),
				new Vector2(1f, 1f)
			};
			val4.uv = Il2CppStructArray<Vector2>.op_Implicit(array3);
			val3.mesh = val4;
			val.transform.position = new Vector3(-6.65f, 3f, 56f);
			GameObject val5 = new GameObject();
			val5.AddComponent<Light>().color = Color.white;
			val5.transform.position = new Vector3(-8f, 5f, 53f);
			GameObject val6 = new GameObject();
			val6.AddComponent<Light>().color = Color.white;
			val6.transform.position = new Vector3(8f, 5f, 53f);
			List<Color> list = new List<Color>
			{
				Color.black,
				Color.black,
				Color.black,
				Color.black
			};
			val4.SetColors(Il2CppStructArray<Color>.op_Implicit(list.ToArray()));
			((Renderer)val2).material.mainTexture = (Texture)new RenderTexture(1280, 720, 24, (RenderTextureFormat)0);
			VideoPlayer videoPlayer = val.AddComponent<VideoPlayer>();
			bool katsomossa = false;
			Vector3 katsomo = new Vector3(0f, 4f, 45f);
			while (!katsomossa)
			{
				if (Vector3.Distance(((Component)PlayerManager.PlayerAgentsInLevel[0]).transform.position, katsomo) < 2f)
				{
					katsomossa = true;
				}
				yield return (object)new WaitForSeconds(0.5f);
			}
			videoPlayer.url = "c:/users/fd/Downloads/christmasfinal.mp4";
			videoPlayer.Play();
			yield return null;
		}
	}
	public class Level_B1 : MonoBehaviour
	{
		public static void LevelB1()
		{
			CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(B1()), (Action)null);
			CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(B1EnemySpawner()), (Action)null);
			Log.LogInfo("We are in B1 - Soak");
		}

		private static IEnumerator B1EnemySpawner()
		{
			List<EnemyAgent> enemywave = new List<EnemyAgent>();
			Vector3 pos1 = new Vector3(49f, 4f, 128f);
			Vector3 pos2 = new Vector3(0f, 4f, 175f);
			Vector3 pos3 = new Vector3(-64f, 4f, 83f);
			Vector3 pos4 = new Vector3(-64f, 4f, 176f);
			Vector3 val = default(Vector3);
			((Vector3)(ref val))..ctor(0f, 0f, 120f);
			AIG_CourseNode keskusnode = default(AIG_CourseNode);
			AIG_CourseNode.TryGetCourseNode((eDimensionIndex)0, val, 0f, ref keskusnode);
			AIG_CourseNode node = default(AIG_CourseNode);
			AIG_CourseNode.GetCourseNode(1, ref node);
			while (!WorldEventManager.GetCondition(15))
			{
				yield return (object)new WaitForSeconds(1f);
			}
			Vector3 val2 = default(Vector3);
			while (WorldEventManager.GetCondition(15) && SNet.IsMaster)
			{
				Log.LogInfo("here comes the flood.");
				if (SNet.IsMaster)
				{
					EnemyAgent.SpawnEnemy(39u, pos3, node, (AgentMode)1);
				}
				yield return (object)new WaitForSeconds(0.5f);
				if (SNet.IsMaster)
				{
					EnemyAgent.SpawnEnemy(39u, pos4, node, (AgentMode)1);
				}
				yield return (object)new WaitForSeconds(20f);
				int laskuri = 0;
				while (laskuri < 72)
				{
					int valilaskuri = 0;
					uint otokka = 31u;
					for (; valilaskuri < 8; valilaskuri++)
					{
						int num = Random.Range(1, 5);
						int num2 = Random.Range(1, 4);
						((Vector3)(ref val2))..ctor(0f, 0f, 0f);
						if (num2 == 1)
						{
							otokka = 31u;
						}
						if (num2 == 2)
						{
							otokka = 30u;
						}
						if (num2 == 3)
						{
							otokka = 11u;
						}
						if (num == 1)
						{
							val2 = pos1;
						}
						if (num == 2)
						{
							val2 = pos2;
						}
						if (num == 3)
						{
							val2 = pos3;
						}
						if (num == 4)
						{
							val2 = pos4;
						}
						if (SNet.IsMaster)
						{
							EnemyAgent.SpawnEnemy(otokka, val2, node, (AgentMode)1);
						}
						yield return (object)new WaitForSeconds(0.5f);
						laskuri++;
					}
					Log.LogInfo("laskuri: " + laskuri + " / " + 72);
					yield return (object)new WaitForSeconds(15f);
				}
				EnemyAgent.SpawnEnemy(39u, pos3, node, (AgentMode)1);
				yield return (object)new WaitForSeconds(0.5f);
				EnemyAgent.SpawnEnemy(39u, pos4, node, (AgentMode)1);
				yield return (object)new WaitForSeconds(15f);
				EnemyAgent.SpawnEnemy(29u, pos3, node, (AgentMode)1);
				string untranslatedText = "biocide delivery complete, neutralize remaining hostiles";
				LocalizedText wardenIntel = new LocalizedText
				{
					UntranslatedText = untranslatedText,
					Id = 0u
				};
				WardenObjectiveEventData val3 = new WardenObjectiveEventData
				{
					Type = (eWardenObjectiveEventType)0,
					WardenIntel = wardenIntel
				};
				if (SNet.IsMaster)
				{
					WorldEventManager.ExecuteEvent(val3, 0f);
				}
				yield return (object)new WaitForSeconds(4f);
				bool tankkitapettu = false;
				while (!tankkitapettu)
				{
					AIG_CourseNode.GetEnemiesInNodes(keskusnode, 2, enemywave);
					if (enemywave.Count == 0)
					{
						tankkitapettu = true;
					}
					yield return (object)new WaitForSeconds(5f);
				}
				if (SNet.IsMaster)
				{
					WorldEventManager.SetCondition(15, false);
				}
			}
			yield return null;
		}

		private static IEnumerator B1()
		{
			while (!WorldEventManager.GetCondition(14))
			{
				yield return (object)new WaitForSeconds(1f);
			}
			yield return (object)new WaitForSeconds(10f);
			string untranslatedText = "pressure buildup preventing water ingress, opening pressure bulkheads in 5 seconds..";
			LocalizedText wardenIntel = new LocalizedText
			{
				UntranslatedText = untranslatedText,
				Id = 0u
			};
			WardenObjectiveEventData val = new WardenObjectiveEventData
			{
				Type = (eWardenObjectiveEventType)0,
				WardenIntel = wardenIntel
			};
			if (SNet.IsMaster)
			{
				WorldEventManager.ExecuteEvent(val, 0f);
			}
			yield return (object)new WaitForSeconds(5f);
			val = new WardenObjectiveEventData
			{
				Type = (eWardenObjectiveEventType)1,
				Layer = (LG_LayerType)0,
				DimensionIndex = (eDimensionIndex)0,
				LocalIndex = (eLocalZoneIndex)1
			};
			if (SNet.IsMaster)
			{
				WorldEventManager.ExecuteEvent(val, 0f);
			}
			val = new WardenObjectiveEventData
			{
				Type = (eWardenObjectiveEventType)1,
				Layer = (LG_LayerType)0,
				DimensionIndex = (eDimensionIndex)0,
				LocalIndex = (eLocalZoneIndex)2
			};
			if (SNet.IsMaster)
			{
				WorldEventManager.ExecuteEvent(val, 0f);
			}
			val = new WardenObjectiveEventData
			{
				Type = (eWardenObjectiveEventType)1,
				Layer = (LG_LayerType)0,
				DimensionIndex = (eDimensionIndex)0,
				LocalIndex = (eLocalZoneIndex)4
			};
			if (SNet.IsMaster)
			{
				WorldEventManager.ExecuteEvent(val, 0f);
			}
			val = new WardenObjectiveEventData
			{
				Type = (eWardenObjectiveEventType)1,
				Layer = (LG_LayerType)0,
				DimensionIndex = (eDimensionIndex)0,
				LocalIndex = (eLocalZoneIndex)5
			};
			if (SNet.IsMaster)
			{
				WorldEventManager.ExecuteEvent(val, 0f);
			}
			yield return (object)new WaitForSeconds(4f);
			untranslatedText = "non-toxic vapor will be ventilated shortly";
			wardenIntel = new LocalizedText
			{
				UntranslatedText = untranslatedText,
				Id = 0u
			};
			val = new WardenObjectiveEventData
			{
				Type = (eWardenObjectiveEventType)6,
				FogSetting = 181u,
				FogTransitionDuration = 6f,
				WardenIntel = wardenIntel
			};
			if (SNet.IsMaster)
			{
				WorldEventManager.ExecuteEvent(val, 0f);
			}
			yield return (object)new WaitForSeconds(4f);
			untranslatedText = "some hostile entities escaped, lock and load";
			wardenIntel = new LocalizedText
			{
				UntranslatedText = untranslatedText,
				Id = 0u
			};
			val = new WardenObjectiveEventData
			{
				Type = (eWardenObjectiveEventType)0,
				WardenIntel = wardenIntel
			};
			if (SNet.IsMaster)
			{
				WorldEventManager.ExecuteEvent(val, 0f);
				WorldEventManager.SetCondition(15, true);
			}
			while (WorldEventManager.GetCondition(15))
			{
				yield return (object)new WaitForSeconds(1f);
			}
			untranslatedText = "ventilation active";
			wardenIntel = new LocalizedText
			{
				UntranslatedText = untranslatedText,
				Id = 0u
			};
			val = new WardenObjectiveEventData
			{
				Type = (eWardenObjectiveEventType)6,
				FogSetting = 180u,
				FogTransitionDuration = 40f,
				WardenIntel = wardenIntel
			};
			if (SNet.IsMaster)
			{
				WorldEventManager.ExecuteEvent(val, 0f);
			}
			val = new WardenObjectiveEventData
			{
				Type = (eWardenObjectiveEventType)2,
				Layer = (LG_LayerType)0,
				DimensionIndex = (eDimensionIndex)0,
				LocalIndex = (eLocalZoneIndex)6
			};
			if (SNet.IsMaster)
			{
				WorldEventManager.ExecuteEvent(val, 0f);
			}
			while (!WorldEventManager.GetCondition(13))
			{
				yield return (object)new WaitForSeconds(1f);
			}
			val = new WardenObjectiveEventData
			{
				Type = (eWardenObjectiveEventType)11,
				CustomSubObjectiveHeader = LocalizedText.op_Implicit(51003u),
				LocalIndex = (eLocalZoneIndex)8,
				DimensionIndex = (eDimensionIndex)0,
				ChainPuzzle = 0u,
				Trigger = (eWardenObjectiveEventTrigger)0,
				Layer = (LG_LayerType)0
			};
			if (SNet.IsMaster)
			{
				WorldEventManager.ExecuteEvent(val, 0f);
			}
			List<EnemyAgent> val2 = new List<EnemyAgent>();
			Vector3 val3 = default(Vector3);
			((Vector3)(ref val3))..ctor(-360f, 7.5f, 128f);
			AIG_CourseNode val4 = default(AIG_CourseNode);
			AIG_CourseNode.TryGetCourseNode((eDimensionIndex)0, val3, 0f, ref val4);
			AIG_CourseNode.GetEnemiesInNodes(val4, 1, val2);
			EnemyAgent mamma = val2[0];
			while (mamma.m_alive)
			{
				yield return (object)new WaitForSeconds(1f);
			}
			val = new WardenObjectiveEventData
			{
				Type = (eWardenObjectiveEventType)2,
				Layer = (LG_LayerType)0,
				DimensionIndex = (eDimensionIndex)0,
				LocalIndex = (eLocalZoneIndex)9
			};
			if (SNet.IsMaster)
			{
				WorldEventManager.ExecuteEvent(val, 0f);
			}
			val = new WardenObjectiveEventData
			{
				Type = (eWardenObjectiveEventType)12,
				Layer = (LG_LayerType)0
			};
			if (SNet.IsMaster)
			{
				WorldEventManager.ExecuteEvent(val, 0f);
			}
			val = new WardenObjectiveEventData
			{
				Type = (eWardenObjectiveEventType)11,
				CustomSubObjectiveHeader = LocalizedText.op_Implicit(51004u),
				LocalIndex = (eLocalZoneIndex)8,
				DimensionIndex = (eDimensionIndex)0,
				ChainPuzzle = 0u,
				Trigger = (eWardenObjectiveEventTrigger)0,
				Layer = (LG_LayerType)0
			};
			if (SNet.IsMaster)
			{
				WorldEventManager.ExecuteEvent(val, 0f);
			}
			yield return null;
		}
	}
	public class Level_B2 : MonoBehaviour
	{
		public static void LevelB2()
		{
			CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(B2()), (Action)null);
			CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(B2EnemySpawner()), (Action)null);
			Log.LogInfo("We are in B2 - Zap");
		}

		private static IEnumerator B2EnemySpawner()
		{
			List<EnemyAgent> enemywave = new List<EnemyAgent>();
			Vector3 pos = new Vector3(-45f, 4f, 65f);
			Vector3 val = default(Vector3);
			((Vector3)(ref val))..ctor(0f, 0f, 40f);
			AIG_CourseNode keskusnode = default(AIG_CourseNode);
			AIG_CourseNode.TryGetCourseNode((eDimensionIndex)0, val, 2f, ref keskusnode);
			AIG_CourseNode node = default(AIG_CourseNode);
			AIG_CourseNode.GetCourseNode(1, ref node);
			while (!WorldEventManager.GetCondition(12))
			{
				yield return (object)new WaitForSeconds(1f);
			}
			int enemyscore = 0;
			while (WorldEventManager.GetCondition(15) && SNet.IsMaster)
			{
				Log.LogInfo("alku - enemywave active, count : " + enemyscore);
				enemywave.Clear();
				AIG_CourseNode.GetEnemiesInNodes(keskusnode, 2, enemywave);
				enemyscore = enemywave.Count;
				while (enemyscore < 8)
				{
					EnemyAgent.SpawnEnemy(30u, pos, node, (AgentMode)1);
					enemyscore++;
					Log.LogInfo("enemywave active, count : " + enemyscore);
					yield return (object)new WaitForSeconds(1f);
				}
				yield return (object)new WaitForSeconds(10f);
			}
			enemywave.Clear();
			yield return null;
		}

		private static IEnumerator B2EnemyKiller(EnemyAgent obj)
		{
			EnemyAI component = ((Component)obj).GetComponent<EnemyAI>();
			PlayerAgent val = default(PlayerAgent);
			PlayerManager.TryGetLocalPlayerAgent(ref val);
			AgentMode val2 = (AgentMode)1;
			component.SetStartMode(val2);
			((AgentAI)component).ModeChange();
			((AgentAI)component).m_mode = val2;
			((AgentAI)component).SetDetectedAgent((Agent)(object)val, (AgentTargetDetectionType)4);
			while (obj.m_alive)
			{
				if (((Component)obj).transform.position.y < -3.4f)
				{
					obj.Damage.MeleeDamage(((Dam_SyncedDamageBase)obj.Damage).DamageMax, (Agent)null, default(Vector3), default(Vector3), 0, 1f, 1f, 1f, 1f, false, (DamageNoiseLevel)0, 0u);
				}
				yield return (object)new WaitForSeconds(0.3f);
			}
			yield return null;
		}

		private static IEnumerator B2()
		{
			DamageNumberFactory.CreateFloatingText<FloatingTextBase>((IFloatingTextInfo)(object)new Plugin.FloaterInfo(Vector3.zero, new Vector3(0f, 4f, 30f), 0f, 20f, "<size=150%><color=#0055ff>O E R R D O W N\n<size=100%>B2: Zap</color>"));
			while (!WorldEventManager.GetCondition(14))
			{
				yield return (object)new WaitForSeconds(1f);
			}
			string untranslatedText = "biological conditions in [ZONE_5] are horrifying, extreme caution recommended";
			LocalizedText wardenIntel = new LocalizedText
			{
				UntranslatedText = untranslatedText,
				Id = 0u
			};
			WardenObjectiveEventData val = new WardenObjectiveEventData
			{
				Type = (eWardenObjectiveEventType)0,
				WardenIntel = wardenIntel
			};
			if (SNet.IsMaster)
			{
				WorldEventManager.ExecuteEvent(val, 0f);
			}
			yield return (object)new WaitForSeconds(4f);
			untranslatedText = "PAKM-42 and the generators are located in the pit, all subjects advised to climb down. hovering tank is their spiritual leader.";
			wardenIntel = new LocalizedText
			{
				UntranslatedText = untranslatedText,
				Id = 0u
			};
			val = new WardenObjectiveEventData
			{
				Type = (eWardenObjectiveEventType)0,
				WardenIntel = wardenIntel
			};
			if (SNet.IsMaster)
			{
				WorldEventManager.ExecuteEvent(val, 0f);
			}
			while (!WorldEventManager.GetCondition(13))
			{
				yield return (object)new WaitForSeconds(1f);
			}
			if (SNet.IsMaster)
			{
				WorldEventManager.SetCondition(15, true);
			}
			untranslatedText = "<color=red>PAKM-42 active, <color=orange>IFFHB<color=red> protocol initiated, stay in the pit";
			wardenIntel = new LocalizedText
			{
				UntranslatedText = untranslatedText,
				Id = 0u
			};
			val = new WardenObjectiveEventData
			{
				Type = (eWardenObjectiveEventType)0,
				WardenIntel = wardenIntel
			};
			if (SNet.IsMaster)
			{
				WorldEventManager.ExecuteEvent(val, 0f);
			}
			Vector3 val2 = default(Vector3);
			((Vector3)(ref val2))..ctor(8f, 0f, 318f);
			AIG_CourseNode loppunode = default(AIG_CourseNode);
			AIG_CourseNode.TryGetCourseNode((eDimensionIndex)0, val2, 2f, ref loppunode);
			List<EnemyAgent> enemies = AIG_CourseGraph.GetReachableEnemiesInNodes(loppunode, 3);
			Enumerator<EnemyAgent> enumerator = enemies.GetEnumerator();
			while (enumerator.MoveNext())
			{
				CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(B2EnemyKiller(enumerator.Current)), (Action)null);
			}
			while (enemies.Count > 0)
			{
				enemies = AIG_CourseGraph.GetReachableEnemiesInNodes(loppunode, 3);
				yield return (object)new WaitForSeconds(3f);
			}
			if (SNet.IsMaster)
			{
				WorldEventManager.SetCondition(15, false);
			}
			untranslatedText = "pakm-42 test successful, extraction allowed";
			wardenIntel = new LocalizedText
			{
				UntranslatedText = untranslatedText,
				Id = 0u
			};
			val = new WardenObjectiveEventData
			{
				Type = (eWardenObjectiveEventType)2,
				DimensionIndex = (eDimensionIndex)0,
				Layer = (LG_LayerType)0,
				LocalIndex = (eLocalZoneIndex)6,
				WardenIntel = wardenIntel
			};
			if (SNet.IsMaster)
			{
				WorldEventManager.ExecuteEvent(val, 0f);
			}
			yield return null;
		}
	}
	public class Level_B3 : MonoBehaviour
	{
		public static string taustavari = "black";

		public static string cratestatus = "<color=red>NA<color=#0055ff>";

		public static string rivi1 = " unauthorized  ";

		public static string rivi2 = " dl  <color=red>forbidden<color=#0055ff> ";

		public static string rivi3 = "               ";

		public static string rivi4 = "               ";

		public static string _d1text = "<mspace=1em><color=orange>#################\r\n<color=orange>#<color=#0055ff>     sigstr <color=green>10<color=#0055ff> <color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>    SITE 1     <color=orange>#\r\n#<color=#0055ff>   research    <color=orange>#\r\n#<color=#0055ff>    bucket     <color=orange>#\r\n#<color=#0055ff>  dl station   <color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff> storage crate <color=orange>#\r\n#<color=#0055ff>   usage: " + cratestatus + "   <color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>" + rivi1 + "<color=orange>#\r\n#<color=#0055ff>" + rivi2 + "<color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>" + rivi3 + "<color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>" + rivi4 + "<color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#################\r\n";

		public static string _d2text = "<mspace=1em><color=orange>#################\r\n<color=orange>#<color=#0055ff>     sigstr <color=orange> 8<color=#0055ff> <color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>    SITE 2     <color=orange>#\r\n#<color=#0055ff>   research    <color=orange>#\r\n#<color=#0055ff>    bucket     <color=orange>#\r\n#<color=#0055ff>  dl station   <color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff> storage crate <color=orange>#\r\n#<color=#0055ff>   usage: " + cratestatus + "   <color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>" + rivi1 + "<color=orange>#\r\n#<color=#0055ff>" + rivi2 + "<color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>" + rivi3 + "<color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>" + rivi4 + "<color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#################\r\n";

		public static string _d3text = "<mspace=1em><color=orange>#################\r\n<color=orange>#<color=#0055ff>     sigstr <color=red> 6<color=#0055ff> <color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>    SITE 3     <color=orange>#\r\n#<color=#0055ff>   research    <color=orange>#\r\n#<color=#0055ff>    bucket     <color=orange>#\r\n#<color=#0055ff>  dl station   <color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff> storage crate <color=orange>#\r\n#<color=#0055ff>   usage: " + cratestatus + "   <color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>" + rivi1 + "<color=orange>#\r\n#<color=#0055ff>" + rivi2 + "<color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>" + rivi3 + "<color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>" + rivi4 + "<color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#################\r\n";

		public static void LevelB3()
		{
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_0082: Unknown result type (might be due to invalid IL or missing references)
			//IL_008b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			CarryItemPickup_Core obj = Object.FindObjectOfType<CarryItemPickup_Core>();
			CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(B3()), (Action)null);
			CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(B3Crate(obj)), (Action)null);
			Log.LogInfo("We are in B3 - Download");
			Dictionary<Vector3, int> dictionary = new Dictionary<Vector3, int>();
			Vector3 key = default(Vector3);
			((Vector3)(ref key))..ctor(-70.69f, -1.4833f, 127.8043f);
			Vector3 key2 = default(Vector3);
			((Vector3)(ref key2))..ctor(-70.69f, -1.4833f, 255.772f);
			Vector3 key3 = default(Vector3);
			((Vector3)(ref key3))..ctor(-70.69f, -1.4833f, 319.8257f);
			dictionary[key] = 90;
			dictionary[key2] = 90;
			dictionary[key3] = 90;
			foreach (KeyValuePair<Vector3, int> item in dictionary)
			{
				CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(Displays(item.Key, item.Value)), (Action)null);
			}
			CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(DisplayController()), (Action)null);
		}

		private static IEnumerator DisplayController()
		{
			GenericEnemyWaveData aallot = new GenericEnemyWaveData
			{
				AreaDistance = 2,
				TriggerAlarm = true,
				WaveSettings = 12u,
				WavePopulation = 1u,
				SpawnDelay = 0f
			};
			WardenObjectiveEventData setti3 = new WardenObjectiveEventData
			{
				Type = (eWardenObjectiveEventType)9,
				DimensionIndex = (eDimensionIndex)0,
				Layer = (LG_LayerType)0,
				LocalIndex = (eLocalZoneIndex)2,
				EnemyWaveData = aallot
			};
			WardenObjectiveEventData setti4 = new WardenObjectiveEventData
			{
				Type = (eWardenObjectiveEventType)10,
				DimensionIndex = (eDimensionIndex)0,
				Layer = (LG_LayerType)0
			};
			while (!WorldEventManager.GetCondition(13))
			{
				yield return (object)new WaitForSeconds(0.5f);
			}
			if (SNet.IsMaster)
			{
				WorldEventManager.ExecuteEvent(setti3, 0f);
			}
			if (SNet.IsMaster)
			{
				WorldEventManager.SetCondition(15, true);
			}
			int num = 45;
			float valiarvo3 = 100 / num;
			string naytalaskuri3 = "000";
			taustavari = "red";
			rivi1 = "  downloading  ";
			rivi2 = "     data      ";
			rivi3 = "   progress:   ";
			for (float laskuri3 = 0f; laskuri3 < 100f; laskuri3 += valiarvo3)
			{
				int num2 = Mathf.FloorToInt(laskuri3);
				if (num2 < 10)
				{
					naytalaskuri3 = "00" + num2;
				}
				if (num2 > 10 && num2 < 100)
				{
					naytalaskuri3 = "0" + num2;
				}
				if (num2 > 100)
				{
					naytalaskuri3 = "100";
				}
				rivi4 = "     " + naytalaskuri3 + " %     ";
				_d1text = "<mspace=1em><color=orange>#################\r\n<color=orange>#<color=#0055ff>     sigstr <color=green>10<color=#0055ff> <color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>    SITE 1     <color=orange>#\r\n#<color=#0055ff>   research    <color=orange>#\r\n#<color=#0055ff>    bucket     <color=orange>#\r\n#<color=#0055ff>  dl station   <color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff> storage crate <color=orange>#\r\n#<color=#0055ff>   usage: " + cratestatus + "   <color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>" + rivi1 + "<color=orange>#\r\n#<color=#0055ff>" + rivi2 + "<color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>" + rivi3 + "<color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>" + rivi4 + "<color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#################\r\n";
				yield return (object)new WaitForSeconds(1f);
			}
			if (SNet.IsMaster)
			{
				WorldEventManager.ExecuteEvent(setti4, 0f);
			}
			taustavari = "green";
			cratestatus = "33";
			rivi4 = "     100 %     ";
			_d1text = "<mspace=1em><color=orange>#################\r\n<color=orange>#<color=#0055ff>     sigstr <color=green>10<color=#0055ff> <color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>    SITE 1     <color=orange>#\r\n#<color=#0055ff>   research    <color=orange>#\r\n#<color=#0055ff>    bucket     <color=orange>#\r\n#<color=#0055ff>  dl station   <color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff> storage crate <color=orange>#\r\n#<color=#0055ff>   usage: " + cratestatus + "   <color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>" + rivi1 + "<color=orange>#\r\n#<color=#0055ff>" + rivi2 + "<color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>" + rivi3 + "<color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>" + rivi4 + "<color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#################\r\n";
			if (SNet.IsMaster)
			{
				WorldEventManager.SetCondition(2, true);
			}
			if (SNet.IsMaster)
			{
				WorldEventManager.SetCondition(13, false);
			}
			if (SNet.IsMaster)
			{
				WorldEventManager.SetCondition(15, false);
			}
			yield return (object)new WaitForSeconds(3f);
			while (!WorldEventManager.GetCondition(13))
			{
				yield return (object)new WaitForSeconds(0.5f);
			}
			setti3 = new WardenObjectiveEventData
			{
				Type = (eWardenObjectiveEventType)9,
				DimensionIndex = (eDimensionIndex)0,
				Layer = (LG_LayerType)0,
				LocalIndex = (eLocalZoneIndex)5,
				EnemyWaveData = aallot
			};
			if (SNet.IsMaster)
			{
				WorldEventManager.ExecuteEvent(setti3, 0f);
			}
			if (SNet.IsMaster)
			{
				WorldEventManager.SetCondition(15, true);
			}
			num = 70;
			valiarvo3 = 100 / num;
			naytalaskuri3 = "000";
			taustavari = "red";
			cratestatus = "33";
			rivi1 = "  downloading  ";
			rivi2 = "     data      ";
			rivi3 = "   progress:   ";
			for (float laskuri3 = 0f; laskuri3 < 100f; laskuri3 += valiarvo3)
			{
				int num2 = Mathf.FloorToInt(laskuri3);
				if (num2 < 10)
				{
					naytalaskuri3 = "00" + num2;
				}
				if (num2 > 10 && num2 < 100)
				{
					naytalaskuri3 = "0" + num2;
				}
				if (num2 > 100)
				{
					naytalaskuri3 = "100";
				}
				rivi4 = "     " + naytalaskuri3 + " %     ";
				_d2text = "<mspace=1em><color=orange>#################\r\n<color=orange>#<color=#0055ff>     sigstr <color=orange> 8<color=#0055ff> <color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>    SITE 2     <color=orange>#\r\n#<color=#0055ff>   research    <color=orange>#\r\n#<color=#0055ff>    bucket     <color=orange>#\r\n#<color=#0055ff>  dl station   <color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff> storage crate <color=orange>#\r\n#<color=#0055ff>   usage: " + cratestatus + "   <color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>" + rivi1 + "<color=orange>#\r\n#<color=#0055ff>" + rivi2 + "<color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>" + rivi3 + "<color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>" + rivi4 + "<color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#################\r\n";
				yield return (object)new WaitForSeconds(1f);
			}
			if (SNet.IsMaster)
			{
				WorldEventManager.ExecuteEvent(setti4, 0f);
			}
			taustavari = "green";
			cratestatus = "66";
			rivi4 = "     100 %     ";
			_d2text = "<mspace=1em><color=orange>#################\r\n<color=orange>#<color=#0055ff>     sigstr <color=orange> 8<color=#0055ff> <color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>    SITE 2     <color=orange>#\r\n#<color=#0055ff>   research    <color=orange>#\r\n#<color=#0055ff>    bucket     <color=orange>#\r\n#<color=#0055ff>  dl station   <color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff> storage crate <color=orange>#\r\n#<color=#0055ff>   usage: " + cratestatus + "   <color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>" + rivi1 + "<color=orange>#\r\n#<color=#0055ff>" + rivi2 + "<color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>" + rivi3 + "<color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>" + rivi4 + "<color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#################\r\n";
			if (SNet.IsMaster)
			{
				WorldEventManager.SetCondition(5, true);
			}
			if (SNet.IsMaster)
			{
				WorldEventManager.SetCondition(13, false);
			}
			if (SNet.IsMaster)
			{
				WorldEventManager.SetCondition(15, false);
			}
			while (!WorldEventManager.GetCondition(13))
			{
				yield return (object)new WaitForSeconds(0.5f);
			}
			setti3 = new WardenObjectiveEventData
			{
				Type = (eWardenObjectiveEventType)9,
				DimensionIndex = (eDimensionIndex)0,
				Layer = (LG_LayerType)0,
				LocalIndex = (eLocalZoneIndex)8,
				EnemyWaveData = aallot
			};
			if (SNet.IsMaster)
			{
				WorldEventManager.ExecuteEvent(setti3, 0f);
			}
			if (SNet.IsMaster)
			{
				WorldEventManager.SetCondition(15, true);
			}
			num = 100;
			valiarvo3 = 100 / num;
			naytalaskuri3 = "000";
			taustavari = "red";
			cratestatus = "66";
			rivi1 = "  downloading  ";
			rivi2 = "     data      ";
			rivi3 = "   progress:   ";
			for (float laskuri3 = 0f; laskuri3 < 100f; laskuri3 += valiarvo3)
			{
				int num2 = Mathf.FloorToInt(laskuri3);
				if (num2 < 10)
				{
					naytalaskuri3 = "00" + num2;
				}
				if (num2 > 10 && num2 < 100)
				{
					naytalaskuri3 = "0" + num2;
				}
				if (num2 > 100)
				{
					naytalaskuri3 = "100";
				}
				rivi4 = "     " + naytalaskuri3 + " %     ";
				_d3text = "<mspace=1em><color=orange>#################\r\n<color=orange>#<color=#0055ff>     sigstr <color=red> 6<color=#0055ff> <color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>    SITE 2     <color=orange>#\r\n#<color=#0055ff>   research    <color=orange>#\r\n#<color=#0055ff>    bucket     <color=orange>#\r\n#<color=#0055ff>  dl station   <color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff> storage crate <color=orange>#\r\n#<color=#0055ff>   usage: " + cratestatus + "   <color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>" + rivi1 + "<color=orange>#\r\n#<color=#0055ff>" + rivi2 + "<color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>" + rivi3 + "<color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>" + rivi4 + "<color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#################\r\n";
				yield return (object)new WaitForSeconds(1f);
			}
			if (SNet.IsMaster)
			{
				WorldEventManager.ExecuteEvent(setti4, 0f);
			}
			taustavari = "green";
			cratestatus = "99";
			rivi4 = "     100 %     ";
			_d3text = "<mspace=1em><color=orange>#################\r\n<color=orange>#<color=#0055ff>     sigstr <color=red> 6<color=#0055ff> <color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>    SITE 2     <color=orange>#\r\n#<color=#0055ff>   research    <color=orange>#\r\n#<color=#0055ff>    bucket     <color=orange>#\r\n#<color=#0055ff>  dl station   <color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff> storage crate <color=orange>#\r\n#<color=#0055ff>   usage: " + cratestatus + "   <color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>" + rivi1 + "<color=orange>#\r\n#<color=#0055ff>" + rivi2 + "<color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>" + rivi3 + "<color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>" + rivi4 + "<color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#<color=#0055ff>               <color=orange>#\r\n#################\r\n";
			if (SNet.IsMaster)
			{
				WorldEventManager.SetCondition(8, true);
			}
			if (SNet.IsMaster)
			{
				WorldEventManager.SetCondition(13, false);
			}
			if (SNet.IsMaster)
			{
				WorldEventManager.SetCondition(15, false);
			}
			yield return null;
		}

		private static IEnumerator Displays(Vector3 pos, int rot)
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_0008: Unknown result type (might be due to invalid IL or missing references)
			Vector3 taulu1 = new Vector3(-70.69f, -1.4833f, 127.8043f);
			Vector3 taulu2 = new Vector3(-70.69f, -1.4833f, 255.772f);
			Vector3 taulu3 = new Vector3(-70.69f, -1.4833f, 319.8257f);
			GameObject val = new GameObject();
			MeshRenderer val2 = val.AddComponent<MeshRenderer>();
			val.AddComponent<MeshCollider>();
			((Renderer)val2).sharedMaterial = new Material(Shader.Find("Standard"));
			MeshFilter val3 = val.AddComponent<MeshFilter>();
			Mesh val4 = new Mesh();
			Vector3[] array = (Vector3[])(object)new Vector3[4]
			{
				new Vector3(0f, 0f, 0f),
				new Vector3(0.84f, 0f, 0f),
				new Vector3(0f, 1.5f, 0f),
				new Vector3(0.84f, 1.5f, 0f)
			};
			val4.vertices = Il2CppStructArray<Vector3>.op_Implicit(array);
			int[] array2 = new int[6] { 0, 2, 1, 2, 3, 1 };
			val4.triangles = Il2CppStructArray<int>.op_Implicit(array2);
			val4.RecalculateNormals();
			Vector2[] array3 = (Vector2[])(object)new Vector2[4]
			{
				new Vector2(0f, 0f),
				new Vector2(1f, 0f),
				new Vector2(0f, 1f),
				new Vector2(1f, 1f)
			};
			val4.uv = Il2CppStructArray<Vector2>.op_Implicit(array3);
			val3.mesh = val4;
			val.transform.position = new Vector3(0f, 1f, 28f);
			List<Color> list = new List<Color>
			{
				Color.black,
				Color.black,
				Color.black,
				Color.black
			};
			val4.SetColors(Il2CppStructArray<Color>.op_Implicit(list.ToArray()));
			((Renderer)val2).material.color = Color.black;
			GameObject val5 = new GameObject();
			((Renderer)val5.AddComponent<MeshRenderer>()).sharedMaterial = new Material(Shader.Find("Standard"));
			val5.AddComponent<MeshFilter>().mesh = val4;
			val5.transform.position = pos;
			val5.transform.Rotate(0f, 90f, 0f);
			TextMeshPro tm = val5.AddComponent<TextMeshPro>();
			((TMP_Text)tm).overflowMode = (TextOverflowModes)3;
			((TMP_Text)tm).autoSizeTextContainer = false;
			((TMP_Text)tm).verticalAlignment = (VerticalAlignmentOptions)512;
			((TMP_Text)tm).horizontalAlignment = (HorizontalAlignmentOptions)2;
			tm.transform.localScale = Vector3.one;
			((TMP_Text)tm).isTextObjectScaleStatic = true;
			((TMP_Text)tm).fontSize = 0.5f;
			val.transform.Rotate(0f, 90f, 0f);
			val.transform.position = new Vector3(tm.transform.position.x + 0.001f, tm.transform.position.y - 0.75f, tm.transform.position.z + 0.42f);
			while (true)
			{
				if (pos == taulu1)
				{
					((TMP_Text)tm).text = _d1text;
				}
				if (pos == taulu2)
				{
					((TMP_Text)tm).text = _d2text;
				}
				if (pos == taulu3)
				{
					((TMP_Text)tm).text = _d3text;
				}
				((TMP_Text)tm).fontSharedMaterial.SetFloat(ShaderUtilities.ID_GlowPower, 0f);
				((TMP_Text)tm).fontSharedMaterial.SetFloat(ShaderUtilities.ID_Shininess, 0f);
				yield return (object)new WaitForSeconds(0.5f);
			}
		}

		private static IEnumerator B3Crate(CarryItemPickup_Core obj)
		{
			Vector3 ovidl1 = new Vector3(-31.15f, 0f, 128.6f);
			Vector3 ovidl2 = new Vector3(-31.16f, 0f, 256.6f);
			Vector3 ovidl3 = new Vector3(-31.16f, 0f, 320.6f);
			Vector3 taulu1 = new Vector3(-70.69f, -1.9833f, 127.8043f);
			Vector3 taulu2 = new Vector3(-70.69f, -1.9833f, 255.772f);
			Vector3 taulu3 = new Vector3(-70.69f, -1.9833f, 319.8257f);
			Vector3 ovierr = new Vector3(-21f, -2f, 148.6f);
			Vector3 ovidrk = new Vector3(0.5559f, 0.47f, 287.18f);
			Vector3 oviexi = new Vector3(0.7f, 0f, 351.16f);
			Vector3 kohde = new Vector3(0f, 0f, 0f);
			_ = obj.m_movementTrackPos;
			_ = obj.m_itemKey;
			yield return (object)new WaitForSeconds(2f);
			SNet_Player val2 = default(SNet_Player);
			while (!WorldEventManager.GetCondition(9))
			{
				Vector3 val = obj.m_movementTrackPos;
				pPickupItemState currentState = obj.m_sync.GetCurrentState();
				if ((int)currentState.status == 1)
				{
					pPlayer pPlayer = currentState.pPlayer;
					((pPlayer)(ref pPlayer)).TryGetPlayer(ref val2);
					Enumerator<PlayerAgent> enumerator = PlayerManager.PlayerAgentsInLevel.GetEnumerator();
					while (enumerator.MoveNext())
					{
						PlayerAgent current = enumerator.Current;
						if ((Object)(object)current.Owner == (Object)(object)val2)
						{
							val = ((Component)current).gameObject.transform.position;
						}
					}
					_ = ((Object)val2).name;
				}
				if ((int)currentState.status == 0 && WorldEventManager.GetCondition(13) && obj.m_interact.IsActive)
				{
					obj.SetPickupInteractionEnabled(false);
				}
				if (!WorldEventManager.GetCondition(13) && (int)currentState.status != 1 && !obj.m_interact.IsActive)
				{
					obj.SetPickupInteractionEnabled(true);
				}
				if (!WorldEventManager.GetCondition(1))
				{
					kohde = ovidl1;
				}
				if (WorldEventManager.GetCondition(1) && !WorldEventManager.GetCondition(2))
				{
					kohde = taulu1;
				}
				if (WorldEventManager.GetCondition(2) && !WorldEventManager.GetCondition(3))
				{
					kohde = ovierr;
				}
				if (WorldEventManager.GetCondition(3) && !WorldEventManager.GetCondition(4))
				{
					kohde = ovidl2;
				}
				if (WorldEventManager.GetCondition(4) && !WorldEventManager.GetCondition(5))
				{
					kohde = taulu2;
				}
				if (WorldEventManager.GetCondition(5) && !WorldEventManager.GetCondition(6))
				{
					kohde = ovidrk;
				}
				if (WorldEventManager.GetCondition(6) && !WorldEventManager.GetCondition(7))
				{
					kohde = ovidl3;
				}
				if (WorldEventManager.GetCondition(7) && !WorldEventManager.GetCondition(8))
				{
					kohde = taulu3;
				}
				if (WorldEventManager.GetCondition(8) && !WorldEventManager.GetCondition(9))
				{
					kohde = oviexi;
				}
				if (Vector3.Distance(val, kohde) < 2f)
				{
					if (kohde == ovidl1)
					{
						WardenObjectiveEventData val3 = new WardenObjectiveEventData
						{
							Type = (eWardenObjectiveEventType)2,
							DimensionIndex = (eDimensionIndex)0,
							Layer = (LG_LayerType)0,
							LocalIndex = (eLocalZoneIndex)2
						};
						if (SNet.IsMaster)
						{
							WorldEventManager.ExecuteEvent(val3, 0f);
						}
						if (SNet.IsMaster)
						{
							WorldEventManager.SetCondition(1, true);
						}
					}
					if (kohde == taulu1 && (int)currentState.status == 0 && !WorldEventManager.GetCondition(13))
					{
						if (SNet.IsMaster)
						{
							WorldEventManager.SetCondition(13, true);
						}
						obj.SetPickupInteractionEnabled(false);
					}
					if (kohde == ovierr)
					{
						WardenObjectiveEventData val3 = new WardenObjectiveEventData
						{
							Type = (eWardenObjectiveEventType)2,
							DimensionIndex = (eDimensionIndex)0,
							Layer = (LG_LayerType)0,
							LocalIndex = (eLocalZoneIndex)3
						};
						if (SNet.IsMaster)
						{
							WorldEventManager.ExecuteEvent(val3, 0f);
						}
						if (SNet.IsMaster)
						{
							WorldEventManager.SetCondition(3, true);
						}
					}
					if (kohde == ovidl2)
					{
						WardenObjectiveEventData val3 = new WardenObjectiveEventData
						{
							Type = (eWardenObjectiveEventType)2,
							DimensionIndex = (eDimensionIndex)0,
							Layer = (LG_LayerType)0,
							LocalIndex = (eLocalZoneIndex)5
						};
						if (SNet.IsMaster)
						{
							WorldEventManager.ExecuteEvent(val3, 0f);
						}
						if (SNet.IsMaster)
						{
							WorldEventManager.SetCondition(4, true);
						}
					}
					if (kohde == taulu2 && (int)currentState.status == 0 && !WorldEventManager.GetCondition(13))
					{
						if (SNet.IsMaster)
						{
							WorldEventManager.SetCondition(13, true);
						}
						obj.SetPickupInteractionEnabled(false);
					}
					if (kohde == ovidrk)
					{
						WardenObjectiveEventData val3 = new WardenObjectiveEventData
						{
							Type = (eWardenObjectiveEventType)2,
							DimensionIndex = (eDimensionIndex)0,
							Layer = (LG_LayerType)0,
							LocalIndex = (eLocalZoneIndex)6
						};
						if (SNet.IsMaster)
						{
							WorldEventManager.ExecuteEvent(val3, 0f);
						}
						if (SNet.IsMaster)
						{
							WorldEventManager.SetCondition(6, true);
						}
					}
					if (kohde == ovidl3)
					{
						WardenObjectiveEventData val3 = new WardenObjectiveEventData
						{
							Type = (eWardenObjectiveEventType)2,
							DimensionIndex = (eDimensionIndex)0,
							Layer = (LG_LayerType)0,
							LocalIndex = (eLocalZoneIndex)7
						};
						if (SNet.IsMaster)
						{
							WorldEventManager.ExecuteEvent(val3, 0f);
						}
						if (SNet.IsMaster)
						{
							WorldEventManager.SetCondition(7, true);
						}
					}
					if (kohde == taulu3 && (int)currentState.status == 0 && !WorldEventManager.GetCondition(13))
					{
						if (SNet.IsMaster)
						{
							WorldEventManager.SetCondition(13, true);
						}
						obj.SetPickupInteractionEnabled(false);
					}
					if (kohde == oviexi)
					{
						WardenObjectiveEventData val3 = new WardenObjectiveEventData
						{
							Type = (eWardenObjectiveEventType)2,
							DimensionIndex = (eDimensionIndex)0,
							Layer = (LG_LayerType)0,
							LocalIndex = (eLocalZoneIndex)8
						};
						if (SNet.IsMaster)
						{
							WorldEventManager.ExecuteEvent(val3, 0f);
						}
						if (SNet.IsMaster)
						{
							WorldEventManager.SetCondition(9, true);
						}
					}
				}
				yield return (object)new WaitForSeconds(1f);
			}
			Log.LogInfo("crate tracking ends, buh bye");
			yield return null;
		}

		private static IEnumerator B3()
		{
			DamageNumberFactory.CreateFloatingText<FloatingTextBase>((IFloatingTextInfo)(object)new Plugin.FloaterInfo(Vector3.zero, new Vector3(0f, 4f, 30f), 0f, 20f, "<size=150%><color=#0055ff>O E R R D O W N\n<size=100%>B3: Download</color>"));
			LocalizedText wardenIntel = new LocalizedText
			{
				UntranslatedText = "SSD storage crate contains the access token needed for <color=orange>SITE 1</color>",
				Id = 0u
			};
			WardenObjectiveEventData val = new WardenObjectiveEventData
			{
				Type = (eWardenObjectiveEventType)11,
				CustomSubObjectiveHeader = LocalizedText.op_Implicit(55005u),
				WardenIntel = wardenIntel
			};
			if (SNet.IsMaster)
			{
				WorldEventManager.ExecuteEvent(val, 0f);
			}
			while (!WorldEventManager.GetCondition(2))
			{
				yield return (object)new WaitForSeconds(1f);
			}
			wardenIntel = new LocalizedText
			{
				UntranslatedText = "<color=orange>SITE 1</color> data downloaded, antenna integrity 8/10, access token for <color=orange>SITE 2</color> acquired",
				Id = 0u
			};
			val = new WardenObjectiveEventData
			{
				Type = (eWardenObjectiveEventType)11,
				CustomSubObjectiveHeader = LocalizedText.op_Implicit(55001u),
				CustomSubObjective = LocalizedText.op_Implicit(0u),
				WardenIntel = wardenIntel
			};
			if (SNet.IsMaster)
			{
				WorldEventManager.ExecuteEvent(val, 0f);
			}
			while (!WorldEventManager.GetCondition(5))
			{
				yield return (object)new WaitForSeconds(1f);
			}
			wardenIntel = new LocalizedText
			{
				UntranslatedText = "<color=orange>SITE 2</color> data downloaded, antenna integrity 6/10, access token for <color=orange>SITE 3</color> acquired",
				Id = 0u
			};
			val = new WardenObjectiveEventData
			{
				Type = (eWardenObjectiveEventType)11,
				CustomSubObjectiveHeader = LocalizedText.op_Implicit(55002u),
				CustomSubObjective = LocalizedText.op_Implicit(0u),
				WardenIntel = wardenIntel
			};
			if (SNet.IsMaster)
			{
				WorldEventManager.ExecuteEvent(val, 0f);
			}
			while (!WorldEventManager.GetCondition(8))
			{
				yield return (object)new WaitForSeconds(1f);
			}
			wardenIntel = new LocalizedText
			{
				UntranslatedText = "mission completed, extraction allowed",
				Id = 0u
			};
			val = new WardenObjectiveEventData
			{
				Type = (eWardenObjectiveEventType)11,
				CustomSubObjectiveHeader = LocalizedText.op_Implicit(55003u),
				CustomSubObjective = LocalizedText.op_Implicit(55004u),
				WardenIntel = wardenIntel
			};
			if (SNet.IsMaster)
			{
				WorldEventManager.ExecuteEvent(val, 0f);
			}
			val = new WardenObjectiveEventData
			{
				Type = (eWardenObjectiveEventType)12,
				Layer = (LG_LayerType)0
			};
			if (SNet.IsMaster)
			{
				WorldEventManager.ExecuteEvent(val, 0f);
			}
			yield return null;
		}
	}
	public class Level_C1 : MonoBehaviour
	{
		public static void LevelC1()
		{
			CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(C1()), (Action)null);
			CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(C1EnemySpawner()), (Action)null);
			Log.LogInfo("We are in C1 - Mouse");
		}

		private static IEnumerator C1EnemySpawner()
		{
			Vector3 val = default(Vector3);
			((Vector3)(ref val))..ctor(0f, 0f, 40f);
			Vector3 pos1 = new Vector3(-45f, 4f, 64f);
			Vector3 pos2 = new Vector3(191.4f, 4f, 16f);
			Vector3 pos3 = new Vector3(300.5f, 4f, 192f);
			Vector3 pos4 = new Vector3(64.5f, 4f, 207.5f);
			Vector3 pos5 = new Vector3(45f, 4f, 320f);
			AIG_CourseNode pos1node = default(AIG_CourseNode);
			AIG_CourseNode.TryGetCourseNode((eDimensionIndex)0, pos1, 1f, ref pos1node);
			AIG_CourseNode pos2node = default(AIG_CourseNode);
			AIG_CourseNode.TryGetCourseNode((eDimensionIndex)0, pos2, 1f, ref pos2node);
			AIG_CourseNode pos3node = default(AIG_CourseNode);
			AIG_CourseNode.TryGetCourseNode((eDimensionIndex)0, pos3, 1f, ref pos3node);
			AIG_CourseNode pos4node = default(AIG_CourseNode);
			AIG_CourseNode.TryGetCourseNode((eDimensionIndex)0, pos4, 1f, ref pos4node);
			AIG_CourseNode pos5node = default(AIG_CourseNode);
			AIG_CourseNode.TryGetCourseNode((eDimensionIndex)0, pos5, 1f, ref pos5node);
			Vector3 rear = pos1;
			Vector3 front = pos2;
			AIG_CourseNode val2 = default(AIG_CourseNode);
			AIG_CourseNode.GetCourseNode(1, ref val2);
			AIG_CourseNode oikeanode = default(AIG_CourseNode);
			AIG_CourseNode.TryGetCourseNode((eDimensionIndex)0, val, 2f, ref oikeanode);
			Vector3 val3 = default(Vector3);
			((Vector3)(ref val3))..ctor(0f, 0f, 448f);
			AIG_CourseNode val4 = default(AIG_CourseNode);
			AIG_CourseNode.TryGetCourseNode((eDimensionIndex)0, val3, 0f, ref val4);
			AIG_CourseNode rearnode = pos1node;
			AIG_CourseNode frontnode = pos2node;
			int enemycount = 6;
			float delay = 0f;
			int enemylimit = 0;
			uint spawnenemy = 31u;
			while (!WorldEventManager.GetCondition(1))
			{
				yield return (object)new WaitForSeconds(1f);
			}
			PlayerAgent val5 = default(PlayerAgent);
			while (!WorldEventManager.GetCondition(5) && SNet.IsMaster)
			{
				if (WorldEventManager.GetCondition(1))
				{
					enemycount = 6;
					rear = pos1;
					front = pos2;
					rearnode = pos1node;
					frontnode = pos2node;
					delay = 20f;
					enemylimit = 8;
					spawnenemy = 31u;
				}
				if (WorldEventManager.GetCondition(2))
				{
					enemycount = 8;
					rear = pos2;
					front = pos3;
					rearnode = pos2node;
					frontnode = pos3node;
					delay = 35f;
					enemylimit = 12;
					spawnenemy = 31u;
				}
				if (WorldEventManager.GetCondition(3))
				{
					enemycount = 8;
					rear = pos3;
					front = pos4;
					rearnode = pos3node;
					frontnode = pos4node;
					delay = 30f;
					enemylimit = 14;
					spawnenemy = 31u;
				}
				if (WorldEventManager.GetCondition(4))
				{
					enemycount = 6;
					rear = pos4;
					front = pos5;
					rearnode = pos4node;
					frontnode = pos5node;
					delay = 50f;
					enemylimit = 8;
					spawnenemy = 30u;
				}
				int count = AIG_CourseGraph.GetReachableEnemiesInNodes(oikeanode, 100).Count;
				new Quaternion(0f, 0f, 0f, 0f);
				if (count < enemylimit)
				{
					Log.LogInfo("enemywave spawning, alive : " + count + ", delay : " + delay);
					for (int i = 0; i < enemycount + 1; i++)
					{
						if (!WorldEventManager.GetCondition(5))
						{
							EnemyAgent.SpawnEnemy(spawnenemy, rear, rearnode, (AgentMode)1);
						}
						if (!WorldEventManager.GetCondition(5))
						{
							EnemyAgent.SpawnEnemy(spawnenemy, front, frontnode, (AgentMode)1);
						}
						yield return (object)new WaitForSeconds(1.5f);
					}
				}
				else
				{
					Log.LogInfo("not spawning new enemies: " + count + "/" + enemylimit);
					delay = 4f;
				}
				List<EnemyAgent> reachableEnemiesInNodes = AIG_CourseGraph.GetReachableEnemiesInNodes(oikeanode, 100);
				PlayerManager.TryGetLocalPlayerAgent(ref val5);
				Enumerator<EnemyAgent> enumerator = reachableEnemiesInNodes.GetEnumerator();
				while (enumerator.MoveNext())
				{
					EnemyAI component = ((Component)enumerator.Current).GetComponent<EnemyAI>();
					AgentMode val6 = (AgentMode)1;
					component.SetStartMode(val6);
					((AgentAI)component).ModeChange();
					((AgentAI)component).m_mode = val6;
					((AgentAI)component).SetDetectedAgent((Agent)(object)val5, (AgentTargetDetectionType)4);
				}
				yield return (object)new WaitForSeconds(delay);
			}
			yield return null;
		}

		private static IEnumerator C1()
		{
			Vector3 val = default(Vector3);
			((Vector3)(ref val))..ctor(0f, 0f, 448f);
			AIG_CourseNode bossnode = default(AIG_CourseNode);
			AIG_CourseNode.TryGetCourseNode((eDimensionIndex)0, val, 0f, ref bossnode);
			DamageNumberFactory.CreateFloatingText<FloatingTextBase>((IFloatingTextInfo)(object)new Plugin.FloaterInfo(Vector3.zero, new Vector3(0f, 4f, 30f), 0f, 20f, "<size=150%><color=#0055ff>O E R R D O W N\n<size=100%>C1: Mouse</color>"));
			List<eLocalZoneIndex> list = new List<eLocalZoneIndex>
			{
				(eLocalZoneIndex)6,
				(eLocalZoneIndex)2,
				(eLocalZoneIndex)3,
				(eLocalZoneIndex)5,
				(eLocalZoneIndex)7,
				(eLocalZoneIndex)8,
				(eLocalZoneIndex)10,
				(eLocalZoneIndex)11,
				(eLocalZoneIndex)12,
				(eLocalZoneIndex)14,
				(eLocalZoneIndex)15,
				(eLocalZoneIndex)18,
				(eLocalZoneIndex)19,
				(eLocalZoneIndex)20
			};
			WardenObjectiveEventData val2;
			foreach (eLocalZoneIndex item in list)
			{
				val2 = new WardenObjectiveEventData
				{
					Type = (eWardenObjectiveEventType)1,
					DimensionIndex = (eDimensionIndex)0,
					Layer = (LG_LayerType)0,
					LocalIndex = item
				};
				if (SNet.IsMaster)
				{
					WorldEventManager.ExecuteEvent(val2, 0f);
				}
				yield return (object)new WaitForSeconds(0.5f);
			}
			while (!WorldEventManager.GetCondition(5))
			{
				yield return (object)new WaitForSeconds(1f);
			}
			List<EnemyAgent> tankkilist = new List<EnemyAgent>();
			AIG_CourseNode.GetEnemiesInNodes(bossnode, 1, tankkilist);
			string untranslatedText = "both tanks in [ZONE_16] must be killed";
			LocalizedText wardenIntel = new LocalizedText
			{
				UntranslatedText = untranslatedText,
				Id = 0u
			};
			val2 = new WardenObjectiveEventData
			{
				Type = (eWardenObjectiveEventType)11,
				WardenIntel = wardenIntel,
				DimensionIndex = (eDimensionIndex)0,
				Layer = (LG_LayerType)0,
				CustomSubObjective = LocalizedText.op_Implicit(54001u)
			};
			if (SNet.IsMaster)
			{
				WorldEventManager.ExecuteEvent(val2, 0f);
			}
			while (!WorldEventManager.GetCondition(6))
			{
				int num = 0;
				Enumerator<EnemyAgent> enumerator2 = tankkilist.GetEnumerator();
				while (enumerator2.MoveNext())
				{
					if (enumerator2.Current.m_alive)
					{
						num++;
					}
				}
				if (num == 0 && SNet.IsMaster)
				{
					WorldEventManager.SetCondition(6, true);
				}
				yield return (object)new WaitForSeconds(1f);
			}
			untranslatedText = "mission completed, extraction allowed";
			wardenIntel = new LocalizedText
			{
				UntranslatedText = untranslatedText,
				Id = 0u
			};
			val2 = new WardenObjectiveEventData
			{
				Type = (eWardenObjectiveEventType)11,
				WardenIntel = wardenIntel,
				DimensionIndex = (eDimensionIndex)0,
				Layer = (LG_LayerType)0,
				CustomSubObjective = LocalizedText.op_Implicit(54002u)
			};
			if (SNet.IsMaster)
			{
				WorldEventManager.ExecuteEvent(val2, 0f);
			}
			val2 = new WardenObjectiveEventData
			{
				Type = (eWardenObjectiveEventType)2,
				LocalIndex = (eLocalZoneIndex)17,
				DimensionIndex = (eDimensionIndex)0,
				ChainPuzzle = 0u,
				Trigger = (eWardenObjectiveEventTrigger)0,
				Layer = (LG_LayerType)0
			};
			if (SNet.IsMaster)
			{
				WorldEventManager.ExecuteEvent(val2, 0f);
			}
			yield return null;
		}
	}
	public class Level_C2 : MonoBehaviour
	{
		public static void LevelC2()
		{
			CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(C2()), (Action)null);
			CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(DoorCloser()), (Action)null);
			Log.LogInfo("We are in C2 - Lure");
		}

		private static IEnumerator DoorCloser()
		{
			Log.LogInfo("door closer running ON MASTER");
			while (!WorldEventManager.GetCondition(10))
			{
				yield return (object)new WaitForSeconds(0.5f);
			}
			LG_Zone val = Builder.CurrentFloor.MainDimension.Layers[0].m_zones[9];
			LG_SecurityDoor door = ((Il2CppObjectBase)val.m_sourceGate.SpawnedDoor).TryCast<LG_SecurityDoor>();
			LG_Door_Sync sync = ((Il2CppObjectBase)door.m_sync).TryCast<LG_Door_Sync>();
			if ((Object)(object)sync != (Object)null && SNet.IsMaster)
			{
				Log.LogInfo("trying to close door");
				pDoorState syncState = sync.GetCurrentSyncState();
				syncState.status = (eDoorStatus)1;
				syncState.hasBeenOpenedDuringGame = false;
				LG_Gate gate = door.Gate;
				gate.HasBeenOpenedDuringPlay = false;
				gate.IsTraversable = false;
				sync.m_stateReplicator.State = syncState;
				yield return (object)new WaitForSeconds(4f);
				string untranslatedText = "<color=white>entity inside must not be allowed to leave";
				LocalizedText val2 = new LocalizedText
				{
					UntranslatedText = untranslatedText,
					Id = 0u
				};
				door.SetupAsLockedNoKey(val2);
				syncState.status = (eDoorStatus)7;
				sync.m_stateReplicator.State = syncState;
			}
			yield return null;
		}

		private static IEnumerator C2()
		{
			List<EnemyAgent> pablolist = new List<EnemyAgent>();
			EnemyAgent pabs = new EnemyAgent();
			DamageNumberFactory.CreateFloatingText<FloatingTextBase>((IFloatingTextInfo)(object)new Plugin.FloaterInfo(Vector3.zero, new Vector3(0f, 4f, 30f), 0f, 20f, "<size=150%><color=#0055ff>O E R R D O W N\n<size=100%>C2: Lure</color>"));
			yield return (object)new WaitForSeconds(5f);
			Vector3 val = default(Vector3);
			((Vector3)(ref val))..ctor(110f, 0f, 384f);
			AIG_CourseNode val2 = default(AIG_CourseNode);
			AIG_CourseNode.TryGetCourseNode((eDimensionIndex)0, val, 1f, ref val2);
			AIG_CourseNode.GetEnemiesInNodes(val2, 1, pablolist);
			if (pablolist.Count > 0)
			{
				pabs = pablolist[0];
			}
			while (!WorldEventManager.GetCondition(11))
			{
				yield return (object)new WaitForSeconds(0.5f);
			}
			EnemyAI component = ((Component)pabs).GetComponent<EnemyAI>();
			PlayerAgent val3 = default(PlayerAgent);
			PlayerManager.TryGetLocalPlayerAgent(ref val3);
			AgentMode val4 = (AgentMode)1;
			component.SetStartMode(val4);
			((AgentAI)component).ModeChange();
			((AgentAI)component).m_mode = val4;
			((AgentAI)component).SetDetectedAgent((Agent)(object)val3, (AgentTargetDetectionType)4);
			while (((Component)pabs).gameObject.transform.position.x > -32f)
			{
				yield return (object)new WaitForSeconds(0.5f);
			}
			bool _pabstrapped = false;
			while (!_pabstrapped)
			{
				List<PlayerAgent> playerAgentsInLevel = PlayerManager.PlayerAgentsInLevel;
				bool flag = true;
				Enumerator<PlayerAgent> enumerator = playerAgentsInLevel.GetEnumerator();
				while (enumerator.MoveNext())
				{
					if (((Component)enumerator.Current).gameObject.transform.position.x < -32f)
					{
						flag = false;
					}
				}
				if (flag && ((Component)pabs).gameObject.transform.position.x < -32f && SNet.IsMaster)
				{
					_pabstrapped = true;
				}
				yield return (object)new WaitForSeconds(0.5f);
			}
			if (SNet.IsMaster)
			{
				WorldEventManager.SetCondition(10, true);
			}
			Log.LogInfo("index 10 set (if master)");
			string untranslatedText = "Objective complete, extraction allowed";
			LocalizedText wardenIntel = new LocalizedText
			{
				UntranslatedText = untranslatedText,
				Id = 0u
			};
			WardenObjectiveEventData val5 = new WardenObjectiveEventData
			{
				Type = (eWardenObjectiveEventType)12,
				Layer = (LG_LayerType)0,
				WardenIntel = wardenIntel
			};
			if (SNet.IsMaster)
			{
				WorldEventManager.ExecuteEvent(val5, 0f);
			}
			val5 = new WardenObjectiveEventData
			{
				Type = (eWardenObjectiveEventType)2,
				Layer = (LG_LayerType)0,
				LocalIndex = (eLocalZoneIndex)8
			};
			if (SNet.IsMaster)
			{
				WorldEventManager.ExecuteEvent(val5, 0f);
			}
			yield return null;
		}
	}
	public class Level_C3 : MonoBehaviour
	{
		public static void LevelC3()
		{
			CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(C3()), (Action)null);
			Log.LogInfo("We are in C3 - Oerr");
		}

		private static IEnumerator C3()
		{
			DamageNumberFactory.CreateFloatingText<FloatingTextBase>((IFloatingTextInfo)(object)new Plugin.FloaterInfo(Vector3.zero, new Vector3(0f, 4f, 30f), 0f, 20f, "<size=150%><color=#0055ff>O E R R D O W N\n<size=100%>C3: LOL</color>"));
			new Vector3(0f, 200f, 0f);
			Vector3 item = default(Vector3);
			((Vector3)(ref item))..ctor(0f, 200f, 35f);
			Vector3 item2 = default(Vector3);
			((Vector3)(ref item2))..ctor(0f, 200f, 105f);
			Vector3 item3 = default(Vector3);
			((Vector3)(ref item3))..ctor(0f, 200f, 180f);
			AIG_CourseNode val = default(AIG_CourseNode);
			foreach (Vector3 item4 in new List<Vector3> { item, item2, item3 })
			{
				Log.LogInfo($"kasitellaan {item4} ..");
				AIG_CourseNode.TryGetCourseNode((eDimensionIndex)1, item4, 0f, ref val);
				foreach (Transform componentsInChild in val.gameObject.GetComponentsInChildren<Transform>(true))
				{
					if (((Component)componentsInChild).gameObject.transform.position.y > 207.7f && ((Component)componentsInChild).gameObject.active)
					{
						((Component)componentsInChild).gameObject.active = false;
					}
				}
			}
			yield return null;
		}
	}
	internal static class Log
	{
		private static readonly ManualLogSource _logger;

		static Log()
		{
			//IL_0005: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Expected O, but got Unknown
			_logger = new ManualLogSource("Oerrdown");
			Logger.Sources.Add((ILogSource)(object)_logger);
		}

		private static string Format(object msg)
		{
			return msg.ToString();
		}

		public static void LogInfo(object data)
		{
			_logger.LogMessage((object)Format(data));
		}

		public static void Verbose(object data)
		{
		}

		public static void Debug(object data)
		{
			_logger.LogDebug((object)Format(data));
		}

		public static void Error(object data)
		{
			_logger.LogError((object)Format(data));
		}
	}
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInDependency(/*Could not decode attribute arguments.*/)]
	[BepInPlugin("Oerrdown", "Oerrdown", "0.1.7")]
	public class Plugin : BasePlugin
	{
		private class Oerrdown : MonoBehaviour
		{
			internal static class Log
			{
				private static readonly ManualLogSource _logger;

				static Log()
				{
					//IL_0005: Unknown result type (might be due to invalid IL or missing references)
					//IL_000f: Expected O, but got Unknown
					_logger = new ManualLogSource("Oerrdown");
					Logger.Sources.Add((ILogSource)(object)_logger);
				}

				private static string Format(object msg)
				{
					return msg.ToString();
				}

				public static void LogInfo(object data)
				{
					_logger.LogMessage((object)Format(data));
				}

				public static void Verbose(object data)
				{
				}

				public static void Debug(object data)
				{
					_logger.LogDebug((object)Format(data));
				}

				public static void Error(object data)
				{
					_logger.LogError((object)Format(data));
				}
			}

			[CompilerGenerated]
			private sealed class <RemoveSpitters>d__6 : IEnumerator<object>, IDisposable, IEnumerator
			{
				private int <>1__state;

				private object <>2__current;

				private IEnumerator<InfectionSpitter> <>7__wrap1;

				private InfectionSpitter <spitter>5__3;

				object IEnumerator<object>.Current
				{
					[DebuggerHidden]
					get
					{
						return <>2__current;
					}
				}

				object IEnumerator.Current
				{
					[DebuggerHidden]
					get
					{
						return <>2__current;
					}
				}

				[DebuggerHidden]
				public <RemoveSpitters>d__6(int <>1__state)
				{
					this.<>1__state = <>1__state;
				}

				[DebuggerHidden]
				void IDisposable.Dispose()
				{
					int num = <>1__state;
					if (num == -3 || num == 1)
					{
						try
						{
						}
						finally
						{
							<>m__Finally1();
						}
					}
				}

				private bool MoveNext()
				{
					//IL_011a: Unknown result type (might be due to invalid IL or missing references)
					//IL_0124: Expected O, but got Unknown
					//IL_0078: Unknown result type (might be due to invalid IL or missing references)
					//IL_008c: Unknown result type (might be due to invalid IL or missing references)
					//IL_0091: Unknown result type (might be due to invalid IL or missing references)
					//IL_00b6: Unknown result type (might be due to invalid IL or missing references)
					//IL_00c0: Expected O, but got Unknown
					try
					{
						switch (<>1__state)
						{
						default:
							return false;
						case 0:
							<>1__state = -1;
							goto IL_002b;
						case 1:
							<>1__state = -3;
							((Behaviour)<spitter>5__3).enabled = false;
							<spitter>5__3 = null;
							goto IL_00e9;
						case 2:
							<>1__state = -1;
							goto IL_002b;
						case 3:
							{
								<>1__state = -1;
								break;
							}
							IL_002b:
							if (WorldEventManager.GetCondition(14))
							{
								Il2CppArrayBase<InfectionSpitter> val = Object.FindObjectsOfType<InfectionSpitter>();
								<>7__wrap1 = val.GetEnumerator();
								<>1__state = -3;
								goto IL_00e9;
							}
							<>2__current = (object)new WaitForSeconds(1f);
							<>1__state = 2;
							return true;
							IL_00e9:
							if (<>7__wrap1.MoveNext())
							{
								<spitter>5__3 = <>7__wrap1.Current;
								Transform transform = ((Component)<spitter>5__3).gameObject.transform;
								transform.position += new Vector3(0f, 500f, 0f);
								<spitter>5__3.SetTimedRetract(999999f, 1f);
								<>2__current = (object)new WaitForSeconds(0.1f);
								<>1__state = 1;
								return true;
							}
							<>m__Finally1();
							<>7__wrap1 = null;
							Log.LogInfo("Spitters are invisible and silent");
							return false;
						}
					}
					catch
					{
						//try-fault
						((IDisposable)this).Dispose();
						throw;
					}
					((IDisposable)this).Dispose();
					return true;
				}

				bool IEnumerator.MoveNext()
				{
					//ILSpy generated this explicit interface implementation from .override directive in MoveNext
					return this.MoveNext();
				}

				private void <>m__Finally1()
				{
					<>1__state = -1;
					if (<>7__wrap1 != null)
					{
						<>7__wrap1.Dispose();
					}
				}

				[DebuggerHidden]
				void IEnumerator.Reset()
				{
					throw new NotSupportedException();
				}
			}

			public bool _valot;

			public void Initialize()
			{
				//IL_0007: Unknown result type (might be due to invalid IL or missing references)
				//IL_000d: Invalid comparison between Unknown and I4
				//IL_001d: Unknown result type (might be due to invalid IL or missing references)
				//IL_0023: Invalid comparison between Unknown and I4
				//IL_0034: Unknown result type (might be due to invalid IL or missing references)
				//IL_003a: Invalid comparison between Unknown and I4
				//IL_004a: Unknown result type (might be due to invalid IL or missing references)
				//IL_0050: Invalid comparison between Unknown and I4
				//IL_0061: Unknown result type (might be due to invalid IL or missing references)
				//IL_0067: Invalid comparison between Unknown and I4
				//IL_0078: Unknown result type (might be due to invalid IL or missing references)
				//IL_007e: Invalid comparison between Unknown and I4
				//IL_008e: Unknown result type (might be due to invalid IL or missing references)
				//IL_0094: Invalid comparison between Unknown and I4
				//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
				//IL_00ab: Invalid comparison between Unknown and I4
				pActiveExpedition activeExpeditionData = RundownManager.GetActiveExpeditionData();
				if ((int)activeExpeditionData.tier == 1 && activeExpeditionData.expeditionIndex == 0)
				{
					Level_A1.LevelA1();
				}
				if ((int)activeExpeditionData.tier == 1 && activeExpeditionData.expeditionIndex == 1)
				{
					Level_A2.LevelA2();
				}
				if ((int)activeExpeditionData.tier == 2 && activeExpeditionData.expeditionIndex == 0)
				{
					Level_B1.LevelB1();
				}
				if ((int)activeExpeditionData.tier == 2 && activeExpeditionData.expeditionIndex == 1)
				{
					Level_B2.LevelB2();
				}
				if ((int)activeExpeditionData.tier == 2 && activeExpeditionData.expeditionIndex == 2)
				{
					Level_B3.LevelB3();
				}
				if ((int)activeExpeditionData.tier == 3 && activeExpeditionData.expeditionIndex == 0)
				{
					Level_C1.LevelC1();
				}
				if ((int)activeExpeditionData.tier == 3 && activeExpeditionData.expeditionIndex == 1)
				{
					Level_C2.LevelC2();
				}
				if ((int)activeExpeditionData.tier == 3 && activeExpeditionData.expeditionIndex == 2)
				{
					Level_C3.LevelC3();
				}
				foreach (LG_Light item in Object.FindObjectsOfType<LG_Light>())
				{
					CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(SetLightIntensity(item)), (Action)null);
				}
				CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(BaseCoroutine()), (Action)null);
			}

			private void Start()
			{
				Log.LogInfo("Plugin is loaded!");
			}

			private void Update()
			{
			}

			private IEnumerator BaseCoroutine()
			{
				Log.LogInfo("Coroutine starts");
				yield return (object)new WaitForSeconds(0.5f);
				CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(GiveLRF()), (Action)null);
				CoroutineManager.StartCoroutine(CollectionExtensions.WrapToIl2Cpp(RemoveSpitters()), (Action)null);
				yield return null;
			}

			private IEnumerator GiveLRF()
			{
				PlayerBackpackManager.LocalBackpack.SpawnAndEquipItem(30u, (InventorySlot)5, default(pItemData));
				PlayerBackpackManager.ForceSyncLocalInventory((SNet_Player)null);
				yield return (object)new WaitForSeconds(0.4f);
				PlayerManager.GetLocalPlayerAgent().Sync.WantsToWieldSlot((InventorySlot)5, false);
				PlayerManager.GetLocalPlayerAgent().Sync.WantsToWieldSlot((InventorySlot)10, false);
				Log.LogInfo("Long Range Flashlight given to player");
				yield return null;
			}

			private IEnumerator RemoveSpitters()
			{
				try
				{
					int num = default(int);
					IEnumerator<InfectionSpitter> enumerator = default(IEnumerator<InfectionSpitter>);
					switch (num)
					{
					case 0:
					case 2:
						if (WorldEventManager.GetCondition(14))
						{
							Il2CppArrayBase<InfectionSpitter> val = Object.FindObjectsOfType<InfectionSpitter>();
							enumerator = val.GetEnumerator();
							goto IL_00e9;
						}
						new WaitForSeconds(1f);
						/*Error near IL_0154: Unexpected return in MoveNext()*/;
					case 1:
					{
						InfectionSpitter spitter2 = default(InfectionSpitter);
						((Behaviour)spitter2).enabled = false;
						goto IL_00e9;
					}
					case 3:
						break;
					default:
						yield break;
						IL_00e9:
						if (enumerator.MoveNext())
						{
							InfectionSpitter spitter2 = enumerator.Current;
							Transform transform = ((Component)spitter2).gameObject.transform;
							transform.position += new Vector3(0f, 500f, 0f);
							spitter2.SetTimedRetract(999999f, 1f);
							new WaitForSeconds(0.1f);
							/*Error near IL_0154: Unexpected return in MoveNext()*/;
						}
						((<RemoveSpitters>d__6)/*Error near IL_00f9: stateMachine*/).<>m__Finally1();
						Log.LogInfo("Spitters are invisible and silent");
						yield break;
					}
				}
				catch
				{
					//try-fault
					((IDisposable)/*Error near IL_0144: stateMachine*/).Dispose();
					throw;
				}
				((IDisposable)/*Error near IL_014b: stateMachine*/).Dispose();
				/*Error near IL_0154: Unexpected return in MoveNext()*/;
			}

			private IEnumerator SetLightIntensity(LG_Light obj)
			{
				bool hirnudirection = true;
				float hirnuintensity = 0.01f;
				float origintensity = obj.m_intensity;
				Color origcolor = obj.m_color;
				Color hirnuvari = Color.red;
				while (true)
				{
					if (_valot | WorldEventManager.GetCondition(15))
					{
						obj.ChangeColor(hirnuvari);
						while (_valot | WorldEventManager.GetCondition(15))
						{
							if (hirnuintensity > 0.06f && hirnudirection)
							{
								hirnudirection = false;
								hirnuintensity = 0.05f;
							}
							if (hirnuintensity < 0.01f && !hirnudirection)
							{
								hirnudirection = true;
							}
							if (hirnudirection)
							{
								hirnuintensity += 0.002f;
							}
							if (!hirnudirection)
							{
								hirnuintensity -= 0.002f;
							}
							obj.ChangeIntensity(hirnuintensity);
							yield return (object)new WaitForSeconds(0.04f);
						}
					}
					obj.ChangeColor(origcolor);
					obj.ChangeIntensity(origintensity);
					yield return (object)new WaitForSeconds(0.5f);
				}
			}
		}

		public struct FloaterInfo : IFloatingTextInfo
		{
			public Vector3 Velocity { get; private set; }

			public Vector3 SpawnPosition { get; private set; }

			public float Gravity { get; private set; }

			public float LifeTime { get; private set; }

			public string Text { get; private set; }

			public void OnUpdate(TextMeshPro tmp, FloatingTextBase textBase)
			{
			}

			public void UpdateTextMesh(TextMeshPro tmp)
			{
			}

			public FloaterInfo(Vector3 velocity, Vector3 spawnPosition, float gravity, float lifeTime, string text)
			{
				//IL_0008: Unknown result type (might be due to invalid IL or missing references)
				//IL_000f: Unknown result type (might be due to invalid IL or missing references)
				this = default(FloaterInfo);
				Velocity = velocity;
				SpawnPosition = spawnPosition;
				Gravity = gravity;
				LifeTime = lifeTime;
				Text = text;
			}
		}

		public override void Load()
		{
			EventAPI.OnExpeditionStarted += ((BasePlugin)this).AddComponent<Oerrdown>().Initialize;
		}
	}
	[GeneratedCode("VersionInfoGenerator", "2.0.0+git50a4b1a-master")]
	[CompilerGenerated]
	internal static class VersionInfo
	{
		public const string RootNamespace = "Oerrdown";

		public const string Version = "1.0.0";

		public const string VersionPrerelease = null;

		public const string VersionMetadata = null;

		public const string SemVer = "1.0.0";

		public const string GitRevShort = null;

		public const string GitRevLong = null;

		public const string GitBranch = null;

		public const string GitTag = null;

		public const bool GitIsDirty = false;
	}
}