Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of Brutal Company Minus v0.13.21
BrutalCompanyMinus.dll
Decompiled 2 weeks ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.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 BrutalCompanyMinus.NetcodePatcher; using GameNetcodeStuff; using HarmonyLib; 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; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("BrutalCompanyMinus")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+ed68f23e749905974aafe6506399c56c8fc9f0c2")] [assembly: AssemblyProduct("BrutalCompanyMinus")] [assembly: AssemblyTitle("BrutalCompanyMinus")] [assembly: AssemblyVersion("1.0.0.0")] [module: NetcodePatchedAssembly] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [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] [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 } 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 } 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.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.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<IndoorMapHazard[]> indoorMapHazards = new List<IndoorMapHazard[]>(); 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_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Expected O, but got Unknown //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Expected O, but got Unknown //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Expected O, but got Unknown //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Expected O, but got Unknown //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Expected O, but got Unknown //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Expected O, but got Unknown //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Expected O, but got Unknown //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Expected O, but got Unknown //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Expected O, but got Unknown //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_012c: 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_003a: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0081: 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_008f: 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_00a2: 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 num = 0; num < array3.Length; num++) { if ((Object)(object)array3[num].enemyPrefab == (Object)null) { Log.LogWarning($"Enemy:{((Object)array3[num]).name}, prefab is null, this may cause issues..."); } EnemyList.Add(((Object)array3[num]).name, array3[num]); } 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 num2 = 0; num2 < array4.Length; num2++) { if ((Object)(object)array4[num2].spawnPrefab == (Object)null) { Log.LogWarning($"Item:{((Object)array4[num2]).name}, prefab is null, this may cause issues..."); } ItemList.Add(((Object)array4[num2]).name, array4[num2]); } 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<IndoorMapHazard> list2 = new List<IndoorMapHazard>(); List<SpawnableOutsideObjectWithRarity> list3 = new List<SpawnableOutsideObjectWithRarity>(); SelectableLevel[] levels = StartOfRound.Instance.levels; foreach (SelectableLevel val in levels) { if ((Object)(object)val == (Object)null) { continue; } if (val.spawnableMapObjects != null) { SpawnableMapObject[] array5 = val.spawnableMapObjects; foreach (SpawnableMapObject obj in array5) { if (obj != null && !((Object)(object)obj.prefabToSpawn == (Object)null) && list.FindIndex((SpawnableMapObject o) => ((Object)o.prefabToSpawn).name == ((Object)obj.prefabToSpawn).name) < 0) { list.Add(obj); } } } if (val.indoorMapHazards != null) { IndoorMapHazard[] array6 = val.indoorMapHazards; foreach (IndoorMapHazard obj2 in array6) { if (obj2 != null && !((Object)(object)obj2.hazardType.prefabToSpawn == (Object)null) && list2.FindIndex((IndoorMapHazard o) => ((Object)o.hazardType.prefabToSpawn).name == ((Object)obj2.hazardType.prefabToSpawn).name) < 0) { list2.Add(obj2); } } } SpawnableOutsideObjectWithRarity[] spawnableOutsideObjects = val.spawnableOutsideObjects; foreach (SpawnableOutsideObjectWithRarity obj3 in spawnableOutsideObjects) { if (obj3 != null && !((Object)(object)obj3.spawnableObject == (Object)null) && !((Object)(object)obj3.spawnableObject.prefabToSpawn == (Object)null) && list3.FindIndex((SpawnableOutsideObjectWithRarity o) => ((Object)o.spawnableObject.prefabToSpawn).name == ((Object)obj3.spawnableObject.prefabToSpawn).name) < 0) { list3.Add(obj3); } } } Dictionary<string, GameObject> dictionary = new Dictionary<string, GameObject>(); foreach (IndoorMapHazard item2 in list2) { dictionary.Add(((Object)item2.hazardType.prefabToSpawn).name, item2.hazardType.prefabToSpawn); } foreach (SpawnableMapObject item3 in list) { if (!dictionary.ContainsKey(((Object)item3.prefabToSpawn).name)) { dictionary.Add(((Object)item3.prefabToSpawn).name, item3.prefabToSpawn); } } foreach (KeyValuePair<string, GameObject> item4 in dictionary) { ObjectList.Add(item4.Key, item4.Value); } foreach (SpawnableOutsideObjectWithRarity item5 in list3) { ObjectList.Add(((Object)item5.spawnableObject.prefabToSpawn).name, item5.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_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Expected O, but got Unknown //IL_00f4: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Expected O, but got Unknown //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Expected O, but got Unknown 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 item4 in list) { num += (float)((item4.spawnableItem.minValue + item4.spawnableItem.maxValue) * item4.rarity); num2 += (float)item4.rarity; } if (num2 != 0f) { averageScrapValueList.Add(num / (num2 * 2f)); } else { averageScrapValueList.Add(80f); } AnimationCurve item = new AnimationCurve(val.enemySpawnChanceThroughoutDay.keys); AnimationCurve item2 = new AnimationCurve(val.outsideEnemySpawnChanceThroughDay.keys); AnimationCurve item3 = new AnimationCurve(val.daytimeEnemySpawnChanceThroughDay.keys); insideSpawnChanceCurves.Add(item); outsideSpawnChanceCurves.Add(item2); daytimeSpawnChanceCurves.Add(item3); insideMaxPowerCounts.Add(val.maxEnemyPowerCount); outsideMaxPowerCounts.Add(val.maxOutsideEnemyPowerCount); daytimeMaxPowerCounts.Add(val.maxDaytimeEnemyPowerCount); List<SpawnableMapObject> list2 = new List<SpawnableMapObject>(); SpawnableMapObject[] array = val.spawnableMapObjects; foreach (SpawnableMapObject original in array) { list2.Add(original.CreateCopy()); } spawnableMapObjects.Add(list2.ToArray()); List<IndoorMapHazard> list3 = new List<IndoorMapHazard>(); IndoorMapHazard[] array2 = val.indoorMapHazards; foreach (IndoorMapHazard original2 in array2) { list3.Add(original2.CreateCopy()); } indoorMapHazards.Add(list3.ToArray()); } generatedOrignalValuesList = true; } public static EnemyType GetEnemy(EnemyName name) { return GetEnemy(EnemyNameList[name]); } public static EnemyType GetEnemy(string name) { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Expected O, but got Unknown if (EnemyList.TryGetValue(name, out EnemyType value)) { return value; } Log.LogWarning("GetEnemy(" + name + ") failed, returning an empty enemy type"); return new EnemyType { enemyName = name, name = name }; } 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_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Expected O, but got Unknown if (ItemList.TryGetValue(name, out Item value)) { return value; } Log.LogWarning("GetItem(" + name + ") failed, returning an empty item"); return new Item { itemName = name, name = name }; } public static GameObject GetObject(ObjectName name) { return GetObject(ObjectNameList[name]); } public static GameObject GetObject(string name) { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002d: 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; 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; 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_00e7: 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_009b: Unknown result type (might be due to invalid IL or missing references) //IL_0087: 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(); } [ServerRpc(RequireOwnership = false)] public void GetSyncedTextServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: 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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1644092438u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1644092438u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SetSyncedTextClientRpc(textUI.Value); } } } [ClientRpc] public void SetSyncedTextClientRpc(FixedString4096Bytes value) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1209899646u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe<FixedString4096Bytes>(ref value, default(ForFixedStrings)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1209899646u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; textUI.Value = value; } } } [ServerRpc(RequireOwnership = false)] public void GiveSeedServerRpc(int increment) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2429182447u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, increment); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2429182447u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SetSeedClientRpc(_seed + increment); } } } [ClientRpc] public void SetSeedClientRpc(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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1673350984u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, value); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1673350984u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; _seed = value; } } } [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) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(174694319u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 174694319u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; 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) //IL_011f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2150416984u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe<float>(ref factorySizeMultiplier, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe<float>(ref scrapValueMultiplier, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe<float>(ref scrapAmountMultiplier, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val, bonusMaxHp); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2150416984u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; RoundManager.Instance.currentLevel.factorySizeMultiplier = factorySizeMultiplier; Manager.bonusEnemyHp = bonusMaxHp; receivedSyncedValues = true; } } } [ServerRpc(RequireOwnership = false)] 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_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_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: 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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(875794818u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe<NetworkObjectReference>(ref obj, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val, value); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 875794818u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SyncScrapValueClientRpc(obj, value); } } } [ClientRpc] public 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) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(268987115u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe<NetworkObjectReference>(ref obj, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val, value); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 268987115u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; 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_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: 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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2205229909u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe<NetworkObjectReference>(ref netObject, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val, code); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2205229909u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; 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) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3849078077u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe<NetworkObjectReference>(ref netObject, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val, code); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3849078077u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; 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) //IL_00f7: 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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2208211795u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe<float>(ref amount, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe<float>(ref speedMultiplier, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2208211795u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; 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) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3436861046u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe<float>(ref amount, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe<float>(ref speedMultiplier, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3436861046u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Manager.moveTime = true; Manager.moveTimeAmount += amount; Manager.timeSpeedMultiplier *= speedMultiplier; } } } private void UpdateAtmosphere(FixedString128Bytes name, bool state) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: 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) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1744607847u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1744607847u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; UI.Instance.curretShowCaseEventTime = UI.Instance.showCaseEventTime; UI.Instance.TogglePanel(state: true); UI.Instance.panelScrollBar.value = 1f; UI.Instance.showCaseEvents = true; } } } [ServerRpc(RequireOwnership = false)] public 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) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1335262659u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1335262659u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; 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) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(466041418u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 466041418u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; 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) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1853859009u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe<bool>(ref state, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1853859009u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; 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) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(603622741u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe<bool>(ref state, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 603622741u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; 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) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(4203994123u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe<bool>(ref state, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 4203994123u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; 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) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2568149201u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe<bool>(ref state, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2568149201u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; 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) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1050877662u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe<bool>(ref state, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1050877662u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; 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) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1627891447u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe<bool>(ref state, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1627891447u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; 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) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3368901509u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3368901509u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; 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) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(2808903510u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 2808903510u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; 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) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3941924814u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe<bool>(ref state, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3941924814u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; 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) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(3457555438u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe<bool>(ref state, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 3457555438u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; 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) //IL_0112: 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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2842285472u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe<float>(ref openCloseChance, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe<bool>(ref messWithLock, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe<float>(ref messWithLockChance, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2842285472u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; 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) //IL_011f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1683303265u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe<float>(ref openCloseChance, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val, seed); ((FastBufferWriter)(ref val)).WriteValueSafe<bool>(ref messWithLock, default(ForPrimitives)); ((FastBufferWriter)(ref val)).WriteValueSafe<float>(ref messWithLockChance, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1683303265u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; 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) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(1559123307u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 1559123307u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; TerminalAccessibleObject[] array = Object.FindObjectsOfType<TerminalAccessibleObject>(); for (int i = 0; i < array.Length; i++) { array[i].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) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(969155834u, val2, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 969155834u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; DoorLock[] array = Object.FindObjectsOfType<DoorLock>(); foreach (DoorLock val3 in array) { 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_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0139: 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_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0146: 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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3079998733u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, amount); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3079998733u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; 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, 1f) + 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_00db: 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_00eb: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1000423920u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe(ref position); BytePacker.WriteValueBitPacked(val, seed); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1000423920u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; 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_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: 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 val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(234264786u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe<NetworkObjectReference>(ref enemy, default(ForNetworkSerializable)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref position); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 234264786u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; 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_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_011b: 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_012d: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(1650168377u, val2, (RpcDelivery)0); ((FastBufferWriter)(ref val)).WriteValueSafe<NetworkObjectReference>(ref enemy, default(ForNetworkSerializable)); ((FastBufferWriter)(ref val)).WriteValueSafe(ref position); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 1650168377u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; NetworkObject val3 = default(NetworkObject); if (((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) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val2 = default(ServerRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(3701680339u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, seed); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 3701680339u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; 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_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Expected I4, but got Unknown //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b2: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val2 = default(ClientRpcParams); FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(910007267u, val2, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val, seed); ((NetworkBehaviour)this).__endSendClientRpc(ref val, 910007267u, val2, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (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; switch (weatherType - 1) { case 0: BrutalCompanyMinus.Minus.Handlers.AllWeather.raining = true; break; case 2: if (!((Object)(object)TimeOfDay.Instance.foggyWeather == (Object)null)) { LocalVolumetricFog val6 = Object.Instantiate<LocalVolumetricFog>(TimeOfDay.Instance.foggyWeather); Manager.objectsToClear.Add(((Component)val6).gameObject); val6.parameters.albedo = new Color(0.25f, 0.35f, 0.55f, 1f); val6.parameters.meanFreePath = random.Next((int)MathF.Max(4f, val3.weatherVariable), val3.weatherVariable2) * 5; val6.parameters.size.y = 255f; ((Component)val6).gameObject.SetActive(true); } break; case 3: { FloodWeather val5 = Object.Instantiate<FloodWeather>(Assets.flooded); Manager.objectsToClear.Add(((Component)val5).gameObject); BrutalCompanyMinus.Minus.Handlers.AllWeather.floodVariable1 = val3.weatherVariable; BrutalCompanyMinus.Minus.Handlers.AllWeather.floodVariable2 = val3.weatherVariable2; BrutalCompanyMinus.Minus.Handlers.AllWeather.spawnedFloodedWeather = val5; ((Component)val5).gameObject.SetActive(true); break; } case 1: { StormyWeather val4 = Object.Instantiate<StormyWeather>(Assets.stormy); Manager.objectsToClear.Add(((Component)val4).gameObject); BrutalCompanyMinus.Minus.Handlers.AllWeather.lightningVariable1 = val3.weatherVariable; BrutalCompanyMinus.Minus.Handlers.AllWeather.LightningV