Decompiled source of Brutal Company Minus Extra v0.17.10

BrutalCompanyMinus.dll

Decompiled a day ago
using System;
using System.Collections;
using System.Collections.Generic;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using System.Text.RegularExpressions;
using BepInEx;
using BepInEx.Bootstrap;
using BepInEx.Configuration;
using BepInEx.Logging;
using BrutalCompanyMinus;
using BrutalCompanyMinus.Minus;
using BrutalCompanyMinus.Minus.CustomEvents;
using BrutalCompanyMinus.Minus.Events;
using BrutalCompanyMinus.Minus.Handlers;
using BrutalCompanyMinus.Minus.MonoBehaviours;
using GameNetcodeStuff;
using HarmonyLib;
using LethalNetworkAPI;
using Microsoft.CodeAnalysis;
using TMPro;
using Unity.Collections;
using Unity.Netcode;
using UnityEngine;
using UnityEngine.AI;
using UnityEngine.Animations.Rigging;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Controls;
using UnityEngine.Rendering.HighDefinition;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
using com.github.zehsteam.TakeyGokuBracken;
using com.github.zehsteam.ToilHead;
using com.github.zehsteam.ToilHead.MonoBehaviours;
using com.github.zehsteam.ZombiesPlush;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("BrutalCompanyMinus")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0+0ea99accbf30f7b4d3a3096a1cdd7a0c483e61ee")]
[assembly: AssemblyProduct("BrutalCompanyMinus")]
[assembly: AssemblyTitle("BrutalCompanyMinus")]
[assembly: AssemblyVersion("1.0.0.0")]
internal class <Module>
{
	static <Module>()
	{
		NetworkVariableSerializationTypes.InitializeSerializer_UnmanagedINetworkSerializable<Weather>();
		NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedIEquatable<Weather>();
		NetworkVariableSerializationTypes.InitializeSerializer_UnmanagedINetworkSerializable<OutsideObjectsToSpawn>();
		NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedIEquatable<OutsideObjectsToSpawn>();
		NetworkVariableSerializationTypes.InitializeSerializer_UnmanagedINetworkSerializable<CurrentWeatherEffect>();
		NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedIEquatable<CurrentWeatherEffect>();
		NetworkVariableSerializationTypes.InitializeSerializer_FixedString<FixedString4096Bytes>();
		NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedIEquatable<FixedString4096Bytes>();
	}
}
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 BrutalCompanyMinus
{
	[HarmonyPatch]
	public class Assets
	{
		public enum EnemyName
		{
			Bracken,
			HoardingBug,
			CoilHead,
			Thumper,
			BunkerSpider,
			Jester,
			SnareFlea,
			Hygrodere,
			GhostGirl,
			SporeLizard,
			NutCracker,
			Masked,
			EyelessDog,
			ForestKeeper,
			EarthLeviathan,
			BaboonHawk,
			RoamingLocust,
			Manticoil,
			CircuitBee,
			Lasso,
			Butler,
			OldBird,
			FlowerSnake,
			Shrooms
		}

		public enum ItemName
		{
			LargeAxle,
			V_TypeEngine,
			PlasticFish,
			MetalSheet,
			LaserPointer,
			BigBolt,
			Bottles,
			Ring,
			SteeringWheel,
			CookieMoldPan,
			EggBeater,
			JarOfPickles,
			DustPan,
			AirHorn,
			ClownHorn,
			CashRegister,
			Candy,
			GoldBar,
			YieldSign,
			HomemadeFlashbang,
			Gift,
			Flask,
			ToyCube,
			Remote,
			ToyRobot,
			MagnifyingGlass,
			StopSign,
			TeaKettle,
			Mug,
			RedSoda,
			OldPhone,
			HairDryer,
			Brush,
			Bell,
			WhoopieCushion,
			Comedy,
			Tragedy,
			RubberDucky,
			ChemicalJug,
			FancyLamp,
			GoldenCup,
			Painting,
			Toothpaste,
			PillBottle,
			PerfumeBottle,
			Teeth,
			Magic7Ball,
			EasterEgg
		}

		public enum ObjectName
		{
			LargeRock1,
			LargeRock2,
			LargeRock3,
			LargeRock4,
			TreeLeaflessBrown1,
			GiantPumkin,
			GreyRockGrouping2,
			GreyRockGrouping4,
			Tree,
			TreeLeafless2,
			TreeLeafless3,
			Landmine,
			Turret,
			SpikeRoofTrap,
			BigDoor
		}

		public enum AtmosphereName
		{
			RollingGroundFog,
			Rainy,
			Stormy,
			Foggy,
			Flooded,
			Exclipsed
		}

		internal static AssetBundle bundle;

		internal static AssetBundle customAssetBundle;

		public static Dictionary<EnemyName, string> EnemyNameList = new Dictionary<EnemyName, string>
		{
			{
				EnemyName.SnareFlea,
				"Centipede"
			},
			{
				EnemyName.BunkerSpider,
				"SandSpider"
			},
			{
				EnemyName.HoardingBug,
				"HoarderBug"
			},
			{
				EnemyName.Bracken,
				"Flowerman"
			},
			{
				EnemyName.Thumper,
				"Crawler"
			},
			{
				EnemyName.Hygrodere,
				"Blob"
			},
			{
				EnemyName.GhostGirl,
				"DressGirl"
			},
			{
				EnemyName.SporeLizard,
				"Puffer"
			},
			{
				EnemyName.NutCracker,
				"Nutcracker"
			},
			{
				EnemyName.EyelessDog,
				"MouthDog"
			},
			{
				EnemyName.ForestKeeper,
				"ForestGiant"
			},
			{
				EnemyName.EarthLeviathan,
				"SandWorm"
			},
			{
				EnemyName.CircuitBee,
				"RedLocustBees"
			},
			{
				EnemyName.BaboonHawk,
				"BaboonHawk"
			},
			{
				EnemyName.CoilHead,
				"SpringMan"
			},
			{
				EnemyName.Jester,
				"Jester"
			},
			{
				EnemyName.Lasso,
				"LassoMan"
			},
			{
				EnemyName.Masked,
				"MaskedPlayerEnemy"
			},
			{
				EnemyName.Manticoil,
				"Doublewing"
			},
			{
				EnemyName.RoamingLocust,
				"DocileLocustBees"
			},
			{
				EnemyName.Butler,
				"Butler"
			},
			{
				EnemyName.OldBird,
				"RadMech"
			},
			{
				EnemyName.Shrooms,
				"DeafMakerShroom"
			},
			{
				EnemyName.FlowerSnake,
				"FlowerSnake"
			}
		};

		public static Dictionary<ItemName, string> ItemNameList = new Dictionary<ItemName, string>
		{
			{
				ItemName.LargeAxle,
				"Cog1"
			},
			{
				ItemName.V_TypeEngine,
				"EnginePart1"
			},
			{
				ItemName.PlasticFish,
				"FishTestProp"
			},
			{
				ItemName.MetalSheet,
				"MetalSheet"
			},
			{
				ItemName.LaserPointer,
				"FlashLaserPointer"
			},
			{
				ItemName.BigBolt,
				"BigBolt"
			},
			{
				ItemName.Bottles,
				"BottleBin"
			},
			{
				ItemName.Ring,
				"Ring"
			},
			{
				ItemName.SteeringWheel,
				"SteeringWheel"
			},
			{
				ItemName.CookieMoldPan,
				"MoldPan"
			},
			{
				ItemName.EggBeater,
				"EggBeater"
			},
			{
				ItemName.JarOfPickles,
				"PickleJar"
			},
			{
				ItemName.DustPan,
				"DustPan"
			},
			{
				ItemName.AirHorn,
				"Airhorn"
			},
			{
				ItemName.ClownHorn,
				"ClownHorn"
			},
			{
				ItemName.CashRegister,
				"CashRegister"
			},
			{
				ItemName.Candy,
				"Candy"
			},
			{
				ItemName.GoldBar,
				"GoldBar"
			},
			{
				ItemName.YieldSign,
				"YieldSign"
			},
			{
				ItemName.HomemadeFlashbang,
				"DiyFlashbang"
			},
			{
				ItemName.Gift,
				"GiftBox"
			},
			{
				ItemName.Flask,
				"Flask"
			},
			{
				ItemName.ToyCube,
				"ToyCube"
			},
			{
				ItemName.Remote,
				"Remote"
			},
			{
				ItemName.ToyRobot,
				"RobotToy"
			},
			{
				ItemName.MagnifyingGlass,
				"MagnifyingGlass"
			},
			{
				ItemName.StopSign,
				"StopSign"
			},
			{
				ItemName.TeaKettle,
				"TeaKettle"
			},
			{
				ItemName.Mug,
				"Mug"
			},
			{
				ItemName.RedSoda,
				"SodaCanRed"
			},
			{
				ItemName.OldPhone,
				"Phone"
			},
			{
				ItemName.HairDryer,
				"Hairdryer"
			},
			{
				ItemName.Brush,
				"Brush"
			},
			{
				ItemName.Bell,
				"Bell"
			},
			{
				ItemName.WhoopieCushion,
				"WhoopieCushion"
			},
			{
				ItemName.Comedy,
				"ComedyMask"
			},
			{
				ItemName.Tragedy,
				"TragedyMask"
			},
			{
				ItemName.RubberDucky,
				"RubberDuck"
			},
			{
				ItemName.ChemicalJug,
				"ChemicalJug"
			},
			{
				ItemName.FancyLamp,
				"FancyLamp"
			},
			{
				ItemName.Painting,
				"FancyPainting"
			},
			{
				ItemName.GoldenCup,
				"FancyCup"
			},
			{
				ItemName.Toothpaste,
				"Toothpaste"
			},
			{
				ItemName.PillBottle,
				"PillBottle"
			},
			{
				ItemName.PerfumeBottle,
				"PerfumeBottle"
			},
			{
				ItemName.Teeth,
				"Dentures"
			},
			{
				ItemName.Magic7Ball,
				"7Ball"
			},
			{
				ItemName.EasterEgg,
				"EasterEgg"
			}
		};

		public static Dictionary<ObjectName, string> ObjectNameList = new Dictionary<ObjectName, string>
		{
			{
				ObjectName.LargeRock1,
				"LargeRock1"
			},
			{
				ObjectName.LargeRock2,
				"LargeRock2"
			},
			{
				ObjectName.LargeRock3,
				"LargeRock3"
			},
			{
				ObjectName.LargeRock4,
				"LargeRock4"
			},
			{
				ObjectName.GreyRockGrouping2,
				"GreyRockGrouping2"
			},
			{
				ObjectName.GreyRockGrouping4,
				"GreyRockGrouping4"
			},
			{
				ObjectName.GiantPumkin,
				"GiantPumpkin"
			},
			{
				ObjectName.Tree,
				"tree"
			},
			{
				ObjectName.TreeLeaflessBrown1,
				"treeLeaflessBrown.001 Variant"
			},
			{
				ObjectName.TreeLeafless2,
				"treeLeafless.002_LOD0"
			},
			{
				ObjectName.TreeLeafless3,
				"treeLeafless.003_LOD0"
			},
			{
				ObjectName.Landmine,
				"Landmine"
			},
			{
				ObjectName.Turret,
				"TurretContainer"
			},
			{
				ObjectName.BigDoor,
				"BigDoor"
			},
			{
				ObjectName.SpikeRoofTrap,
				"SpikeRoofTrapHazard"
			}
		};

		public static Dictionary<AtmosphereName, string> AtmosphereNameList = new Dictionary<AtmosphereName, string>
		{
			{
				AtmosphereName.RollingGroundFog,
				"rolling ground fog"
			},
			{
				AtmosphereName.Rainy,
				"rainy"
			},
			{
				AtmosphereName.Stormy,
				"stormy"
			},
			{
				AtmosphereName.Foggy,
				"foggy"
			},
			{
				AtmosphereName.Flooded,
				"flooded"
			},
			{
				AtmosphereName.Exclipsed,
				"eclipsed"
			}
		};

		public static Dictionary<string, EnemyType> EnemyList = new Dictionary<string, EnemyType>();

		public static Dictionary<string, Item> ItemList = new Dictionary<string, Item>();

		public static Dictionary<string, GameObject> ObjectList = new Dictionary<string, GameObject>();

		internal static List<float> factorySizeMultiplierList = new List<float>();

		internal static List<SpawnableMapObject[]> spawnableMapObjects = new List<SpawnableMapObject[]>();

		internal static List<float> averageScrapValueList = new List<float>();

		internal static List<AnimationCurve> insideSpawnChanceCurves = new List<AnimationCurve>();

		internal static List<AnimationCurve> outsideSpawnChanceCurves = new List<AnimationCurve>();

		internal static List<AnimationCurve> daytimeSpawnChanceCurves = new List<AnimationCurve>();

		internal static List<int> insideMaxPowerCounts = new List<int>();

		internal static List<int> outsideMaxPowerCounts = new List<int>();

		internal static List<int> daytimeMaxPowerCounts = new List<int>();

		internal static StormyWeather stormy;

		internal static FloodWeather flooded;

		public static EnemyType antiCoilHead;

		public static EnemyType nutSlayer;

		public static EnemyType kamikazieBug;

		public static Item slayerShotgun;

		public static Item grabbableTurret;

		public static Item grabbableLandmine;

		public static GameObject artilleryShell;

		public static GameObject artillerySirens;

		public static GameObject bunkerEntrance;

		public static GameObject bunkerEscape;

		public static GameObject teleportAudio;

		public static GameObject bloodRain;

		private static bool generatedList = false;

		private static bool generatedOrignalValuesList = false;

		internal static GameObject hangarShip => GameObject.Find("/Environment/HangarShip");

		[HarmonyPostfix]
		[HarmonyPatch(typeof(GameNetworkManager), "Start")]
		private static void GenerateCustom()
		{
			//IL_0010: Unknown result type (might be due to invalid IL or missing references)
			//IL_001a: Expected O, but got Unknown
			//IL_0029: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			//IL_0042: Unknown result type (might be due to invalid IL or missing references)
			//IL_004c: Expected O, but got Unknown
			//IL_005b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0065: Expected O, but got Unknown
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Expected O, but got Unknown
			//IL_008d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Expected O, but got Unknown
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Expected O, but got Unknown
			//IL_00bf: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: Expected O, but got Unknown
			//IL_00d8: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e2: Expected O, but got Unknown
			//IL_00f1: Unknown result type (might be due to invalid IL or missing references)
			//IL_00fb: Expected O, but got Unknown
			//IL_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0114: Expected O, but got Unknown
			//IL_0123: Unknown result type (might be due to invalid IL or missing references)
			//IL_012d: Expected O, but got Unknown
			antiCoilHead = (EnemyType)customAssetBundle.LoadAsset("AntiCoilHead");
			nutSlayer = (EnemyType)customAssetBundle.LoadAsset("NutSlayer");
			kamikazieBug = (EnemyType)customAssetBundle.LoadAsset("KamikazieBug");
			slayerShotgun = (Item)customAssetBundle.LoadAsset("SlayerShotgun");
			grabbableTurret = (Item)customAssetBundle.LoadAsset("GrabbableTurret");
			grabbableLandmine = (Item)customAssetBundle.LoadAsset("GrabbableLandmine");
			artilleryShell = (GameObject)customAssetBundle.LoadAsset("ArtilleryShell");
			artillerySirens = (GameObject)customAssetBundle.LoadAsset("DDay");
			bunkerEntrance = (GameObject)customAssetBundle.LoadAsset("BunkerEntrance");
			bunkerEscape = (GameObject)customAssetBundle.LoadAsset("BunkerEscape");
			teleportAudio = (GameObject)customAssetBundle.LoadAsset("TeleportAudioSource");
			bloodRain = (GameObject)customAssetBundle.LoadAsset("BloodRainParticleContainer");
			RegisterNetworkPrefabs(antiCoilHead.enemyPrefab, nutSlayer.enemyPrefab, kamikazieBug.enemyPrefab, slayerShotgun.spawnPrefab, grabbableTurret.spawnPrefab, grabbableLandmine.spawnPrefab, artillerySirens, bunkerEntrance, bunkerEscape);
		}

		private static void RegisterNetworkPrefabs(params GameObject[] objects)
		{
			foreach (GameObject val in objects)
			{
				NetworkManager.Singleton.AddNetworkPrefab(val);
			}
		}

		[HarmonyPostfix]
		[HarmonyPatch(typeof(TimeOfDay), "Start")]
		private static void OnTimeOfODayStart(ref TimeOfDay __instance)
		{
			//IL_003c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0041: Unknown result type (might be due to invalid IL or missing references)
			//IL_0074: Unknown result type (might be due to invalid IL or missing references)
			//IL_0079: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: 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_0092: Unknown result type (might be due to invalid IL or missing references)
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Expected O, but got Unknown
			GameObject val = Object.Instantiate<GameObject>(bloodRain);
			LocalVolumetricFog component = ((Component)val.transform.Find("Foggy")).GetComponent<LocalVolumetricFog>();
			component.parameters.albedo = new Color(0.25f, 0.35f, 0.55f, 1f);
			component.parameters.meanFreePath = 80f;
			component.parameters.size.y = 255f;
			__instance.effects = __instance.effects.Add(new WeatherEffect
			{
				name = "bloodyrain",
				effectObject = val,
				effectPermanentObject = null,
				lerpPosition = false,
				effectEnabled = false
			});
		}

		[HarmonyPrefix]
		[HarmonyPatch(typeof(StartOfRound), "Start")]
		private static void OnStartOfRoundStart()
		{
			StartOfRound.Instance.allItemsList.itemsList.AddRange(new List<Item> { slayerShotgun, grabbableTurret, grabbableLandmine });
		}

		internal static void Load()
		{
			using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("BrutalCompanyMinus.Asset.bcm_assets"))
			{
				bundle = AssetBundle.LoadFromStream(stream);
			}
			using (Stream stream2 = Assembly.GetExecutingAssembly().GetManifestResourceStream("BrutalCompanyMinus.Asset.bcm_customassets"))
			{
				customAssetBundle = AssetBundle.LoadFromStream(stream2);
			}
			SceneManager.sceneLoaded += OnSceneLoaded;
		}

		private static void OnSceneLoaded(Scene scene, LoadSceneMode mode)
		{
			if ((Object)(object)StartOfRound.Instance == (Object)null)
			{
				return;
			}
			StormyWeather[] array = Resources.FindObjectsOfTypeAll<StormyWeather>().Concat(Object.FindObjectsByType<StormyWeather>((FindObjectsInactive)1, (FindObjectsSortMode)1)).ToArray();
			FloodWeather[] array2 = Resources.FindObjectsOfTypeAll<FloodWeather>().Concat(Object.FindObjectsByType<FloodWeather>((FindObjectsInactive)1, (FindObjectsSortMode)1)).ToArray();
			if (array.Length != 0)
			{
				stormy = array[0];
			}
			if (array2.Length != 0)
			{
				flooded = array2[0];
			}
			if (generatedList)
			{
				return;
			}
			Log.LogInfo("Generating 'EnemyList'");
			EnemyType[] array3 = Resources.FindObjectsOfTypeAll<EnemyType>().Concat(Object.FindObjectsByType<EnemyType>((FindObjectsInactive)1, (FindObjectsSortMode)1)).ToArray();
			Array.Reverse(array3);
			array3 = (from x in array3
				group x by ((Object)x).name into x
				select x.FirstOrDefault()).ToArray();
			for (int i = 0; i < array3.Length; i++)
			{
				if ((Object)(object)array3[i].enemyPrefab == (Object)null)
				{
					Log.LogWarning($"Enemy:{((Object)array3[i]).name}, prefab is null, this may cause issues...");
				}
				EnemyList.Add(((Object)array3[i]).name, array3[i]);
			}
			EnemyList.Remove("RedPillEnemyType");
			foreach (KeyValuePair<string, EnemyType> enemy in EnemyList)
			{
				bool flag = false;
				foreach (KeyValuePair<EnemyName, string> enemyName in EnemyNameList)
				{
					if (enemy.Key == enemyName.Value)
					{
						flag = true;
						break;
					}
				}
				if (!flag)
				{
					Log.LogWarning($"Enemy:'{enemy.Key}', isn't matched with enum, this may cause issues...");
				}
			}
			Log.LogInfo($"Finished generating 'EnemyList', Count:{EnemyList.Count}");
			Log.LogInfo("Generating 'ItemList'");
			Item[] array4 = Resources.FindObjectsOfTypeAll<Item>().Concat(Object.FindObjectsByType<Item>((FindObjectsInactive)1, (FindObjectsSortMode)1)).ToArray();
			Array.Reverse(array4);
			array4 = (from x in array4
				group x by ((Object)x).name into x
				select x.FirstOrDefault()).ToArray();
			for (int j = 0; j < array4.Length; j++)
			{
				if ((Object)(object)array4[j].spawnPrefab == (Object)null)
				{
					Log.LogWarning($"Item:{((Object)array4[j]).name}, prefab is null, this may cause issues...");
				}
				ItemList.Add(((Object)array4[j]).name, array4[j]);
			}
			foreach (KeyValuePair<string, Item> item in ItemList)
			{
				bool flag2 = false;
				foreach (KeyValuePair<ItemName, string> itemName in ItemNameList)
				{
					if (item.Key == itemName.Value)
					{
						flag2 = true;
						break;
					}
				}
				if (!flag2)
				{
					Log.LogWarning($"Item:'{item.Key}', isn't matched with enum, this may cause issues...");
				}
			}
			Log.LogInfo($"Finished generating 'ItemList', Count:{ItemList.Count}");
			Log.LogInfo("Generating 'ObjectList'");
			List<SpawnableMapObject> list = new List<SpawnableMapObject>();
			List<SpawnableOutsideObjectWithRarity> list2 = new List<SpawnableOutsideObjectWithRarity>();
			SelectableLevel[] levels = StartOfRound.Instance.levels;
			foreach (SelectableLevel val in levels)
			{
				if ((Object)(object)val == (Object)null || val.spawnableMapObjects == null)
				{
					continue;
				}
				SpawnableMapObject[] array5 = val.spawnableMapObjects;
				foreach (SpawnableMapObject obj2 in array5)
				{
					if (obj2 != null && !((Object)(object)obj2.prefabToSpawn == (Object)null) && list.FindIndex((SpawnableMapObject o) => ((Object)o.prefabToSpawn).name == ((Object)obj2.prefabToSpawn).name) < 0)
					{
						list.Add(obj2);
					}
				}
				SpawnableOutsideObjectWithRarity[] spawnableOutsideObjects = val.spawnableOutsideObjects;
				foreach (SpawnableOutsideObjectWithRarity obj in spawnableOutsideObjects)
				{
					if (obj != null && !((Object)(object)obj.spawnableObject == (Object)null) && !((Object)(object)obj.spawnableObject.prefabToSpawn == (Object)null) && list2.FindIndex((SpawnableOutsideObjectWithRarity o) => ((Object)o.spawnableObject.prefabToSpawn).name == ((Object)obj.spawnableObject.prefabToSpawn).name) < 0)
					{
						list2.Add(obj);
					}
				}
			}
			foreach (SpawnableMapObject item2 in list)
			{
				ObjectList.Add(((Object)item2.prefabToSpawn).name, item2.prefabToSpawn);
			}
			foreach (SpawnableOutsideObjectWithRarity item3 in list2)
			{
				ObjectList.Add(((Object)item3.spawnableObject.prefabToSpawn).name, item3.spawnableObject.prefabToSpawn);
			}
			foreach (KeyValuePair<string, GameObject> @object in ObjectList)
			{
				bool flag3 = false;
				foreach (KeyValuePair<ObjectName, string> objectName in ObjectNameList)
				{
					if (@object.Key == objectName.Value)
					{
						flag3 = true;
						break;
					}
				}
				if (!flag3)
				{
					Log.LogWarning($"Object:'{@object.Key}', isn't matched with enum, this may cause issues...");
				}
			}
			Log.LogInfo($"Finished generating 'ObjectList', Count:{ObjectList.Count}");
			Log.LogInfo($"Map Count:{factorySizeMultiplierList.Count}");
			Log.LogInfo("Generating configuration");
			Configuration.CreateConfig();
			generatedList = true;
		}

		internal static void generateOriginalValuesLists()
		{
			//IL_00fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0105: Expected O, but got Unknown
			//IL_0105: Unknown result type (might be due to invalid IL or missing references)
			//IL_010c: Expected O, but got Unknown
			//IL_010c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0113: Expected O, but got Unknown
			//IL_012a: Unknown result type (might be due to invalid IL or missing references)
			//IL_012f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0133: Unknown result type (might be due to invalid IL or missing references)
			//IL_0160: Unknown result type (might be due to invalid IL or missing references)
			//IL_0165: Unknown result type (might be due to invalid IL or missing references)
			//IL_0169: Unknown result type (might be due to invalid IL or missing references)
			//IL_0196: Unknown result type (might be due to invalid IL or missing references)
			//IL_019b: Unknown result type (might be due to invalid IL or missing references)
			//IL_019f: Unknown result type (might be due to invalid IL or missing references)
			if (generatedOrignalValuesList)
			{
				return;
			}
			SelectableLevel[] levels = StartOfRound.Instance.levels;
			foreach (SelectableLevel val in levels)
			{
				factorySizeMultiplierList.Add(val.factorySizeMultiplier);
				List<SpawnableItemWithRarity> list = new List<SpawnableItemWithRarity>();
				list.AddRange(val.spawnableScrap);
				float num = 0f;
				float num2 = 0f;
				foreach (SpawnableItemWithRarity item in list)
				{
					num += (float)((item.spawnableItem.minValue + item.spawnableItem.maxValue) * item.rarity);
					num2 += (float)item.rarity;
				}
				if (num2 != 0f)
				{
					averageScrapValueList.Add(num / (num2 * 2f));
				}
				else
				{
					averageScrapValueList.Add(80f);
				}
				AnimationCurve val2 = new AnimationCurve();
				AnimationCurve val3 = new AnimationCurve();
				AnimationCurve val4 = new AnimationCurve();
				Keyframe[] keys = val.enemySpawnChanceThroughoutDay.keys;
				foreach (Keyframe val5 in keys)
				{
					val2.AddKey(val5);
				}
				Keyframe[] keys2 = val.outsideEnemySpawnChanceThroughDay.keys;
				foreach (Keyframe val6 in keys2)
				{
					val3.AddKey(val6);
				}
				Keyframe[] keys3 = val.daytimeEnemySpawnChanceThroughDay.keys;
				foreach (Keyframe val7 in keys3)
				{
					val4.AddKey(val7);
				}
				insideSpawnChanceCurves.Add(val2);
				outsideSpawnChanceCurves.Add(val3);
				daytimeSpawnChanceCurves.Add(val4);
				insideMaxPowerCounts.Add(val.maxEnemyPowerCount);
				outsideMaxPowerCounts.Add(val.maxOutsideEnemyPowerCount);
				daytimeMaxPowerCounts.Add(val.maxDaytimeEnemyPowerCount);
				spawnableMapObjects.Add(val.spawnableMapObjects);
			}
			generatedOrignalValuesList = true;
		}

		public static EnemyType GetEnemy(EnemyName name)
		{
			return GetEnemy(EnemyNameList[name]);
		}

		public static EnemyType GetEnemy(string name)
		{
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Expected O, but got Unknown
			if (EnemyList.TryGetValue(name, out EnemyType value))
			{
				return value;
			}
			Log.LogWarning("GetEnemy(" + name + ") failed, returning an empty enemy type");
			EnemyType val = new EnemyType();
			val.enemyName = name;
			((Object)val).name = name;
			return val;
		}

		public static EnemyType GetEnemyOrDefault(string name)
		{
			if (EnemyList.TryGetValue(name, out EnemyType value))
			{
				return value;
			}
			Log.LogWarning("GetEnemyOrDefault(" + name + ") failed, returning kamikazie bug.");
			return kamikazieBug;
		}

		public static Item GetItem(ItemName name)
		{
			return GetItem(ItemNameList[name]);
		}

		public static Item GetItem(string name)
		{
			//IL_002c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0032: Expected O, but got Unknown
			if (ItemList.TryGetValue(name, out Item value))
			{
				return value;
			}
			Log.LogWarning("GetItem(" + name + ") failed, returning an empty item");
			Item val = new Item();
			val.itemName = name;
			((Object)val).name = name;
			return val;
		}

		public static GameObject GetObject(ObjectName name)
		{
			return GetObject(ObjectNameList[name]);
		}

		public static GameObject GetObject(string name)
		{
			//IL_002d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Expected O, but got Unknown
			if (ObjectList.TryGetValue(name, out GameObject value))
			{
				return value;
			}
			Log.LogWarning("GetObject(" + name + " failed, returning empty gameObject");
			return new GameObject(name);
		}
	}
	[HarmonyPatch]
	public class Net : NetworkBehaviour
	{
		public NetworkList<Weather> currentWeatherMultipliers;

		public NetworkList<OutsideObjectsToSpawn> outsideObjectsToSpawn;

		public NetworkList<CurrentWeatherEffect> currentWeatherEffects;

		public NetworkVariable<FixedString4096Bytes> textUI = new NetworkVariable<FixedString4096Bytes>(default(FixedString4096Bytes), (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0);

		public bool receivedSyncedValues = false;

		public List<GameObject> objectsToSpawn = new List<GameObject>();

		public List<int> objectsToSpawnAmount = new List<int>();

		public List<float> objectsToSpawnRadius = new List<float>();

		public List<Vector3> objectsToSpawnOffsets = new List<Vector3>();

		private float currentIntervalTime = 0f;

		public int _seed = 49;

		public static Net Instance { get; private set; }

		public static GameObject netObject { get; private set; }

		private void Awake()
		{
			currentWeatherMultipliers = new NetworkList<Weather>();
			outsideObjectsToSpawn = new NetworkList<OutsideObjectsToSpawn>();
			currentWeatherEffects = new NetworkList<CurrentWeatherEffect>();
		}

		private void Update()
		{
			//IL_0125: Unknown result type (might be due to invalid IL or missing references)
			//IL_0090: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			if (currentIntervalTime > 0f)
			{
				currentIntervalTime -= Time.deltaTime;
			}
			else
			{
				currentIntervalTime = 0.5f;
				if (currentWeatherEffects.Count > 0)
				{
					foreach (CurrentWeatherEffect currentWeatherEffect in currentWeatherEffects)
					{
						PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController;
						if (!((Object)(object)localPlayerController == (Object)null))
						{
							if (localPlayerController.isPlayerDead)
							{
								UpdateAtmosphere(currentWeatherEffect.name, state: false);
							}
							else if (!localPlayerController.isInsideFactory)
							{
								UpdateAtmosphere(currentWeatherEffect.name, currentWeatherEffect.state);
							}
							else
							{
								UpdateAtmosphere(currentWeatherEffect.name, state: false);
							}
						}
					}
				}
			}
			if (objectsToSpawn.Count > 0)
			{
				Manager.Spawn.DoSpawnOutsideObjects(objectsToSpawnAmount[0], objectsToSpawnRadius[0], objectsToSpawnOffsets[0], objectsToSpawn[0]);
				objectsToSpawn.RemoveAt(0);
				objectsToSpawnAmount.RemoveAt(0);
				objectsToSpawnRadius.RemoveAt(0);
				objectsToSpawnOffsets.RemoveAt(0);
			}
		}

		public override void OnNetworkSpawn()
		{
			Instance = this;
			UI.SpawnObject();
			if (((NetworkBehaviour)this).IsServer)
			{
				InitalizeCurrentWeatherMultipliersServerRpc();
			}
			((NetworkBehaviour)this).OnNetworkSpawn();
		}

		public override void OnNetworkDespawn()
		{
			UI.Instance.UnsubscribeFromKeyboardEvent();
			Object.Destroy((Object)(object)GameObject.Find("EventGUI"));
			((NetworkBehaviour)this).OnNetworkDespawn();
		}

		[ClientRpc]
		public FixedString4096Bytes GetSyncedTextServerRpc()
		{
			//IL_0007: Unknown result type (might be due to invalid IL or missing references)
			//IL_000c: Unknown result type (might be due to invalid IL or missing references)
			//IL_000f: Unknown result type (might be due to invalid IL or missing references)
			return textUI.Value;
		}

		public int GiveSeed()
		{
			return _seed++;
		}

		[ClientRpc]
		public void ClearGameObjectsClientRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
			{
				ClientRpcParams val = default(ClientRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(174694319u, val, (RpcDelivery)0);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 174694319u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			for (int i = 0; i != Manager.objectsToClear.Count; i++)
			{
				if (!((Object)(object)Manager.objectsToClear[i] != (Object)null))
				{
					continue;
				}
				NetworkObject component = Manager.objectsToClear[i].GetComponent<NetworkObject>();
				if ((Object)(object)component != (Object)null)
				{
					try
					{
						component.Despawn(true);
					}
					catch
					{
					}
				}
				else
				{
					try
					{
						Object.Destroy((Object)(object)Manager.objectsToClear[i]);
					}
					catch
					{
					}
				}
			}
			Manager.objectsToClear.Clear();
		}

		[ClientRpc]
		public void SyncValuesClientRpc(float factorySizeMultiplier, float scrapValueMultiplier, float scrapAmountMultiplier, int bonusMaxHp)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00da: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2150416984u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref factorySizeMultiplier, default(ForPrimitives));
					((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref scrapValueMultiplier, default(ForPrimitives));
					((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref scrapAmountMultiplier, default(ForPrimitives));
					BytePacker.WriteValueBitPacked(val2, bonusMaxHp);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2150416984u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					RoundManager.Instance.currentLevel.factorySizeMultiplier = factorySizeMultiplier;
					Manager.bonusEnemyHp = bonusMaxHp;
					receivedSyncedValues = true;
				}
			}
		}

		[ServerRpc]
		public void SyncScrapValueServerRpc(NetworkObjectReference obj, int value)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00fa: Unknown result type (might be due to invalid IL or missing references)
			//IL_0104: Invalid comparison between Unknown and I4
			//IL_012b: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ae: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00d2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_007a: Unknown result type (might be due to invalid IL or missing references)
			//IL_0084: Invalid comparison between Unknown and I4
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
			{
				if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId)
				{
					if ((int)networkManager.LogLevel <= 1)
					{
						Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!");
					}
					return;
				}
				ServerRpcParams val = default(ServerRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(875794818u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref obj, default(ForNetworkSerializable));
				BytePacker.WriteValueBitPacked(val2, value);
				((NetworkBehaviour)this).__endSendServerRpc(ref val2, 875794818u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
			{
				SyncScrapValueClientRpc(obj, value);
			}
		}

		[ClientRpc]
		private void SyncScrapValueClientRpc(NetworkObjectReference obj, int value)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(268987115u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref obj, default(ForNetworkSerializable));
					BytePacker.WriteValueBitPacked(val2, value);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 268987115u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					NetworkObject val3 = default(NetworkObject);
					((NetworkObjectReference)(ref obj)).TryGet(ref val3, (NetworkManager)null);
					((Component)val3).GetComponent<GrabbableObject>().SetScrapValue(value);
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void GenerateAndSyncTerminalCodeServerRpc(NetworkObjectReference netObject, int code)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2205229909u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref netObject, default(ForNetworkSerializable));
					BytePacker.WriteValueBitPacked(val2, code);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2205229909u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					GenerateAndSyncTerminalCodeClientRpc(netObject, code);
				}
			}
		}

		[ClientRpc]
		public void GenerateAndSyncTerminalCodeClientRpc(NetworkObjectReference netObject, int code)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
			{
				ClientRpcParams val = default(ClientRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3849078077u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref netObject, default(ForNetworkSerializable));
				BytePacker.WriteValueBitPacked(val2, code);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3849078077u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			NetworkObject val3 = null;
			if (!((NetworkObjectReference)(ref netObject)).TryGet(ref val3, (NetworkManager)null))
			{
				Log.LogError("Network Object is null in GenerateAndSyncTerminalCodeClientRpc()");
				return;
			}
			TerminalAccessibleObject componentInChildren = ((Component)val3).GetComponentInChildren<TerminalAccessibleObject>();
			if ((Object)(object)componentInChildren == (Object)null)
			{
				Log.LogError("Terminal Accessible Object is null in GenerateAndSyncTerminalCodeClientRpc()");
				return;
			}
			componentInChildren.InitializeValues();
			componentInChildren.SetCodeTo(code);
		}

		[ServerRpc(RequireOwnership = false)]
		public void MoveTimeServerRpc(float amount, float speedMultiplier = 1f)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2208211795u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref amount, default(ForPrimitives));
					((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref speedMultiplier, default(ForPrimitives));
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2208211795u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					MoveTimeClientRpc(amount, speedMultiplier);
				}
			}
		}

		[ClientRpc]
		public void MoveTimeClientRpc(float amount, float speedMultiplier)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00c2: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cc: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3436861046u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref amount, default(ForPrimitives));
					((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref speedMultiplier, default(ForPrimitives));
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3436861046u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					Manager.moveTime = true;
					Manager.moveTimeAmount += amount;
					Manager.timeSpeedMultiplier *= speedMultiplier;
				}
			}
		}

		private void UpdateAtmosphere(FixedString128Bytes name, bool state)
		{
			//IL_0017: Unknown result type (might be due to invalid IL or missing references)
			//IL_001c: Unknown result type (might be due to invalid IL or missing references)
			for (int i = 0; i < TimeOfDay.Instance.effects.Length; i++)
			{
				FixedString128Bytes val = FixedString128Bytes.op_Implicit(TimeOfDay.Instance.effects[i].name);
				if ((ref val) == (ref name))
				{
					TimeOfDay.Instance.effects[i].effectEnabled = state;
				}
			}
		}

		[ClientRpc]
		public void ShowCaseEventsClientRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1744607847u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1744607847u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					UI.Instance.curretShowCaseEventTime = UI.Instance.showCaseEventTime;
					UI.Instance.TogglePanel(state: true);
					UI.Instance.panelScrollBar.value = 1f;
					UI.Instance.showCaseEvents = true;
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		private void InitalizeCurrentWeatherMultipliersServerRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1335262659u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1335262659u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					currentWeatherMultipliers = Weather.InitalizeWeatherMultipliers(currentWeatherMultipliers);
					UpdateCurrentWeatherMultipliersServerRpc();
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void UpdateCurrentWeatherMultipliersServerRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(466041418u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 466041418u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					currentWeatherMultipliers = Weather.RandomizeWeatherMultipliers(currentWeatherMultipliers);
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void SetRecievedServerRpc(bool state)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1853859009u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref state, default(ForPrimitives));
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1853859009u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					SetRecievedClientRpc(state);
				}
			}
		}

		[ClientRpc]
		public void SetRecievedClientRpc(bool state)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(603622741u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref state, default(ForPrimitives));
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 603622741u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					receivedSyncedValues = state;
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void SetRealityShiftActiveServerRpc(bool state)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(4203994123u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref state, default(ForPrimitives));
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 4203994123u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					SetRealityShiftActiveClientRpc(state);
				}
			}
		}

		[ClientRpc]
		public void SetRealityShiftActiveClientRpc(bool state)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2568149201u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref state, default(ForPrimitives));
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2568149201u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					BrutalCompanyMinus.Minus.Events.RealityShift.Active = state;
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void SetAllWeatherActiveServerRpc(bool state)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1050877662u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref state, default(ForPrimitives));
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1050877662u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					SetAllWeatherActiveClientRpc(state);
				}
			}
		}

		[ClientRpc]
		public void SetAllWeatherActiveClientRpc(bool state)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1627891447u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref state, default(ForPrimitives));
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1627891447u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					BrutalCompanyMinus.Minus.Events.AllWeather.Active = state;
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void MessWithLightsServerRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3368901509u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3368901509u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					MessWithLightsClientRpc();
				}
			}
		}

		[ClientRpc]
		public void MessWithLightsClientRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2808903510u, val, (RpcDelivery)0);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2808903510u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					RoundManager.Instance.FlickerLights(true, true);
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void MessWithBreakerServerRpc(bool state)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3941924814u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref state, default(ForPrimitives));
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3941924814u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					MessWithBreakerClientRpc(state);
				}
			}
		}

		[ClientRpc]
		public void MessWithBreakerClientRpc(bool state)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
			{
				ClientRpcParams val = default(ClientRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3457555438u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref state, default(ForPrimitives));
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3457555438u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
			{
				BreakerBox val3 = Object.FindObjectOfType<BreakerBox>();
				if ((Object)(object)val3 != (Object)null)
				{
					val3.SetSwitchesOff();
					RoundManager.Instance.TurnOnAllLights(state);
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void MessWithDoorsServerRpc(float openCloseChance, bool messWithLock = false, float messWithLockChance = 0f)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00dd: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e7: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0098: Unknown result type (might be due to invalid IL or missing references)
			//IL_009e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b3: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b9: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cd: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
			{
				ServerRpcParams val = default(ServerRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2842285472u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref openCloseChance, default(ForPrimitives));
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref messWithLock, default(ForPrimitives));
				((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref messWithLockChance, default(ForPrimitives));
				((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2842285472u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
			{
				if (_seed == 0)
				{
					_seed = StartOfRound.Instance.randomMapSeed;
				}
				_seed++;
				MessWithDoorsClientRpc(openCloseChance, _seed, messWithLock, messWithLockChance);
			}
		}

		[ClientRpc]
		public void MessWithDoorsClientRpc(float openCloseChance, int seed, bool messWithLock, float messWithLockChance)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00ea: Unknown result type (might be due to invalid IL or missing references)
			//IL_00f4: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ab: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00da: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
			{
				ClientRpcParams val = default(ClientRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1683303265u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref openCloseChance, default(ForPrimitives));
				BytePacker.WriteValueBitPacked(val2, seed);
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref messWithLock, default(ForPrimitives));
				((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref messWithLockChance, default(ForPrimitives));
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1683303265u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			DoorLock[] array = Object.FindObjectsOfType<DoorLock>();
			Random random = new Random(seed);
			DoorLock[] array2 = array;
			foreach (DoorLock val3 in array2)
			{
				if ((Object)(object)val3 == (Object)null || random.NextDouble() <= (double)openCloseChance)
				{
					continue;
				}
				if (messWithLock && random.NextDouble() <= (double)messWithLockChance)
				{
					if (random.Next(0, 2) == 0)
					{
						val3.LockDoor(30f);
					}
					else
					{
						val3.UnlockDoor();
					}
					break;
				}
				if (!val3.isLocked)
				{
					((Component)val3).gameObject.GetComponent<AnimatedObjectTrigger>().TriggerAnimationNonPlayer(false, true, false);
					val3.SetDoorAsOpen(Convert.ToBoolean(random.Next(0, 2)));
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void UnlockAndOpenAllDoorsServerRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
			{
				ServerRpcParams val = default(ServerRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1559123307u, val, (RpcDelivery)0);
				((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1559123307u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
			{
				TerminalAccessibleObject[] array = Object.FindObjectsOfType<TerminalAccessibleObject>();
				TerminalAccessibleObject[] array2 = array;
				foreach (TerminalAccessibleObject val3 in array2)
				{
					val3.SetDoorOpenServerRpc(true);
				}
				UnlockAndOpenAllDoorsClientRpc();
			}
		}

		[ClientRpc]
		public void UnlockAndOpenAllDoorsClientRpc()
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_008c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007c: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
			{
				ClientRpcParams val = default(ClientRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(969155834u, val, (RpcDelivery)0);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 969155834u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost))
			{
				return;
			}
			DoorLock[] array = Object.FindObjectsOfType<DoorLock>();
			DoorLock[] array2 = array;
			foreach (DoorLock val3 in array2)
			{
				if (!((Object)(object)val3 == (Object)null))
				{
					if (val3.isLocked)
					{
						val3.UnlockDoor();
					}
					((Component)val3).gameObject.GetComponent<AnimatedObjectTrigger>().TriggerAnimationNonPlayer(false, true, false);
					val3.SetDoorAsOpen(true);
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void SpawnMudPilesOutsideServerRpc(int amount)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_00cb: Unknown result type (might be due to invalid IL or missing references)
			//IL_0110: Unknown result type (might be due to invalid IL or missing references)
			//IL_0115: Unknown result type (might be due to invalid IL or missing references)
			//IL_011c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0123: Unknown result type (might be due to invalid IL or missing references)
			//IL_0126: Unknown result type (might be due to invalid IL or missing references)
			//IL_012b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0130: Unknown result type (might be due to invalid IL or missing references)
			//IL_0135: Unknown result type (might be due to invalid IL or missing references)
			//IL_0138: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
			{
				ServerRpcParams val = default(ServerRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3079998733u, val, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, amount);
				((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3079998733u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
			{
				NavMeshHit val3 = default(NavMeshHit);
				Random random = new Random(_seed++);
				for (int i = 0; i < amount; i++)
				{
					Vector3 position = RoundManager.Instance.outsideAINodes[random.Next(0, RoundManager.Instance.outsideAINodes.Length)].transform.position;
					Vector3 position2 = RoundManager.Instance.GetRandomNavMeshPositionInBoxPredictable(position, 30f, val3, random, -1) + Vector3.up;
					SpawnMudPilesOutsideClientRpc(position2, _seed++);
				}
			}
		}

		[ClientRpc]
		public void SpawnMudPilesOutsideClientRpc(Vector3 position, int seed)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00a6: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b0: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_00df: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e0: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1000423920u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe(ref position);
					BytePacker.WriteValueBitPacked(val2, seed);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1000423920u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					Object.Instantiate<GameObject>(RoundManager.Instance.quicksandPrefab, position, Quaternion.identity, RoundManager.Instance.mapPropsContainer.transform);
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void TeleportEnemyServerRpc(NetworkObjectReference enemy, Vector3 position)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e5: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(234264786u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref enemy, default(ForNetworkSerializable));
					((FastBufferWriter)(ref val2)).WriteValueSafe(ref position);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 234264786u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					TeleportEnemyClientRpc(enemy, position);
				}
			}
		}

		[ClientRpc]
		private void TeleportEnemyClientRpc(NetworkObjectReference enemy, Vector3 position)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00be: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a4: Unknown result type (might be due to invalid IL or missing references)
			//IL_0102: Unknown result type (might be due to invalid IL or missing references)
			//IL_0107: Unknown result type (might be due to invalid IL or missing references)
			//IL_0117: Unknown result type (might be due to invalid IL or missing references)
			//IL_0118: Unknown result type (might be due to invalid IL or missing references)
			//IL_0129: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1650168377u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref enemy, default(ForNetworkSerializable));
					((FastBufferWriter)(ref val2)).WriteValueSafe(ref position);
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1650168377u, val, (RpcDelivery)0);
				}
				NetworkObject val3 = default(NetworkObject);
				if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost) && ((NetworkObjectReference)(ref enemy)).TryGet(ref val3, (NetworkManager)null))
				{
					Object.Instantiate<GameObject>(Assets.teleportAudio, ((Component)val3).transform.position, Quaternion.identity);
					Object.Instantiate<GameObject>(Assets.teleportAudio, position, Quaternion.identity);
					((Component)val3).transform.position = position;
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void SpawnAllWeatherServerRpc(int seed)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
				{
					ServerRpcParams val = default(ServerRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3701680339u, val, (RpcDelivery)0);
					BytePacker.WriteValueBitPacked(val2, seed);
					((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3701680339u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
				{
					SpawnAllWeatherClientRpc(seed);
				}
			}
		}

		[ClientRpc]
		public void SpawnAllWeatherClientRpc(int seed)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_0099: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a3: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0071: Unknown result type (might be due to invalid IL or missing references)
			//IL_0089: Unknown result type (might be due to invalid IL or missing references)
			//IL_0110: Unknown result type (might be due to invalid IL or missing references)
			//IL_011f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0133: Unknown result type (might be due to invalid IL or missing references)
			//IL_0138: Unknown result type (might be due to invalid IL or missing references)
			//IL_013a: Unknown result type (might be due to invalid IL or missing references)
			//IL_013c: Unknown result type (might be due to invalid IL or missing references)
			//IL_013e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0141: Unknown result type (might be due to invalid IL or missing references)
			//IL_015b: Expected I4, but got Unknown
			//IL_01c4: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c9: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
			{
				ClientRpcParams val = default(ClientRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(910007267u, val, (RpcDelivery)0);
				BytePacker.WriteValueBitPacked(val2, seed);
				((NetworkBehaviour)this).__endSendClientRpc(ref val2, 910007267u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost) || RoundManager.Instance.currentLevel.randomWeathers == null)
			{
				return;
			}
			Random random = new Random();
			BrutalCompanyMinus.Minus.Handlers.AllWeather.raining = false;
			RandomWeatherWithVariables[] randomWeathers = RoundManager.Instance.currentLevel.randomWeathers;
			foreach (RandomWeatherWithVariables val3 in randomWeathers)
			{
				if (val3.weatherType == RoundManager.Instance.currentLevel.currentWeather)
				{
					continue;
				}
				LevelWeatherType weatherType = val3.weatherType;
				LevelWeatherType val4 = weatherType;
				switch (val4 - 1)
				{
				case 0:
					BrutalCompanyMinus.Minus.Handlers.AllWeather.raining = true;
					break;
				case 2:
					if (!((Object)(object)TimeOfDay.Instance.foggyWeather == (Object)null))
					{
						LocalVolumetricFog val7 = Object.Instantiate<LocalVolumetricFog>(TimeOfDay.Instance.foggyWeather);
						Manager.objectsToClear.Add(((Component)val7).gameObject);
						val7.parameters.albedo = new Color(0.25f, 0.35f, 0.55f, 1f);
						val7.parameters.meanFreePath = random.Next((int)MathF.Max(4f, val3.weatherVariable), val3.weatherVariable2) * 5;
						val7.parameters.size.y = 255f;
						((Component)val7).gameObject.SetActive(true);
					}
					break;
				case 3:
				{
					FloodWeather val6 = Object.Instantiate<FloodWeather>(Assets.flooded);
					Manager.objectsToClear.Add(((Component)val6).gameObject);
					BrutalCompanyMinus.Minus.Handlers.AllWeather.floodVariable1 = val3.weatherVariable;
					BrutalCompanyMinus.Minus.Handlers.AllWeather.floodVariable2 = val3.weatherVariable2;
					BrutalCompanyMinus.Minus.Handlers.AllWeather.spawnedFloodedWeather = val6;
					((Component)val6).gameObject.SetActive(true);
					break;
				}
				case 1:
				{
					StormyWeather val5 = Object.Instantiate<StormyWeather>(Assets.stormy);
					Manager.objectsToClear.Add(((Component)val5).gameObject);
					BrutalCompanyMinus.Minus.Handlers.AllWeather.lightningVariable1 = val3.weatherVariable;
					BrutalCompanyMinus.Minus.Handlers.AllWeather.LightningVariable2 = val3.weatherVariable2;
					((Component)val5).gameObject.SetActive(true);
					break;
				}
				case 4:
					Manager.minEnemiesToSpawnInside += val3.weatherVariable;
					Manager.minEnemiestoSpawnOutside += val3.weatherVariable2;
					break;
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void ShiftServerRpc(NetworkObjectReference networkObject)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_014e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			//IL_018b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0190: Unknown result type (might be due to invalid IL or missing references)
			//IL_0195: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c0: Unknown result type (might be due to invalid IL or missing references)
			//IL_01dd: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
			{
				ServerRpcParams val = default(ServerRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(716805725u, val, (RpcDelivery)0);
				((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref networkObject, default(ForNetworkSerializable));
				((NetworkBehaviour)this).__endSendServerRpc(ref val2, 716805725u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost) || BrutalCompanyMinus.Minus.Handlers.RealityShift.shiftList.Count == 0 || (Object)(object)BrutalCompanyMinus.Minus.Handlers.RealityShift.shiftList[0] == (Object)null)
			{
				return;
			}
			NetworkObject val3 = null;
			((NetworkObjectReference)(ref networkObject)).TryGet(ref val3, (NetworkManager)null);
			if ((Object)(object)val3 == (Object)null)
			{
				Log.LogError("NetworkObject in ShiftServerRpc() is null.");
				return;
			}
			GrabbableObject component = ((Component)val3).GetComponent<GrabbableObject>();
			GameObject val4 = Object.Instantiate<GameObject>(BrutalCompanyMinus.Minus.Handlers.RealityShift.shiftList[0], ((Component)component).transform.position, Quaternion.identity);
			GrabbableObject component2 = val4.GetComponent<GrabbableObject>();
			if ((Object)(object)component2 == (Object)null)
			{
				Log.LogError("GrabbableObject is null in ShiftServerRpc()");
				return;
			}
			component2.targetFloorPosition = component2.GetItemFloorPosition(((Component)component).transform.position);
			component2.SetScrapValue(BrutalCompanyMinus.Minus.Handlers.RealityShift.shiftListValues[0]);
			((NetworkBehaviour)component2).NetworkObject.Spawn(false);
			SyncScrapValueClientRpc(NetworkObjectReference.op_Implicit(((NetworkBehaviour)component2).NetworkObject), BrutalCompanyMinus.Minus.Handlers.RealityShift.shiftListValues[0]);
			AddObjectToGrabToListClientRpc(NetworkObjectReference.op_Implicit(((NetworkBehaviour)component2).NetworkObject));
			NetworkObject component3 = ((Component)component).GetComponent<NetworkObject>();
			if ((Object)(object)component3 != (Object)null)
			{
				component3.Despawn(true);
			}
			else
			{
				Log.LogError("NetworkObject is null in ShiftServerRpc(), destroying on client instead.");
				Object.Destroy((Object)(object)component);
			}
			if ((Object)(object)val4 != (Object)null)
			{
				BrutalCompanyMinus.Minus.Handlers.RealityShift.shiftListValues.RemoveAt(0);
				BrutalCompanyMinus.Minus.Handlers.RealityShift.shiftList.RemoveAt(0);
			}
		}

		[ClientRpc]
		public void AddObjectToGrabToListClientRpc(NetworkObjectReference obj)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00a7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b1: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_007d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0083: Unknown result type (might be due to invalid IL or missing references)
			//IL_0097: Unknown result type (might be due to invalid IL or missing references)
			//IL_00db: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager != null && networkManager.IsListening)
			{
				if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost))
				{
					ClientRpcParams val = default(ClientRpcParams);
					FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(4160371367u, val, (RpcDelivery)0);
					((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref obj, default(ForNetworkSerializable));
					((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4160371367u, val, (RpcDelivery)0);
				}
				if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost))
				{
					BrutalCompanyMinus.Minus.Handlers.RealityShift.shiftedObjects.Add(obj);
				}
			}
		}

		[ServerRpc(RequireOwnership = false)]
		public void GenerateShiftableObjectsListServerRpc(NetworkObjectReference[] spawnedScrap)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
			//IL_00c7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ac: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b2: Unknown result type (might be due to invalid IL or missing references)
			NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager;
			if (networkManager == null || !networkManager.IsListening)
			{
				return;
			}
			if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost))
			{
				ServerRpcParams val = default(ServerRpcParams);
				FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3192420881u, val, (RpcDelivery)0);
				bool flag = spawnedScrap != null;
				((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref flag, default(ForPrimitives));
				if (flag)
				{
					((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(spawnedScrap, default(ForNetworkSerializable));
				}
				((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3192420881u, val, (RpcDelivery)0);
			}
			if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost))
			{
				GenerateShiftableObjectsListClientRpc(spawnedScrap);
			}
		}

		[ClientRpc]
		public void GenerateShiftableObjectsListClientRpc(NetworkObjectReference[] spawnedScrap)
		{
			//IL_0024: Unknown result type (might be due to invalid IL or missing references)
			//IL_002e: Invalid comparison between Unknown and I4
			//IL_00d7: Unknown result type (might be due to invalid IL or missing references)
			//IL_00e1: Invalid comparison between Unknown and I4
			//IL_005f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0068: Unknown result type (might be due to invalid IL or missing references)
			//IL_006d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0088: Unknown result type (might be due to invalid IL or missing references)
			//IL_008e: Unknown result type (might be due to invalid IL or missing references)
	

BCMECodeSecurityCheck.dll

Decompiled a day ago
using System;
using System.Diagnostics;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.Versioning;
using BCMECodeSecurityCheck.Methods;
using BCMECodeSecurityCheck.Modules;
using BepInEx;
using BepInEx.Logging;
using HarmonyLib;
using LethalNetworkAPI;
using Microsoft.CodeAnalysis;
using TMPro;
using TerminalApi;
using TerminalApi.Classes;
using UnityEngine;

[assembly: CompilationRelaxations(8)]
[assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)]
[assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)]
[assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")]
[assembly: AssemblyCompany("BCMECodeSecurityCheck")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
[assembly: AssemblyInformationalVersion("1.0.0")]
[assembly: AssemblyProduct("BCMECodeSecurityCheck")]
[assembly: AssemblyTitle("BCMECodeSecurityCheck")]
[assembly: AssemblyVersion("1.0.0.0")]
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 BCMECodeSecurityCheck
{
	internal class Log
	{
		internal static ManualLogSource logSource;

		internal static void Initalize(ManualLogSource LogSource)
		{
			logSource = LogSource;
		}

		internal static void LogDebug(object data)
		{
			logSource.LogDebug(data);
		}

		internal static void LogError(object data)
		{
			logSource.LogError(data);
		}

		internal static void LogFatal(object data)
		{
			logSource.LogFatal(data);
		}

		internal static void LogInfo(object data)
		{
			logSource.LogInfo(data);
		}

		internal static void LogMessage(object data)
		{
			logSource.LogMessage(data);
		}

		internal static void LogWarning(object data)
		{
			logSource.LogWarning(data);
		}
	}
	[BepInPlugin("BCMECodeSecurityCheck", "BCMECodeSecurityCheck-UnloadedHangar", "0.1.1")]
	public class BCMECodeSecurityCheck : BaseUnityPlugin
	{
		public static class PluginInfo
		{
			public const string Guid = "BCMECodeSecurityCheck";

			public const string Name = "BCMECodeSecurityCheck-UnloadedHangar";

			public const string Ver = "0.1.1";
		}

		private float lockdownTime;

		private Harmony _harmony;

		private void Awake()
		{
			//IL_002e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0033: Unknown result type (might be due to invalid IL or missing references)
			//IL_0046: Unknown result type (might be due to invalid IL or missing references)
			//IL_0059: Expected O, but got Unknown
			//IL_006b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0070: Unknown result type (might be due to invalid IL or missing references)
			//IL_0096: Unknown result type (might be due to invalid IL or missing references)
			//IL_00a9: Expected O, but got Unknown
			//IL_00af: Unknown result type (might be due to invalid IL or missing references)
			//IL_00b4: Unknown result type (might be due to invalid IL or missing references)
			//IL_00da: Unknown result type (might be due to invalid IL or missing references)
			//IL_00ed: Expected O, but got Unknown
			//IL_010a: Unknown result type (might be due to invalid IL or missing references)
			//IL_010f: Unknown result type (might be due to invalid IL or missing references)
			//IL_0122: Unknown result type (might be due to invalid IL or missing references)
			//IL_0135: Expected O, but got Unknown
			//IL_013b: Unknown result type (might be due to invalid IL or missing references)
			//IL_0140: Unknown result type (might be due to invalid IL or missing references)
			//IL_0153: Unknown result type (might be due to invalid IL or missing references)
			//IL_0166: Expected O, but got Unknown
			//IL_016c: Unknown result type (might be due to invalid IL or missing references)
			//IL_0171: Unknown result type (might be due to invalid IL or missing references)
			//IL_0184: Unknown result type (might be due to invalid IL or missing references)
			//IL_0197: Expected O, but got Unknown
			//IL_019d: Unknown result type (might be due to invalid IL or missing references)
			//IL_01a2: Unknown result type (might be due to invalid IL or missing references)
			//IL_01b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_01c8: Expected O, but got Unknown
			//IL_01ce: Unknown result type (might be due to invalid IL or missing references)
			//IL_01d3: Unknown result type (might be due to invalid IL or missing references)
			//IL_01e6: Unknown result type (might be due to invalid IL or missing references)
			//IL_01f9: Expected O, but got Unknown
			//IL_01ff: Unknown result type (might be due to invalid IL or missing references)
			//IL_0204: Unknown result type (might be due to invalid IL or missing references)
			//IL_0217: Unknown result type (might be due to invalid IL or missing references)
			//IL_022a: Expected O, but got Unknown
			//IL_0230: Unknown result type (might be due to invalid IL or missing references)
			//IL_0235: Unknown result type (might be due to invalid IL or missing references)
			//IL_0248: Unknown result type (might be due to invalid IL or missing references)
			//IL_025b: Expected O, but got Unknown
			//IL_0261: Unknown result type (might be due to invalid IL or missing references)
			//IL_0266: Unknown result type (might be due to invalid IL or missing references)
			//IL_028c: Unknown result type (might be due to invalid IL or missing references)
			//IL_029f: Expected O, but got Unknown
			//IL_02a5: Unknown result type (might be due to invalid IL or missing references)
			//IL_02aa: Unknown result type (might be due to invalid IL or missing references)
			//IL_02d0: Unknown result type (might be due to invalid IL or missing references)
			//IL_02e3: Expected O, but got Unknown
			//IL_02e9: Unknown result type (might be due to invalid IL or missing references)
			//IL_02ee: Unknown result type (might be due to invalid IL or missing references)
			//IL_0314: Unknown result type (might be due to invalid IL or missing references)
			//IL_0327: Expected O, but got Unknown
			//IL_032d: Unknown result type (might be due to invalid IL or missing references)
			//IL_0332: Unknown result type (might be due to invalid IL or missing references)
			//IL_0358: Unknown result type (might be due to invalid IL or missing references)
			//IL_036b: Expected O, but got Unknown
			//IL_0371: Unknown result type (might be due to invalid IL or missing references)
			//IL_0376: Unknown result type (might be due to invalid IL or missing references)
			//IL_039c: Unknown result type (might be due to invalid IL or missing references)
			//IL_03af: Expected O, but got Unknown
			//IL_03b5: Unknown result type (might be due to invalid IL or missing references)
			//IL_03ba: Unknown result type (might be due to invalid IL or missing references)
			//IL_03e0: Unknown result type (might be due to invalid IL or missing references)
			//IL_03f3: Expected O, but got Unknown
			//IL_03f9: Unknown result type (might be due to invalid IL or missing references)
			//IL_03fe: Unknown result type (might be due to invalid IL or missing references)
			//IL_0424: Unknown result type (might be due to invalid IL or missing references)
			//IL_0437: Expected O, but got Unknown
			//IL_043e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0448: Expected O, but got Unknown
			((BaseUnityPlugin)this).Logger.LogInfo((object)"BCMECodeSecurityCheck loaded");
			((BaseUnityPlugin)this).Logger.LogWarning((object)"BCMECodeSecurityCheck security check complete");
			TerminalApi.AddCommand("push", new CommandInfo
			{
				DisplayTextSupplier = CommandFunction,
				Category = "Hidden"
			}, (string)null, true);
			Log.Initalize(((BaseUnityPlugin)this).Logger);
			TerminalApi.AddCommand("Radiation", new CommandInfo
			{
				DisplayTextSupplier = delegate
				{
					StartOfRoundPatches.MalfunctionPowerNetworkClientMessage.SendServer(1);
					return "Radiation overlay called\n\n";
				},
				Category = "Hidden"
			}, (string)null, true);
			TerminalApi.AddCommand("QuotaR", new CommandInfo
			{
				DisplayTextSupplier = delegate
				{
					StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendServer(1);
					return "Random quota overlay called\n\n";
				},
				Category = "Hidden"
			}, (string)null, true);
			int daysAmount = 0;
			TerminalApi.AddCommand("Quota" + daysAmount, new CommandInfo
			{
				DisplayTextSupplier = delegate
				{
					StartOfRoundPatches.QuotaDaysOverlayNegativeNetworkClientMessage.SendServer(daysAmount);
					return "Random negative quota overlay called\n\n";
				},
				Category = "Hidden"
			}, (string)null, true);
			TerminalApi.AddCommand("Add", new CommandInfo
			{
				DisplayTextSupplier = delegate
				{
					daysAmount++;
					return "Variable increased\n\n" + daysAmount;
				},
				Category = "Hidden"
			}, (string)null, true);
			TerminalApi.AddCommand("Minus", new CommandInfo
			{
				DisplayTextSupplier = delegate
				{
					daysAmount--;
					return "Variable decreased\n\n" + daysAmount;
				},
				Category = "Hidden"
			}, (string)null, true);
			TerminalApi.AddCommand("Add10", new CommandInfo
			{
				DisplayTextSupplier = delegate
				{
					daysAmount += 10;
					return "Variable increased\n\n" + daysAmount;
				},
				Category = "Hidden"
			}, (string)null, true);
			TerminalApi.AddCommand("Minus10", new CommandInfo
			{
				DisplayTextSupplier = delegate
				{
					daysAmount -= 10;
					return "Variable decreased\n\n" + daysAmount;
				},
				Category = "Hidden"
			}, (string)null, true);
			TerminalApi.AddCommand("Variable", new CommandInfo
			{
				DisplayTextSupplier = () => "Displaying variable\n\n" + daysAmount,
				Category = "Hidden"
			}, (string)null, true);
			TerminalApi.AddCommand("Reset", new CommandInfo
			{
				DisplayTextSupplier = delegate
				{
					daysAmount = 0;
					return "Variable reset. \nStatus: " + daysAmount;
				},
				Category = "Hidden"
			}, (string)null, true);
			TerminalApi.AddCommand("TipR", new CommandInfo
			{
				DisplayTextSupplier = delegate
				{
					StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(1);
					return "Random name tip overlay called\n\n";
				},
				Category = "Hidden"
			}, (string)null, true);
			TerminalApi.AddCommand("TipRi", new CommandInfo
			{
				DisplayTextSupplier = delegate
				{
					StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(2);
					return "Random name tip overlay called\n\n";
				},
				Category = "Hidden"
			}, (string)null, true);
			TerminalApi.AddCommand("War", new CommandInfo
			{
				DisplayTextSupplier = delegate
				{
					StartOfRoundPatches.LightsNetworkClientMessage.SendServer(1);
					return "CC warning called\n\n";
				},
				Category = "Hidden"
			}, (string)null, true);
			TerminalApi.AddCommand("ToilNot", new CommandInfo
			{
				DisplayTextSupplier = delegate
				{
					StartOfRoundPatches.LightsNetworkClientMessage.SendServer(2);
					return "Toil Master called\n\n";
				},
				Category = "Hidden"
			}, (string)null, true);
			TerminalApi.AddCommand("Toil2", new CommandInfo
			{
				DisplayTextSupplier = delegate
				{
					StartOfRoundPatches.LightsNetworkClientMessage.SendServer(3);
					return "Toil Master called\n\n";
				},
				Category = "Hidden"
			}, (string)null, true);
			TerminalApi.AddCommand("Watcher", new CommandInfo
			{
				DisplayTextSupplier = delegate
				{
					StartOfRoundPatches.LightsNetworkClientMessage.SendServer(4);
					return "Watcher called\n\n";
				},
				Category = "Hidden"
			}, (string)null, true);
			TerminalApi.AddCommand("Watcher2", new CommandInfo
			{
				DisplayTextSupplier = delegate
				{
					StartOfRoundPatches.LightsNetworkClientMessage.SendServer(5);
					return "Watcher called\n\n";
				},
				Category = "Hidden"
			}, (string)null, true);
			_harmony = new Harmony("BCMECodeSecurityCheck");
			_harmony.PatchAll(typeof(Commands));
			_harmony.PatchAll();
		}

		public string CommandFunction()
		{
			RemoteMethods.CallRadiationSign();
			Log.LogWarning("Code?");
			Log.LogWarning("Code put here will run when terminal command is sent.");
			return "Wait, you cannot push\n\n";
		}
	}
}
namespace BCMECodeSecurityCheck.Methods
{
	internal class RemoteMethods
	{
		public static void CallRadiationSign()
		{
			HUDManager.Instance.RadiationWarningHUD();
		}

		public static void CallAddChatText(string message, int playerid)
		{
			HUDManager.Instance.AddTextToChatOnServer(message, playerid);
		}

		public static void CallQuotaDaysOverlayRandom(int min, int max)
		{
			HUDManager.Instance.DisplayDaysLeft(Random.Range(min, max));
		}

		public static void CallQuotaDaysOverlay(int daysLeft)
		{
			HUDManager.Instance.DisplayDaysLeft(daysLeft);
		}

		public static void CallNotificationOverlay(string header, string message)
		{
			((TMP_Text)HUDManager.Instance.globalNotificationText).text = header + message;
			HUDManager.Instance.globalNotificationAnimator.SetTrigger("TriggerNotif");
			HUDManager.Instance.UIAudio.PlayOneShot(HUDManager.Instance.radiationWarningAudio, 1f);
		}

		public static void CallTipOverlay(string header, string message, bool isWarning, bool useSave)
		{
			HUDManager.Instance.DisplayTip(header, message, isWarning, useSave, "LC_Tip1");
		}
	}
}
namespace BCMECodeSecurityCheck.Modules
{
	public class ApiMethods
	{
		public static void CallAddChatText(string message, int playerid)
		{
		}

		public static void CallRadiationSign()
		{
		}

		public static void CallQuotaDaysOverlayRandom(int min, int max)
		{
		}

		public static void CallQuotaDaysOverlay(int daysLeft)
		{
		}

		public static void CallNotificationOverlay(string header, string message)
		{
			((TMP_Text)HUDManager.Instance.globalNotificationText).text = header + message;
			HUDManager.Instance.globalNotificationAnimator.SetTrigger("TriggerNotif");
			HUDManager.Instance.UIAudio.PlayOneShot(HUDManager.Instance.radiationWarningAudio, 1f);
		}

		public static void CallTipOverlay(string header, string message, bool isWarning, bool useSave)
		{
		}
	}
	[HarmonyPatch(typeof(StartOfRound))]
	internal class StartOfRoundPatches
	{
		public static bool NetworkHandlersRegistered = false;

		public static LethalServerMessage<int> MalfunctionPowerNetworkServerMessage = new LethalServerMessage<int>("MALFUNCTION_POWER", (Action<int, ulong>)null);

		public static LethalClientMessage<int> MalfunctionPowerNetworkClientMessage = new LethalClientMessage<int>("MALFUNCTION_POWER", (Action<int>)null, (Action<int, ulong>)null);

		public static LethalServerMessage<int> QuotaDaysOverlayNetworkServerMessage = new LethalServerMessage<int>("quotadays", (Action<int, ulong>)null);

		public static LethalClientMessage<int> QuotaDaysOverlayNetworkClientMessage = new LethalClientMessage<int>("quotadays", (Action<int>)null, (Action<int, ulong>)null);

		public static LethalServerMessage<int> QuotaDaysOverlayNegativeNetworkServerMessage = new LethalServerMessage<int>("quotadaysn", (Action<int, ulong>)null);

		public static LethalClientMessage<int> QuotaDaysOverlayNegativeNetworkClientMessage = new LethalClientMessage<int>("quotadaysn", (Action<int>)null, (Action<int, ulong>)null);

		public static LethalServerMessage<int> TipOverlayNetworkServerMessage = new LethalServerMessage<int>("tip", (Action<int, ulong>)null);

		public static LethalClientMessage<int> TipOverlayNetworkClientMessage = new LethalClientMessage<int>("tip", (Action<int>)null, (Action<int, ulong>)null);

		public static LethalServerMessage<int> LightsNetworkServerMessage = new LethalServerMessage<int>("lights", (Action<int, ulong>)null);

		public static LethalClientMessage<int> LightsNetworkClientMessage = new LethalClientMessage<int>("lights", (Action<int>)null, (Action<int, ulong>)null);

		[HarmonyPostfix]
		[HarmonyPatch("Start")]
		public static void RegisterNetworkHandlers()
		{
			if (!NetworkHandlersRegistered)
			{
				LightsNetworkServerMessage.OnReceived += LightsNetworkHandlerServer;
				LightsNetworkClientMessage.OnReceived += LightsNetworkHandler;
				TipOverlayNetworkServerMessage.OnReceived += TipOverlayNetworkHandlerServer;
				TipOverlayNetworkClientMessage.OnReceived += TipOverlayNetworkHandler;
				QuotaDaysOverlayNegativeNetworkServerMessage.OnReceived += QuotaDaysOverlayNegativeNetworkHandlerServer;
				QuotaDaysOverlayNegativeNetworkClientMessage.OnReceived += QuotaDaysOverlayNegativeNetworkHandler;
				QuotaDaysOverlayNetworkServerMessage.OnReceived += QuotaDaysOverlayNetworkHandlerServer;
				QuotaDaysOverlayNetworkClientMessage.OnReceived += QuotaDaysOverlayNetworkHandler;
				MalfunctionPowerNetworkServerMessage.OnReceived += MalfunctionPowerNetworkHandlerServer;
				MalfunctionPowerNetworkClientMessage.OnReceived += MalfunctionPowerNetworkHandler;
				NetworkHandlersRegistered = true;
				Log.LogDebug("Registered network handlers!");
			}
		}

		public static void MalfunctionPowerNetworkHandler(int data)
		{
			Log.LogWarning($"Received network message for malfunction power roll result: {data}");
			HandleRollPower(data);
		}

		public static void MalfunctionPowerNetworkHandlerServer(int data, ulong data2)
		{
			Log.LogWarning($"Received network message for malfunction power roll result: {data}");
			HandleRollPower(data);
		}

		public static void HandleRollPower(int data)
		{
			if (data == 1)
			{
				Log.LogWarning("Called");
				RemoteMethods.CallRadiationSign();
			}
		}

		public static void QuotaDaysOverlayNetworkHandler(int data)
		{
			Log.LogWarning($"Received network message for malfunction power roll result: {data}");
			HandleQuotaDaysOverlay(data);
		}

		public static void QuotaDaysOverlayNetworkHandlerServer(int data, ulong data2)
		{
			Log.LogWarning($"Received network message for malfunction power roll result: {data}");
			HandleQuotaDaysOverlay(data);
		}

		public static void HandleQuotaDaysOverlay(int data)
		{
			if (data == 1)
			{
				Log.LogWarning("Called");
				RemoteMethods.CallQuotaDaysOverlayRandom(1, 100);
			}
		}

		public static void QuotaDaysOverlayNegativeNetworkHandler(int data)
		{
			Log.LogWarning($"Received network message for malfunction power roll result: {data}");
			HandleQuotaDaysNegativeOverlay(data);
		}

		public static void QuotaDaysOverlayNegativeNetworkHandlerServer(int data, ulong data2)
		{
			Log.LogWarning($"Received network message for malfunction power roll result: {data}");
			HandleQuotaDaysNegativeOverlay(data);
		}

		public static void HandleQuotaDaysNegativeOverlay(int data)
		{
			Log.LogWarning("Called");
			RemoteMethods.CallQuotaDaysOverlay(data);
		}

		public static void TipOverlayNetworkHandler(int data)
		{
			Log.LogWarning($"Received network message for malfunction power roll result: {data}");
			HandleTipOverlay(data);
		}

		public static void TipOverlayNetworkHandlerServer(int data, ulong data2)
		{
			Log.LogWarning($"Received network message for malfunction power roll result: {data}");
			HandleTipOverlay(data);
		}

		public static void HandleTipOverlay(int data)
		{
			if (data == 1)
			{
				string text = Random.Range(11111, 99999).ToString();
				Log.LogWarning("Called");
				RemoteMethods.CallTipOverlay("Crowd Control", text + " has spawned more monsters in the level", isWarning: false, useSave: false);
			}
			if (data == 2)
			{
				string text2 = Random.Range(11111, 99999).ToString();
				Log.LogWarning("Called");
				RemoteMethods.CallTipOverlay("Crowd Control", text2 + " has spawned %invalid% in the level", isWarning: false, useSave: false);
			}
		}

		public static void LightsNetworkHandler(int data)
		{
			Log.LogWarning($"Received network message for malfunction power roll result: {data}");
			HandleLights(data);
		}

		public static void LightsNetworkHandlerServer(int data, ulong data2)
		{
			Log.LogWarning($"Received network message for malfunction power roll result: {data}");
			HandleLights(data);
		}

		public static void HandleLights(int data)
		{
			if (data == 1)
			{
				string text = Random.Range(11111, 99999).ToString();
				Log.LogWarning("Called");
				RemoteMethods.CallTipOverlay("Crowd Control", "Internal error ocurred", isWarning: true, useSave: false);
			}
			if (data == 2)
			{
				string text2 = Random.Range(11111, 99999).ToString();
				Log.LogWarning("Called");
				RemoteMethods.CallTipOverlay("Toil Master", "I see you...", isWarning: true, useSave: false);
			}
			if (data == 3)
			{
				string text3 = Random.Range(11111, 99999).ToString();
				Log.LogWarning("Called");
				RemoteMethods.CallTipOverlay("Toil Master", "I will get you!", isWarning: true, useSave: false);
			}
			if (data == 4)
			{
				string text4 = Random.Range(11111, 99999).ToString();
				Log.LogWarning("Called");
				RemoteMethods.CallTipOverlay("Watcher", "Behind you....", isWarning: true, useSave: false);
			}
			if (data == 5)
			{
				string text5 = Random.Range(11111, 99999).ToString();
				Log.LogWarning("Called");
				RemoteMethods.CallTipOverlay("Watcher", "Would you like to play with me?", isWarning: true, useSave: false);
			}
		}
	}
	internal class Commands
	{
		public void CommandsM()
		{
			//IL_0039: Unknown result type (might be due to invalid IL or missing references)
			//IL_003e: Unknown result type (might be due to invalid IL or missing references)
			//IL_0051: Unknown result type (might be due to invalid IL or missing references)
			//IL_0064: Expected O, but got Unknown
			Log.LogWarning("FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF");
			TerminalApi.AddCommand("radiation", "Radiation method executed\n", "call", true);
			TerminalApi.AddCommand("idiot", "Radiation method executed", (string)null, true);
			TerminalApi.AddCommand("push", new CommandInfo
			{
				DisplayTextSupplier = CommandFunction,
				Category = "Misc"
			}, (string)null, true);
		}

		public string CommandFunction()
		{
			Log.LogWarning("Code?");
			Log.LogWarning("Code put here will run when terminal command is sent.");
			return "Wait, you cannot push\n\n";
		}
	}
}