Decompiled source of Brutal Company Minus Extra v0.19.3
BrutalCompanyMinus.dll
Decompiled 10 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Reflection.Emit; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Text.RegularExpressions; using BCMECodeSecurityCheck.Methods; using BCMECodeSecurityCheck.Modules; 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 DigitalRuby.ThunderAndLightning; using GameNetcodeStuff; using HarmonyLib; using LethalNetworkAPI; using Microsoft.CodeAnalysis; using TMPro; using Unity.Collections; using Unity.Netcode; using UnityEngine; using UnityEngine.AI; using UnityEngine.Animations.Rigging; using UnityEngine.Events; using UnityEngine.InputSystem; using UnityEngine.InputSystem.Controls; using UnityEngine.Rendering.HighDefinition; using UnityEngine.SceneManagement; using UnityEngine.UI; using com.github.zehsteam.TakeyGokuBracken; using com.github.zehsteam.ToilHead; using com.github.zehsteam.ToilHead.MonoBehaviours; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("BrutalCompanyMinus")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+2095ffbd223defec4ac52f80ca1d935d204a430b")] [assembly: AssemblyProduct("BrutalCompanyMinus")] [assembly: AssemblyTitle("BrutalCompanyMinus")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] internal class <Module> { static <Module>() { NetworkVariableSerializationTypes.InitializeSerializer_UnmanagedINetworkSerializable<Weather>(); NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedIEquatable<Weather>(); NetworkVariableSerializationTypes.InitializeSerializer_UnmanagedINetworkSerializable<OutsideObjectsToSpawn>(); NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedIEquatable<OutsideObjectsToSpawn>(); NetworkVariableSerializationTypes.InitializeSerializer_UnmanagedINetworkSerializable<CurrentWeatherEffect>(); NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedIEquatable<CurrentWeatherEffect>(); NetworkVariableSerializationTypes.InitializeSerializer_FixedString<FixedString4096Bytes>(); NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedIEquatable<FixedString4096Bytes>(); } } namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } } public class BloodMoonWeather : MonoBehaviour { private float randomThunderTime; private float timeAtLastStrike; private Vector3 lastRandomStrikePosition; private Random seed; public AudioClip[] strikeSFX; public AudioClip[] distantThunderSFX; public LightningBoltPrefabScript randomThunder; public LightningBoltPrefabScript targetedThunder; public AudioSource randomStrikeAudio; public AudioSource randomStrikeAudioB; private bool lastStrikeAudioUsed; public AudioSource targetedStrikeAudio; private RaycastHit rayHit; private GameObject[] outsideNodes; private NavMeshHit navHit; public ParticleSystem explosionEffectParticle; private List<GrabbableObject> metalObjects = new List<GrabbableObject>(); private GrabbableObject targetingMetalObject; private float getObjectToTargetInterval; private float strikeMetalObjectTimer; private bool hasShownStrikeWarning; public ParticleSystem staticElectricityParticle; private GameObject setStaticToObject; private GrabbableObject setStaticGrabbableObject; public AudioClip staticElectricityAudio; private float lastGlobalTimeUsed; private float globalTimeAtLastStrike; private Random targetedThunderRandom; private void OnEnable() { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: 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_003c: Expected O, but got Unknown //IL_0084: Unknown result type (might be due to invalid IL or missing references) lastRandomStrikePosition = Vector3.zero; targetedThunderRandom = new Random(StartOfRound.Instance.randomMapSeed); TimeOfDay.Instance.onTimeSync.AddListener(new UnityAction(OnGlobalTimeSync)); globalTimeAtLastStrike = TimeOfDay.Instance.globalTime; lastGlobalTimeUsed = 0f; randomThunderTime = TimeOfDay.Instance.globalTime + 7f; timeAtLastStrike = TimeOfDay.Instance.globalTime; navHit = default(NavMeshHit); outsideNodes = (from x in GameObject.FindGameObjectsWithTag("OutsideAINode") orderby x.transform.position.x + x.transform.position.z select x).ToArray(); if (((Behaviour)StartOfRound.Instance.spectateCamera).enabled) { SwitchCamera(StartOfRound.Instance.spectateCamera); } else { SwitchCamera(GameNetworkManager.Instance.localPlayerController.gameplayCamera); } seed = new Random(StartOfRound.Instance.randomMapSeed); DetermineNextStrikeInterval(); ((MonoBehaviour)this).StartCoroutine(GetMetalObjectsAfterDelay()); } private void OnDisable() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown TimeOfDay.Instance.onTimeSync.RemoveListener(new UnityAction(OnGlobalTimeSync)); } private void OnGlobalTimeSync() { float num = RoundUpToNearestTen(TimeOfDay.Instance.globalTime); if (num != lastGlobalTimeUsed) { lastGlobalTimeUsed = num; seed = new Random((int)num + StartOfRound.Instance.randomMapSeed); timeAtLastStrike = TimeOfDay.Instance.globalTime; } } private IEnumerator GetMetalObjectsAfterDelay() { yield return (object)new WaitForSeconds(15f); GrabbableObject[] array = Object.FindObjectsOfType<GrabbableObject>(); for (int i = 0; i < array.Length; i++) { if (array[i].itemProperties.isConductiveMetal) { metalObjects.Add(array[i]); } } } public void SwitchCamera(Camera newCamera) { ((LightningBoltScript)randomThunder).Camera = newCamera; ((LightningBoltScript)targetedThunder).Camera = newCamera; } private void DetermineNextStrikeInterval() { timeAtLastStrike = randomThunderTime; float num = seed.Next(-5, 110); randomThunderTime += Mathf.Clamp(num * 0.25f, 0.6f, 110f) / Mathf.Clamp(TimeOfDay.Instance.currentWeatherVariable, 1f, 100f); } private int RoundUpToNearestTen(float x) { return (int)(x / 10f) * 10; } private void Update() { //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_02fc: Unknown result type (might be due to invalid IL or missing references) //IL_036c: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01dd: Unknown result type (might be due to invalid IL or missing references) if (!((Component)this).gameObject.activeInHierarchy) { return; } if (TimeOfDay.Instance.globalTime > randomThunderTime) { LightningStrikeRandom(); DetermineNextStrikeInterval(); } if ((Object)(object)setStaticToObject != (Object)null && (Object)(object)setStaticGrabbableObject != (Object)null) { if (setStaticGrabbableObject.isInFactory) { staticElectricityParticle.Stop(); } ((Component)staticElectricityParticle).transform.position = setStaticToObject.transform.position; } if (!((NetworkBehaviour)RoundManager.Instance).IsOwner) { return; } if ((Object)(object)targetingMetalObject == (Object)null) { if (metalObjects.Count <= 0) { return; } if (getObjectToTargetInterval <= 4f) { getObjectToTargetInterval += Time.deltaTime; return; } hasShownStrikeWarning = false; strikeMetalObjectTimer = Mathf.Clamp(Random.Range(1f, 28f), 0f, 20f); getObjectToTargetInterval = 0f; float num = 1000f; for (int i = 0; i < metalObjects.Count; i++) { if (metalObjects[i].isInFactory || metalObjects[i].isInShipRoom) { continue; } for (int j = 0; j < StartOfRound.Instance.allPlayerScripts.Length; j++) { if (StartOfRound.Instance.allPlayerScripts[j].isPlayerControlled) { float num2 = Vector3.Distance(((Component)metalObjects[i]).transform.position, ((Component)StartOfRound.Instance.allPlayerScripts[j]).transform.position); if (num2 < num) { targetingMetalObject = metalObjects[i]; num = num2; break; } } } if (Random.Range(0, 100) < 20) { break; } } if ((Object)(object)targetingMetalObject != (Object)null && targetingMetalObject.isHeld) { strikeMetalObjectTimer = Mathf.Clamp(strikeMetalObjectTimer + Time.deltaTime, 4f, 20f); } return; } strikeMetalObjectTimer -= Time.deltaTime; if (strikeMetalObjectTimer <= 0f) { if (!targetingMetalObject.isInFactory) { RoundManager.Instance.LightningStrikeServerRpc(((Component)targetingMetalObject).transform.position); } getObjectToTargetInterval = 5f; targetingMetalObject = null; } else if (strikeMetalObjectTimer < 10f && !hasShownStrikeWarning) { hasShownStrikeWarning = true; float num3 = Mathf.Abs(strikeMetalObjectTimer - 10f); RoundManager.Instance.ShowStaticElectricityWarningServerRpc(NetworkObjectReference.op_Implicit(((Component)targetingMetalObject).gameObject.GetComponent<NetworkObject>()), num3); } } public void SetStaticElectricityWarning(NetworkObject warningObject, float particleTime) { //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) setStaticToObject = ((Component)warningObject).gameObject; GrabbableObject component = ((Component)warningObject).gameObject.GetComponent<GrabbableObject>(); if ((Object)(object)component != (Object)null) { setStaticGrabbableObject = ((Component)warningObject).gameObject.GetComponent<GrabbableObject>(); for (int i = 0; i < GameNetworkManager.Instance.localPlayerController.ItemSlots.Length; i++) { if ((Object)(object)GameNetworkManager.Instance.localPlayerController.ItemSlots[i] == (Object)(object)component) { HUDManager.Instance.DisplayTip("ALERT!", "Drop your metallic items now! A static charge has been detected. You have seconds left to live.", true, true, "LC_LightningTip"); } } } ShapeModule shape = staticElectricityParticle.shape; ((ShapeModule)(ref shape)).meshRenderer = setStaticToObject.GetComponentInChildren<MeshRenderer>(); staticElectricityParticle.time = particleTime; staticElectricityParticle.Play(); staticElectricityParticle.time = particleTime; ((Component)staticElectricityParticle).gameObject.GetComponent<AudioSource>().clip = staticElectricityAudio; ((Component)staticElectricityParticle).gameObject.GetComponent<AudioSource>().Play(); ((Component)staticElectricityParticle).gameObject.GetComponent<AudioSource>().time = particleTime; } private void LightningStrikeRandom() { //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Unknown result type (might be due to invalid IL or missing references) //IL_00d7: 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_00e2: 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_00f5: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) Vector3 randomNavMeshPositionInBoxPredictable; if (seed.Next(0, 100) < 60 && (randomThunderTime - timeAtLastStrike) * TimeOfDay.Instance.currentWeatherVariable < 3f) { randomNavMeshPositionInBoxPredictable = lastRandomStrikePosition; } else { int num = seed.Next(0, outsideNodes.Length); if (outsideNodes == null || (Object)(object)outsideNodes[num] == (Object)null) { outsideNodes = (from x in GameObject.FindGameObjectsWithTag("OutsideAINode") orderby x.transform.position.x + x.transform.position.z select x).ToArray(); num = seed.Next(0, outsideNodes.Length); } randomNavMeshPositionInBoxPredictable = outsideNodes[num].transform.position; randomNavMeshPositionInBoxPredictable = RoundManager.Instance.GetRandomNavMeshPositionInBoxPredictable(randomNavMeshPositionInBoxPredictable, 15f, navHit, seed, -1); } lastRandomStrikePosition = randomNavMeshPositionInBoxPredictable; LightningStrike(randomNavMeshPositionInBoxPredictable, useTargetedObject: false); } public void LightningStrike(Vector3 strikePosition, bool useTargetedObject) { //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0101: 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_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_01a6: Unknown result type (might be due to invalid IL or missing references) //IL_01a8: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_01f0: Unknown result type (might be due to invalid IL or missing references) //IL_01fa: Unknown result type (might be due to invalid IL or missing references) //IL_01ff: Unknown result type (might be due to invalid IL or missing references) //IL_020a: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_0215: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Unknown result type (might be due to invalid IL or missing references) //IL_0244: Unknown result type (might be due to invalid IL or missing references) //IL_0245: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0254: Unknown result type (might be due to invalid IL or missing references) //IL_026c: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0109: 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_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0116: 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_019e: Unknown result type (might be due to invalid IL or missing references) //IL_01a3: Unknown result type (might be due to invalid IL or missing references) Random random; AudioSource val; LightningBoltPrefabScript val2; if (useTargetedObject) { random = targetedThunderRandom; staticElectricityParticle.Stop(); ((Component)staticElectricityParticle).GetComponent<AudioSource>().Stop(); setStaticToObject = null; val = targetedStrikeAudio; val2 = targetedThunder; } else { random = new Random(seed.Next(0, 10000)); val = ((!lastStrikeAudioUsed) ? randomStrikeAudio : randomStrikeAudioB); lastStrikeAudioUsed = !lastStrikeAudioUsed; val2 = randomThunder; } bool flag = false; Vector3 val3 = Vector3.zero; for (int i = 0; i < 7; i++) { if (i == 6) { val3 = strikePosition + Vector3.up * 80f; } else { float num = random.Next(-32, 32); float num2 = random.Next(-32, 32); val3 = strikePosition + Vector3.up * 80f + new Vector3(num, 0f, num2); } if (!Physics.Linecast(val3, strikePosition + Vector3.up * 0.5f, ref rayHit, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { flag = true; break; } } if (!flag) { if (!Physics.Raycast(val3, strikePosition - val3, ref rayHit, 100f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { return; } strikePosition = ((RaycastHit)(ref rayHit)).point; } Debug.DrawLine(val3, strikePosition, Color.red, 10f); val2.Source.transform.position = val3; val2.Destination.transform.position = strikePosition; ((LightningBoltPrefabScriptBase)val2).AutomaticModeSeconds = 0.2f; ((Component)val).transform.position = strikePosition + Vector3.up * 0.5f; Landmine.SpawnExplosion(strikePosition + Vector3.up * 0.25f, false, 2.4f, 5f, 50, 0f, (GameObject)null, false); ((Component)explosionEffectParticle).transform.position = strikePosition + Vector3.up * 0.25f; explosionEffectParticle.Play(); PlayThunderEffects(strikePosition, val); } private void PlayThunderEffects(Vector3 strikePosition, AudioSource audio) { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00ec: Unknown result type (might be due to invalid IL or missing references) PlayerControllerB val = GameNetworkManager.Instance.localPlayerController; if (val.isPlayerDead && (Object)(object)val.spectatedPlayerScript != (Object)null) { val = val.spectatedPlayerScript; } float num = Vector3.Distance(((Component)val.gameplayCamera).transform.position, strikePosition); bool flag = false; if (num < 40f) { HUDManager.Instance.ShakeCamera((ScreenShakeType)1); } else if (num < 110f) { HUDManager.Instance.ShakeCamera((ScreenShakeType)2); } else { flag = true; } AudioClip[] array = ((!flag) ? strikeSFX : distantThunderSFX); if (!val.isInsideFactory) { RoundManager.PlayRandomClip(audio, array, true, 1f, 0, 1000); } WalkieTalkie.TransmitOneShotAudio(audio, array[Random.Range(0, array.Length)], 1f); Bounds bounds = StartOfRound.Instance.shipBounds.bounds; if (((Bounds)(ref bounds)).Contains(strikePosition)) { ((Component)StartOfRound.Instance.shipAnimatorObject).GetComponent<Animator>().SetTrigger("shipShake"); RoundManager.PlayRandomClip(StartOfRound.Instance.ship3DAudio, StartOfRound.Instance.shipCreakSFX, false, 1f, 0, 1000); StartOfRound.Instance.PowerSurgeShip(); } } } 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<float> averageScrapValueList = new List<float>(); internal static List<AnimationCurve> insideSpawnChanceCurves = new List<AnimationCurve>(); internal static List<AnimationCurve> outsideSpawnChanceCurves = new List<AnimationCurve>(); internal static List<AnimationCurve> daytimeSpawnChanceCurves = new List<AnimationCurve>(); internal static List<int> insideMaxPowerCounts = new List<int>(); internal static List<int> outsideMaxPowerCounts = new List<int>(); internal static List<int> daytimeMaxPowerCounts = new List<int>(); internal static StormyWeather stormy; internal static FloodWeather flooded; public static EnemyType antiCoilHead; public static EnemyType nutSlayer; public static EnemyType kamikazieBug; public static Item slayerShotgun; public static Item grabbableTurret; public static Item grabbableLandmine; public static GameObject artilleryShell; public static GameObject artillerySirens; public static GameObject bunkerEntrance; public static GameObject bunkerEscape; public static GameObject teleportAudio; public static GameObject bloodRain; private static bool generatedList = false; private static bool generatedOrignalValuesList = false; internal static GameObject hangarShip => GameObject.Find("/Environment/HangarShip"); [HarmonyPostfix] [HarmonyPatch(typeof(GameNetworkManager), "Start")] private static void GenerateCustom() { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown //IL_0042: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Expected O, but got Unknown //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Expected O, but got Unknown //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Expected O, but got Unknown //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Expected O, but got Unknown //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Expected O, but got Unknown //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Expected O, but got Unknown //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Expected O, but got Unknown //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Expected O, but got Unknown //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0114: Expected O, but got Unknown //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Expected O, but got Unknown antiCoilHead = (EnemyType)customAssetBundle.LoadAsset("AntiCoilHead"); nutSlayer = (EnemyType)customAssetBundle.LoadAsset("NutSlayer"); kamikazieBug = (EnemyType)customAssetBundle.LoadAsset("KamikazieBug"); slayerShotgun = (Item)customAssetBundle.LoadAsset("SlayerShotgun"); grabbableTurret = (Item)customAssetBundle.LoadAsset("GrabbableTurret"); grabbableLandmine = (Item)customAssetBundle.LoadAsset("GrabbableLandmine"); artilleryShell = (GameObject)customAssetBundle.LoadAsset("ArtilleryShell"); artillerySirens = (GameObject)customAssetBundle.LoadAsset("DDay"); bunkerEntrance = (GameObject)customAssetBundle.LoadAsset("BunkerEntrance"); bunkerEscape = (GameObject)customAssetBundle.LoadAsset("BunkerEscape"); teleportAudio = (GameObject)customAssetBundle.LoadAsset("TeleportAudioSource"); bloodRain = (GameObject)customAssetBundle.LoadAsset("BloodRainParticleContainer"); RegisterNetworkPrefabs(antiCoilHead.enemyPrefab, nutSlayer.enemyPrefab, kamikazieBug.enemyPrefab, slayerShotgun.spawnPrefab, grabbableTurret.spawnPrefab, grabbableLandmine.spawnPrefab, artillerySirens, bunkerEntrance, bunkerEscape); } private static void RegisterNetworkPrefabs(params GameObject[] objects) { foreach (GameObject val in objects) { NetworkManager.Singleton.AddNetworkPrefab(val); } } [HarmonyPostfix] [HarmonyPatch(typeof(TimeOfDay), "Start")] private static void OnTimeOfODayStart(ref TimeOfDay __instance) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Expected O, but got Unknown GameObject val = Object.Instantiate<GameObject>(bloodRain); LocalVolumetricFog component = ((Component)val.transform.Find("Foggy")).GetComponent<LocalVolumetricFog>(); component.parameters.albedo = new Color(0.25f, 0.35f, 0.55f, 1f); component.parameters.meanFreePath = 80f; component.parameters.size.y = 255f; __instance.effects = __instance.effects.Add(new WeatherEffect { name = "bloodyrain", effectObject = val, effectPermanentObject = null, lerpPosition = false, effectEnabled = false }); } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "Start")] private static void OnStartOfRoundStart() { StartOfRound.Instance.allItemsList.itemsList.AddRange(new List<Item> { slayerShotgun, grabbableTurret, grabbableLandmine }); } internal static void Load() { using (Stream stream = Assembly.GetExecutingAssembly().GetManifestResourceStream("BrutalCompanyMinus.Asset.bcm_assets")) { bundle = AssetBundle.LoadFromStream(stream); } using (Stream stream2 = Assembly.GetExecutingAssembly().GetManifestResourceStream("BrutalCompanyMinus.Asset.bcm_customassets")) { customAssetBundle = AssetBundle.LoadFromStream(stream2); } SceneManager.sceneLoaded += OnSceneLoaded; } private static void OnSceneLoaded(Scene scene, LoadSceneMode mode) { if ((Object)(object)StartOfRound.Instance == (Object)null) { return; } StormyWeather[] array = Resources.FindObjectsOfTypeAll<StormyWeather>().Concat(Object.FindObjectsByType<StormyWeather>((FindObjectsInactive)1, (FindObjectsSortMode)1)).ToArray(); FloodWeather[] array2 = Resources.FindObjectsOfTypeAll<FloodWeather>().Concat(Object.FindObjectsByType<FloodWeather>((FindObjectsInactive)1, (FindObjectsSortMode)1)).ToArray(); if (array.Length != 0) { stormy = array[0]; } if (array2.Length != 0) { flooded = array2[0]; } if (generatedList) { return; } Log.LogInfo("Generating 'EnemyList'"); EnemyType[] array3 = Resources.FindObjectsOfTypeAll<EnemyType>().Concat(Object.FindObjectsByType<EnemyType>((FindObjectsInactive)1, (FindObjectsSortMode)1)).ToArray(); Array.Reverse(array3); array3 = (from x in array3 group x by ((Object)x).name into x select x.FirstOrDefault()).ToArray(); for (int i = 0; i < array3.Length; i++) { if ((Object)(object)array3[i].enemyPrefab == (Object)null) { Log.LogWarning($"Enemy:{((Object)array3[i]).name}, prefab is null, this may cause issues..."); } EnemyList.Add(((Object)array3[i]).name, array3[i]); } EnemyList.Remove("RedPillEnemyType"); foreach (KeyValuePair<string, EnemyType> enemy in EnemyList) { bool flag = false; foreach (KeyValuePair<EnemyName, string> enemyName in EnemyNameList) { if (enemy.Key == enemyName.Value) { flag = true; break; } } if (!flag) { Log.LogWarning($"Enemy:'{enemy.Key}', isn't matched with enum, this may cause issues..."); } } Log.LogInfo($"Finished generating 'EnemyList', Count:{EnemyList.Count}"); Log.LogInfo("Generating 'ItemList'"); Item[] array4 = Resources.FindObjectsOfTypeAll<Item>().Concat(Object.FindObjectsByType<Item>((FindObjectsInactive)1, (FindObjectsSortMode)1)).ToArray(); Array.Reverse(array4); array4 = (from x in array4 group x by ((Object)x).name into x select x.FirstOrDefault()).ToArray(); for (int j = 0; j < array4.Length; j++) { if ((Object)(object)array4[j].spawnPrefab == (Object)null) { Log.LogWarning($"Item:{((Object)array4[j]).name}, prefab is null, this may cause issues..."); } ItemList.Add(((Object)array4[j]).name, array4[j]); } foreach (KeyValuePair<string, Item> item in ItemList) { bool flag2 = false; foreach (KeyValuePair<ItemName, string> itemName in ItemNameList) { if (item.Key == itemName.Value) { flag2 = true; break; } } if (!flag2) { Log.LogWarning($"Item:'{item.Key}', isn't matched with enum, this may cause issues..."); } } Log.LogInfo($"Finished generating 'ItemList', Count:{ItemList.Count}"); Log.LogInfo("Generating 'ObjectList'"); List<SpawnableMapObject> list = new List<SpawnableMapObject>(); List<SpawnableOutsideObjectWithRarity> list2 = new List<SpawnableOutsideObjectWithRarity>(); SelectableLevel[] levels = StartOfRound.Instance.levels; foreach (SelectableLevel val in levels) { if ((Object)(object)val == (Object)null || val.spawnableMapObjects == null) { continue; } SpawnableMapObject[] array5 = val.spawnableMapObjects; foreach (SpawnableMapObject obj2 in array5) { if (obj2 != null && !((Object)(object)obj2.prefabToSpawn == (Object)null) && list.FindIndex((SpawnableMapObject o) => ((Object)o.prefabToSpawn).name == ((Object)obj2.prefabToSpawn).name) < 0) { list.Add(obj2); } } SpawnableOutsideObjectWithRarity[] spawnableOutsideObjects = val.spawnableOutsideObjects; foreach (SpawnableOutsideObjectWithRarity obj in spawnableOutsideObjects) { if (obj != null && !((Object)(object)obj.spawnableObject == (Object)null) && !((Object)(object)obj.spawnableObject.prefabToSpawn == (Object)null) && list2.FindIndex((SpawnableOutsideObjectWithRarity o) => ((Object)o.spawnableObject.prefabToSpawn).name == ((Object)obj.spawnableObject.prefabToSpawn).name) < 0) { list2.Add(obj); } } } foreach (SpawnableMapObject item2 in list) { ObjectList.Add(((Object)item2.prefabToSpawn).name, item2.prefabToSpawn); } foreach (SpawnableOutsideObjectWithRarity item3 in list2) { ObjectList.Add(((Object)item3.spawnableObject.prefabToSpawn).name, item3.spawnableObject.prefabToSpawn); } foreach (KeyValuePair<string, GameObject> @object in ObjectList) { bool flag3 = false; foreach (KeyValuePair<ObjectName, string> objectName in ObjectNameList) { if (@object.Key == objectName.Value) { flag3 = true; break; } } if (!flag3) { Log.LogWarning($"Object:'{@object.Key}', isn't matched with enum, this may cause issues..."); } } Log.LogInfo($"Finished generating 'ObjectList', Count:{ObjectList.Count}"); Log.LogInfo($"Map Count:{factorySizeMultiplierList.Count}"); Log.LogInfo("Generating configuration"); Configuration.CreateConfig(); generatedList = true; } internal static void generateOriginalValuesLists() { //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Expected O, but got Unknown //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Expected O, but got Unknown //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Expected O, but got Unknown //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0165: Unknown result type (might be due to invalid IL or missing references) //IL_0169: Unknown result type (might be due to invalid IL or missing references) //IL_0196: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Unknown result type (might be due to invalid IL or missing references) if (generatedOrignalValuesList) { return; } SelectableLevel[] levels = StartOfRound.Instance.levels; foreach (SelectableLevel val in levels) { factorySizeMultiplierList.Add(val.factorySizeMultiplier); List<SpawnableItemWithRarity> list = new List<SpawnableItemWithRarity>(); list.AddRange(val.spawnableScrap); float num = 0f; float num2 = 0f; foreach (SpawnableItemWithRarity item in list) { num += (float)((item.spawnableItem.minValue + item.spawnableItem.maxValue) * item.rarity); num2 += (float)item.rarity; } if (num2 != 0f) { averageScrapValueList.Add(num / (num2 * 2f)); } else { averageScrapValueList.Add(80f); } AnimationCurve val2 = new AnimationCurve(); AnimationCurve val3 = new AnimationCurve(); AnimationCurve val4 = new AnimationCurve(); Keyframe[] keys = val.enemySpawnChanceThroughoutDay.keys; foreach (Keyframe val5 in keys) { val2.AddKey(val5); } Keyframe[] keys2 = val.outsideEnemySpawnChanceThroughDay.keys; foreach (Keyframe val6 in keys2) { val3.AddKey(val6); } Keyframe[] keys3 = val.daytimeEnemySpawnChanceThroughDay.keys; foreach (Keyframe val7 in keys3) { val4.AddKey(val7); } insideSpawnChanceCurves.Add(val2); outsideSpawnChanceCurves.Add(val3); daytimeSpawnChanceCurves.Add(val4); insideMaxPowerCounts.Add(val.maxEnemyPowerCount); outsideMaxPowerCounts.Add(val.maxOutsideEnemyPowerCount); daytimeMaxPowerCounts.Add(val.maxDaytimeEnemyPowerCount); spawnableMapObjects.Add(val.spawnableMapObjects); } generatedOrignalValuesList = true; } public static EnemyType GetEnemy(EnemyName name) { return GetEnemy(EnemyNameList[name]); } public static EnemyType GetEnemy(string name) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown if (EnemyList.TryGetValue(name, out EnemyType value)) { return value; } Log.LogWarning("GetEnemy(" + name + ") failed, returning an empty enemy type"); EnemyType val = new EnemyType(); val.enemyName = name; ((Object)val).name = name; return val; } public static EnemyType GetEnemyOrDefault(string name) { if (EnemyList.TryGetValue(name, out EnemyType value)) { return value; } Log.LogWarning("GetEnemyOrDefault(" + name + ") failed, returning kamikazie bug."); return kamikazieBug; } public static Item GetItem(ItemName name) { return GetItem(ItemNameList[name]); } public static Item GetItem(string name) { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Expected O, but got Unknown if (ItemList.TryGetValue(name, out Item value)) { return value; } Log.LogWarning("GetItem(" + name + ") failed, returning an empty item"); Item val = new Item(); val.itemName = name; ((Object)val).name = name; return val; } [Obsolete("Causes the mod to fail, do not use on modded item events", false)] public static Item GetItemByName(string itemName, bool matchCase = true) { StringComparison comparisonType = ((!matchCase) ? StringComparison.OrdinalIgnoreCase : StringComparison.CurrentCulture); foreach (Item items in StartOfRound.Instance.allItemsList.itemsList) { if (items.itemName.Equals(itemName, comparisonType)) { return items; } } return null; } [Obsolete("Causes the mod to fail, do not use on vanilla item events", true)] public static Item GetItemByNameModded(string itemName, bool isModPresent, bool matchCase = true) { if (isModPresent) { StringComparison comparisonType = ((!matchCase) ? StringComparison.OrdinalIgnoreCase : StringComparison.CurrentCulture); foreach (Item items in StartOfRound.Instance.allItemsList.itemsList) { if (items.itemName.Equals(itemName, comparisonType)) { return items; } } return null; } return null; } public static GameObject GetObject(ObjectName name) { return GetObject(ObjectNameList[name]); } public static GameObject GetObject(string name) { //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Expected O, but got Unknown if (ObjectList.TryGetValue(name, out GameObject value)) { return value; } Log.LogWarning("GetObject(" + name + " failed, returning empty gameObject"); return new GameObject(name); } } [HarmonyPatch] public class Net : NetworkBehaviour { public NetworkList<Weather> currentWeatherMultipliers; public NetworkList<OutsideObjectsToSpawn> outsideObjectsToSpawn; public NetworkList<CurrentWeatherEffect> currentWeatherEffects; public NetworkVariable<FixedString4096Bytes> textUI = new NetworkVariable<FixedString4096Bytes>(default(FixedString4096Bytes), (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0); public bool receivedSyncedValues = false; public List<GameObject> objectsToSpawn = new List<GameObject>(); public List<int> objectsToSpawnAmount = new List<int>(); public List<float> objectsToSpawnRadius = new List<float>(); public List<Vector3> objectsToSpawnOffsets = new List<Vector3>(); private float currentIntervalTime = 0f; public int _seed = 49; public static Net Instance { get; private set; } public static GameObject netObject { get; private set; } private void Awake() { currentWeatherMultipliers = new NetworkList<Weather>(); outsideObjectsToSpawn = new NetworkList<OutsideObjectsToSpawn>(); currentWeatherEffects = new NetworkList<CurrentWeatherEffect>(); } private void Update() { //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0090: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) if (currentIntervalTime > 0f) { currentIntervalTime -= Time.deltaTime; } else { currentIntervalTime = 0.5f; if (currentWeatherEffects.Count > 0) { foreach (CurrentWeatherEffect currentWeatherEffect in currentWeatherEffects) { PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if (!((Object)(object)localPlayerController == (Object)null)) { if (localPlayerController.isPlayerDead) { UpdateAtmosphere(currentWeatherEffect.name, state: false); } else if (!localPlayerController.isInsideFactory) { UpdateAtmosphere(currentWeatherEffect.name, currentWeatherEffect.state); } else { UpdateAtmosphere(currentWeatherEffect.name, state: false); } } } } } if (objectsToSpawn.Count > 0) { Manager.Spawn.DoSpawnOutsideObjects(objectsToSpawnAmount[0], objectsToSpawnRadius[0], objectsToSpawnOffsets[0], objectsToSpawn[0]); objectsToSpawn.RemoveAt(0); objectsToSpawnAmount.RemoveAt(0); objectsToSpawnRadius.RemoveAt(0); objectsToSpawnOffsets.RemoveAt(0); } } public override void OnNetworkSpawn() { Instance = this; UI.SpawnObject(); if (((NetworkBehaviour)this).IsServer) { InitalizeCurrentWeatherMultipliersServerRpc(); } ((NetworkBehaviour)this).OnNetworkSpawn(); } public override void OnNetworkDespawn() { UI.Instance.UnsubscribeFromKeyboardEvent(); Object.Destroy((Object)(object)GameObject.Find("EventGUI")); ((NetworkBehaviour)this).OnNetworkDespawn(); } [ClientRpc] public FixedString4096Bytes GetSyncedTextServerRpc() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) return textUI.Value; } [ServerRpc(RequireOwnership = false)] public int GiveSeed() { return _seed++; } [ClientRpc] public void ClearGameObjectsClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(174694319u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 174694319u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } for (int i = 0; i != Manager.objectsToClear.Count; i++) { if (!((Object)(object)Manager.objectsToClear[i] != (Object)null)) { continue; } NetworkObject component = Manager.objectsToClear[i].GetComponent<NetworkObject>(); if ((Object)(object)component != (Object)null) { try { component.Despawn(true); } catch { } } else { try { Object.Destroy((Object)(object)Manager.objectsToClear[i]); } catch { } } } Manager.objectsToClear.Clear(); } [ClientRpc] public void SyncValuesClientRpc(float factorySizeMultiplier, float scrapValueMultiplier, float scrapAmountMultiplier, int bonusMaxHp) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2150416984u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref factorySizeMultiplier, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref scrapValueMultiplier, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref scrapAmountMultiplier, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val2, bonusMaxHp); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2150416984u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { RoundManager.Instance.currentLevel.factorySizeMultiplier = factorySizeMultiplier; Manager.bonusEnemyHp = bonusMaxHp; receivedSyncedValues = true; } } } [ServerRpc] public void SyncScrapValueServerRpc(NetworkObjectReference obj, int value) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_0104: Invalid comparison between Unknown and I4 //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) //IL_0084: Invalid comparison between Unknown and I4 NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { if (((NetworkBehaviour)this).OwnerClientId != networkManager.LocalClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(875794818u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref obj, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val2, value); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 875794818u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { SyncScrapValueClientRpc(obj, value); } } [ClientRpc] private void SyncScrapValueClientRpc(NetworkObjectReference obj, int value) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(268987115u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref obj, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val2, value); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 268987115u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { NetworkObject val3 = default(NetworkObject); ((NetworkObjectReference)(ref obj)).TryGet(ref val3, (NetworkManager)null); ((Component)val3).GetComponent<GrabbableObject>().SetScrapValue(value); } } } [ServerRpc(RequireOwnership = false)] public void GenerateAndSyncTerminalCodeServerRpc(NetworkObjectReference netObject, int code) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2205229909u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref netObject, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val2, code); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2205229909u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { GenerateAndSyncTerminalCodeClientRpc(netObject, code); } } } [ClientRpc] public void GenerateAndSyncTerminalCodeClientRpc(NetworkObjectReference netObject, int code) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3849078077u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<NetworkObjectReference>(ref netObject, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val2, code); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3849078077u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } NetworkObject val3 = null; if (!((NetworkObjectReference)(ref netObject)).TryGet(ref val3, (NetworkManager)null)) { Log.LogError("Network Object is null in GenerateAndSyncTerminalCodeClientRpc()"); return; } TerminalAccessibleObject componentInChildren = ((Component)val3).GetComponentInChildren<TerminalAccessibleObject>(); if ((Object)(object)componentInChildren == (Object)null) { Log.LogError("Terminal Accessible Object is null in GenerateAndSyncTerminalCodeClientRpc()"); return; } componentInChildren.InitializeValues(); componentInChildren.SetCodeTo(code); } [ServerRpc(RequireOwnership = false)] public void MoveTimeServerRpc(float amount, float speedMultiplier = 1f) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2208211795u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref amount, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref speedMultiplier, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2208211795u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { MoveTimeClientRpc(amount, speedMultiplier); } } } [ClientRpc] public void MoveTimeClientRpc(float amount, float speedMultiplier) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3436861046u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref amount, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref speedMultiplier, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3436861046u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { Manager.moveTime = true; Manager.moveTimeAmount += amount; Manager.timeSpeedMultiplier *= speedMultiplier; } } } private void UpdateAtmosphere(FixedString128Bytes name, bool state) { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < TimeOfDay.Instance.effects.Length; i++) { FixedString128Bytes val = FixedString128Bytes.op_Implicit(TimeOfDay.Instance.effects[i].name); if ((ref val) == (ref name)) { TimeOfDay.Instance.effects[i].effectEnabled = state; } } } [ClientRpc] public void ShowCaseEventsClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1744607847u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1744607847u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { UI.Instance.curretShowCaseEventTime = UI.Instance.showCaseEventTime; UI.Instance.TogglePanel(state: true); UI.Instance.panelScrollBar.value = 1f; UI.Instance.showCaseEvents = true; } } } [ServerRpc(RequireOwnership = false)] private void InitalizeCurrentWeatherMultipliersServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1335262659u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1335262659u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { currentWeatherMultipliers = Weather.InitalizeWeatherMultipliers(currentWeatherMultipliers); UpdateCurrentWeatherMultipliersServerRpc(); } } } [ServerRpc(RequireOwnership = false)] public void UpdateCurrentWeatherMultipliersServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(466041418u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 466041418u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { currentWeatherMultipliers = Weather.RandomizeWeatherMultipliers(currentWeatherMultipliers); } } } [ServerRpc(RequireOwnership = false)] public void SetRecievedServerRpc(bool state) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1853859009u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref state, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1853859009u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { SetRecievedClientRpc(state); } } } [ClientRpc] public void SetRecievedClientRpc(bool state) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(603622741u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref state, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 603622741u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { receivedSyncedValues = state; } } } [ServerRpc(RequireOwnership = false)] public void SetRealityShiftActiveServerRpc(bool state) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(4203994123u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref state, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 4203994123u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { SetRealityShiftActiveClientRpc(state); } } } [ClientRpc] public void SetRealityShiftActiveClientRpc(bool state) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2568149201u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref state, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2568149201u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { BrutalCompanyMinus.Minus.Events.RealityShift.Active = state; } } } [ServerRpc(RequireOwnership = false)] public void SetAllWeatherActiveServerRpc(bool state) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1050877662u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref state, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1050877662u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { SetAllWeatherActiveClientRpc(state); } } } [ClientRpc] public void SetAllWeatherActiveClientRpc(bool state) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1627891447u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref state, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1627891447u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { BrutalCompanyMinus.Minus.Events.AllWeather.Active = state; } } } [ServerRpc(RequireOwnership = false)] public void MessWithLightsServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3368901509u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3368901509u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { MessWithLightsClientRpc(); } } } [ClientRpc] public void MessWithLightsClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2808903510u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2808903510u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { RoundManager.Instance.FlickerLights(true, true); } } } [ServerRpc(RequireOwnership = false)] public void MessWithBreakerServerRpc(bool state) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3941924814u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref state, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3941924814u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { MessWithBreakerClientRpc(state); } } } [ClientRpc] public void MessWithBreakerClientRpc(bool state) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3457555438u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref state, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3457555438u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { BreakerBox val3 = Object.FindObjectOfType<BreakerBox>(); if ((Object)(object)val3 != (Object)null) { val3.SetSwitchesOff(); RoundManager.Instance.TurnOnAllLights(state); } } } [ServerRpc(RequireOwnership = false)] public void MessWithDoorsServerRpc(float openCloseChance, bool messWithLock = false, float messWithLockChance = 0f) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2842285472u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref openCloseChance, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref messWithLock, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref messWithLockChance, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2842285472u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { if (_seed == 0) { _seed = StartOfRound.Instance.randomMapSeed; } _seed++; MessWithDoorsClientRpc(openCloseChance, _seed, messWithLock, messWithLockChance); } } [ClientRpc] public void MessWithDoorsClientRpc(float openCloseChance, int seed, bool messWithLock, float messWithLockChance) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1683303265u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref openCloseChance, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val2, seed); ((FastBufferWriter)(ref val2)).WriteValueSafe<bool>(ref messWithLock, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe<float>(ref messWithLockChance, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1683303265u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } DoorLock[] array = Object.FindObjectsOfType<DoorLock>(); Random random = new Random(seed); DoorLock[] array2 = array; foreach (DoorLock val3 in array2) { if ((Object)(object)val3 == (Object)null || random.NextDouble() <= (double)openCloseChance) { continue; } if (messWithLock && random.NextDouble() <= (double)messWithLockChance) { if (random.Next(0, 2) == 0) { val3.LockDoor(30f); } else { val3.UnlockDoor(); } break; } if (!val3.isLocked) { ((Component)val3).gameObject.GetComponent<AnimatedObjectTrigger>().TriggerAnimationNonPlayer(false, true, false); val3.SetDoorAsOpen(Convert.ToBoolean(random.Next(0, 2))); } } } [ServerRpc(RequireOwnership = false)] public void UnlockAndOpenAllDoorsServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1559123307u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1559123307u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { TerminalAccessibleObject[] array = Object.FindObjectsOfType<TerminalAccessibleObject>(); TerminalAccessibleObject[] array2 = array; foreach (TerminalAccessibleObject val3 in array2) { val3.SetDoorOpenServerRpc(true); } UnlockAndOpenAllDoorsClientRpc(); } } [ClientRpc] public void UnlockAndOpenAllDoorsClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(969155834u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 969155834u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 2 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } DoorLock[] array = Object.FindObjectsOfType<DoorLock>(); DoorLock[] array2 = array; foreach (DoorLock val3 in array2) { if (!((Object)(object)val3 == (Object)null)) { if (val3.isLocked) { val3.UnlockDoor(); } ((Component)val3).gameObject.GetComponent<AnimatedObjectTrigger>().TriggerAnimationNonPlayer(false, true, false); val3.SetDoorAsOpen(true); } } } [ServerRpc(RequireOwnership = false)] public void SpawnMudPilesOutsideServerRpc(int amount) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Unknown result type (might be due to invalid IL or missing references) //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_0138: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3079998733u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, amount); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3079998733u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { NavMeshHit val3 = default(NavMeshHit); Random random = new Random(_seed++); for (int i = 0; i < amount; i++) { Vector3 position = RoundManager.Instance.outsideAINodes[random.Next(0, RoundManager.Instance.outsideAINodes.Length)].transform.position; Vector3 position2 = RoundManager.Instance.GetRandomNavMeshPositionInBoxPredictable(position, 30f, val3, random, -1) + Vector3.up; SpawnMudPilesOutsideClientRpc(position2, _seed++); } } } [ClientRpc] public void SpawnMudPilesOutsideClientRpc(Vector3 position, int seed) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 2 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1000423920u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref position); BytePacker.WriteValueBitPacked(val2, seed); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1000423920u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 2 && (networkManager.IsClient || networkManager.IsHost)) { Object.Instantiate<GameObject>(RoundManager.Instance.quicksandPrefab, position, Quaternion.identity, RoundManager.Instance.mapPropsContainer.transform); } } } [ServerRpc(RequireOwnership = false)] public void TeleportEnemyServerRpc(NetworkObjectReference enemy, Vector3 position) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068:
BCMECodeSecurityCheck.dll
Decompiled 10 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BCMECodeSecurityCheck.Methods; using BCMECodeSecurityCheck.Modules; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Logging; using BrutalCompanyMinus.Minus; using BrutalCompanyMinus.Minus.Events; using BrutalCompanyMinus.Minus.Handlers; using GameNetcodeStuff; using HarmonyLib; using LethalNetworkAPI; using Microsoft.CodeAnalysis; using TMPro; using TerminalApi; using TerminalApi.Classes; using Unity.Netcode; using UnityEngine; using UnityEngine.SceneManagement; using UnityEngine.UI; using com.github.zehsteam.Whiteboard.MonoBehaviours; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("BCMECodeSecurityCheck")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("BCMECodeSecurityCheck")] [assembly: AssemblyTitle("BCMECodeSecurityCheck")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Parameter | AttributeTargets.ReturnValue | AttributeTargets.GenericParameter, AllowMultiple = false, Inherited = false)] internal sealed class NullableAttribute : Attribute { public readonly byte[] NullableFlags; public NullableAttribute(byte P_0) { NullableFlags = new byte[1] { P_0 }; } public NullableAttribute(byte[] P_0) { NullableFlags = P_0; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class NullableContextAttribute : Attribute { public readonly byte Flag; public NullableContextAttribute(byte P_0) { Flag = P_0; } } } namespace BCMECodeSecurityCheck { internal class Log { internal static ManualLogSource logSource; internal static void Initalize(ManualLogSource LogSource) { logSource = LogSource; } internal static void LogDebug(object data) { logSource.LogDebug(data); } internal static void LogError(object data) { logSource.LogError(data); } internal static void LogFatal(object data) { logSource.LogFatal(data); } internal static void LogInfo(object data) { logSource.LogInfo(data); } internal static void LogMessage(object data) { logSource.LogMessage(data); } internal static void LogWarning(object data) { logSource.LogWarning(data); } } [BepInPlugin("BCMECodeSecurityCheck", "BCMECodeSecurityCheck-UnloadedHangar", "0.5.7")] public class BCMECodeSecurityCheck : BaseUnityPlugin { public static class PluginInfo { public const string Guid = "BCMECodeSecurityCheck"; public const string Name = "BCMECodeSecurityCheck-UnloadedHangar"; public const string Ver = "0.5.7"; } public enum Mode { Client, Server, Both, Disabled } private Harmony _harmony; private void Awake() { //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_007f: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Expected O, but got Unknown //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Expected O, but got Unknown //IL_00c9: 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_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Expected O, but got Unknown //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_013c: Expected O, but got Unknown //IL_0142: Unknown result type (might be due to invalid IL or missing references) //IL_0147: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Unknown result type (might be due to invalid IL or missing references) //IL_016d: Expected O, but got Unknown //IL_0173: Unknown result type (might be due to invalid IL or missing references) //IL_0178: Unknown result type (might be due to invalid IL or missing references) //IL_018b: Unknown result type (might be due to invalid IL or missing references) //IL_019e: Expected O, but got Unknown //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01a9: Unknown result type (might be due to invalid IL or missing references) //IL_01bc: Unknown result type (might be due to invalid IL or missing references) //IL_01cf: Expected O, but got Unknown //IL_01d5: Unknown result type (might be due to invalid IL or missing references) //IL_01da: Unknown result type (might be due to invalid IL or missing references) //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_0200: Expected O, but got Unknown //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_020b: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Expected O, but got Unknown //IL_0237: Unknown result type (might be due to invalid IL or missing references) //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_024f: Unknown result type (might be due to invalid IL or missing references) //IL_0262: Expected O, but got Unknown //IL_0268: Unknown result type (might be due to invalid IL or missing references) //IL_026d: Unknown result type (might be due to invalid IL or missing references) //IL_0280: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Expected O, but got Unknown //IL_0299: Unknown result type (might be due to invalid IL or missing references) //IL_029e: Unknown result type (might be due to invalid IL or missing references) //IL_02b1: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Expected O, but got Unknown //IL_02ca: Unknown result type (might be due to invalid IL or missing references) //IL_02cf: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Unknown result type (might be due to invalid IL or missing references) //IL_02f5: Expected O, but got Unknown //IL_02fb: Unknown result type (might be due to invalid IL or missing references) //IL_0300: Unknown result type (might be due to invalid IL or missing references) //IL_0313: Unknown result type (might be due to invalid IL or missing references) //IL_0326: Expected O, but got Unknown //IL_032c: Unknown result type (might be due to invalid IL or missing references) //IL_0331: Unknown result type (might be due to invalid IL or missing references) //IL_0344: Unknown result type (might be due to invalid IL or missing references) //IL_0357: Expected O, but got Unknown //IL_035d: Unknown result type (might be due to invalid IL or missing references) //IL_0362: Unknown result type (might be due to invalid IL or missing references) //IL_0375: Unknown result type (might be due to invalid IL or missing references) //IL_0388: Expected O, but got Unknown //IL_038e: Unknown result type (might be due to invalid IL or missing references) //IL_0393: Unknown result type (might be due to invalid IL or missing references) //IL_03a6: Unknown result type (might be due to invalid IL or missing references) //IL_03b9: Expected O, but got Unknown //IL_03bf: Unknown result type (might be due to invalid IL or missing references) //IL_03c4: Unknown result type (might be due to invalid IL or missing references) //IL_03d7: Unknown result type (might be due to invalid IL or missing references) //IL_03ea: Expected O, but got Unknown //IL_03f0: Unknown result type (might be due to invalid IL or missing references) //IL_03f5: Unknown result type (might be due to invalid IL or missing references) //IL_0408: Unknown result type (might be due to invalid IL or missing references) //IL_041b: Expected O, but got Unknown //IL_0421: Unknown result type (might be due to invalid IL or missing references) //IL_0426: Unknown result type (might be due to invalid IL or missing references) //IL_0439: Unknown result type (might be due to invalid IL or missing references) //IL_044c: Expected O, but got Unknown //IL_0452: Unknown result type (might be due to invalid IL or missing references) //IL_0457: Unknown result type (might be due to invalid IL or missing references) //IL_046a: Unknown result type (might be due to invalid IL or missing references) //IL_047d: Expected O, but got Unknown //IL_0483: Unknown result type (might be due to invalid IL or missing references) //IL_0488: Unknown result type (might be due to invalid IL or missing references) //IL_049b: Unknown result type (might be due to invalid IL or missing references) //IL_04ae: Expected O, but got Unknown //IL_04b4: Unknown result type (might be due to invalid IL or missing references) //IL_04b9: Unknown result type (might be due to invalid IL or missing references) //IL_04cc: Unknown result type (might be due to invalid IL or missing references) //IL_04df: Expected O, but got Unknown //IL_04e5: Unknown result type (might be due to invalid IL or missing references) //IL_04ea: Unknown result type (might be due to invalid IL or missing references) //IL_04fd: Unknown result type (might be due to invalid IL or missing references) //IL_0510: Expected O, but got Unknown //IL_0516: Unknown result type (might be due to invalid IL or missing references) //IL_051b: Unknown result type (might be due to invalid IL or missing references) //IL_052e: Unknown result type (might be due to invalid IL or missing references) //IL_0541: Expected O, but got Unknown //IL_0547: Unknown result type (might be due to invalid IL or missing references) //IL_054c: Unknown result type (might be due to invalid IL or missing references) //IL_055f: Unknown result type (might be due to invalid IL or missing references) //IL_0572: Expected O, but got Unknown //IL_0578: Unknown result type (might be due to invalid IL or missing references) //IL_057d: Unknown result type (might be due to invalid IL or missing references) //IL_0590: Unknown result type (might be due to invalid IL or missing references) //IL_05a3: Expected O, but got Unknown //IL_05a9: Unknown result type (might be due to invalid IL or missing references) //IL_05ae: Unknown result type (might be due to invalid IL or missing references) //IL_05c1: Unknown result type (might be due to invalid IL or missing references) //IL_05d4: Expected O, but got Unknown //IL_05da: Unknown result type (might be due to invalid IL or missing references) //IL_05df: Unknown result type (might be due to invalid IL or missing references) //IL_05f2: Unknown result type (might be due to invalid IL or missing references) //IL_0605: Expected O, but got Unknown //IL_060b: Unknown result type (might be due to invalid IL or missing references) //IL_0610: Unknown result type (might be due to invalid IL or missing references) //IL_0623: Unknown result type (might be due to invalid IL or missing references) //IL_0636: Expected O, but got Unknown //IL_063c: Unknown result type (might be due to invalid IL or missing references) //IL_0641: Unknown result type (might be due to invalid IL or missing references) //IL_0654: Unknown result type (might be due to invalid IL or missing references) //IL_0667: Expected O, but got Unknown //IL_066d: Unknown result type (might be due to invalid IL or missing references) //IL_0672: Unknown result type (might be due to invalid IL or missing references) //IL_0685: Unknown result type (might be due to invalid IL or missing references) //IL_0698: Expected O, but got Unknown //IL_069e: Unknown result type (might be due to invalid IL or missing references) //IL_06a3: Unknown result type (might be due to invalid IL or missing references) //IL_06b6: Unknown result type (might be due to invalid IL or missing references) //IL_06c9: Expected O, but got Unknown //IL_06cf: Unknown result type (might be due to invalid IL or missing references) //IL_06d4: Unknown result type (might be due to invalid IL or missing references) //IL_06e7: Unknown result type (might be due to invalid IL or missing references) //IL_06fa: Expected O, but got Unknown //IL_0700: Unknown result type (might be due to invalid IL or missing references) //IL_0705: Unknown result type (might be due to invalid IL or missing references) //IL_0718: Unknown result type (might be due to invalid IL or missing references) //IL_072b: Expected O, but got Unknown //IL_0731: Unknown result type (might be due to invalid IL or missing references) //IL_0736: Unknown result type (might be due to invalid IL or missing references) //IL_0749: Unknown result type (might be due to invalid IL or missing references) //IL_075c: Expected O, but got Unknown //IL_0762: Unknown result type (might be due to invalid IL or missing references) //IL_0767: Unknown result type (might be due to invalid IL or missing references) //IL_077a: Unknown result type (might be due to invalid IL or missing references) //IL_078d: Expected O, but got Unknown //IL_0793: Unknown result type (might be due to invalid IL or missing references) //IL_0798: Unknown result type (might be due to invalid IL or missing references) //IL_07ab: Unknown result type (might be due to invalid IL or missing references) //IL_07be: Expected O, but got Unknown //IL_07c4: Unknown result type (might be due to invalid IL or missing references) //IL_07c9: Unknown result type (might be due to invalid IL or missing references) //IL_07dc: Unknown result type (might be due to invalid IL or missing references) //IL_07ef: Expected O, but got Unknown //IL_07f5: Unknown result type (might be due to invalid IL or missing references) //IL_07fa: Unknown result type (might be due to invalid IL or missing references) //IL_080d: Unknown result type (might be due to invalid IL or missing references) //IL_0820: Expected O, but got Unknown //IL_0826: Unknown result type (might be due to invalid IL or missing references) //IL_082b: Unknown result type (might be due to invalid IL or missing references) //IL_083e: Unknown result type (might be due to invalid IL or missing references) //IL_0851: Expected O, but got Unknown //IL_0857: Unknown result type (might be due to invalid IL or missing references) //IL_085c: Unknown result type (might be due to invalid IL or missing references) //IL_086f: Unknown result type (might be due to invalid IL or missing references) //IL_0882: Expected O, but got Unknown //IL_0888: Unknown result type (might be due to invalid IL or missing references) //IL_088d: Unknown result type (might be due to invalid IL or missing references) //IL_08a0: Unknown result type (might be due to invalid IL or missing references) //IL_08b3: Expected O, but got Unknown //IL_08b9: Unknown result type (might be due to invalid IL or missing references) //IL_08be: Unknown result type (might be due to invalid IL or missing references) //IL_08d1: Unknown result type (might be due to invalid IL or missing references) //IL_08e4: Expected O, but got Unknown //IL_08ea: Unknown result type (might be due to invalid IL or missing references) //IL_08ef: Unknown result type (might be due to invalid IL or missing references) //IL_0902: Unknown result type (might be due to invalid IL or missing references) //IL_0915: Expected O, but got Unknown //IL_091b: Unknown result type (might be due to invalid IL or missing references) //IL_0920: Unknown result type (might be due to invalid IL or missing references) //IL_0933: Unknown result type (might be due to invalid IL or missing references) //IL_0946: Expected O, but got Unknown //IL_094c: Unknown result type (might be due to invalid IL or missing references) //IL_0951: Unknown result type (might be due to invalid IL or missing references) //IL_0964: Unknown result type (might be due to invalid IL or missing references) //IL_0977: Expected O, but got Unknown //IL_097d: Unknown result type (might be due to invalid IL or missing references) //IL_0982: Unknown result type (might be due to invalid IL or missing references) //IL_0995: Unknown result type (might be due to invalid IL or missing references) //IL_09a8: Expected O, but got Unknown //IL_09ae: Unknown result type (might be due to invalid IL or missing references) //IL_09b3: Unknown result type (might be due to invalid IL or missing references) //IL_09c6: Unknown result type (might be due to invalid IL or missing references) //IL_09d9: Expected O, but got Unknown //IL_09df: Unknown result type (might be due to invalid IL or missing references) //IL_09e4: Unknown result type (might be due to invalid IL or missing references) //IL_09f7: Unknown result type (might be due to invalid IL or missing references) //IL_0a0a: Expected O, but got Unknown //IL_0a10: Unknown result type (might be due to invalid IL or missing references) //IL_0a15: Unknown result type (might be due to invalid IL or missing references) //IL_0a28: Unknown result type (might be due to invalid IL or missing references) //IL_0a3b: Expected O, but got Unknown //IL_0a41: Unknown result type (might be due to invalid IL or missing references) //IL_0a46: Unknown result type (might be due to invalid IL or missing references) //IL_0a59: Unknown result type (might be due to invalid IL or missing references) //IL_0a6c: Expected O, but got Unknown //IL_0a72: Unknown result type (might be due to invalid IL or missing references) //IL_0a77: Unknown result type (might be due to invalid IL or missing references) //IL_0a8a: Unknown result type (might be due to invalid IL or missing references) //IL_0a9d: Expected O, but got Unknown //IL_0aa3: Unknown result type (might be due to invalid IL or missing references) //IL_0aa8: Unknown result type (might be due to invalid IL or missing references) //IL_0abb: Unknown result type (might be due to invalid IL or missing references) //IL_0ace: Expected O, but got Unknown //IL_0ad4: Unknown result type (might be due to invalid IL or missing references) //IL_0ad9: Unknown result type (might be due to invalid IL or missing references) //IL_0aec: Unknown result type (might be due to invalid IL or missing references) //IL_0aff: Expected O, but got Unknown //IL_0b05: Unknown result type (might be due to invalid IL or missing references) //IL_0b0a: Unknown result type (might be due to invalid IL or missing references) //IL_0b1d: Unknown result type (might be due to invalid IL or missing references) //IL_0b30: Expected O, but got Unknown //IL_0b36: Unknown result type (might be due to invalid IL or missing references) //IL_0b3b: Unknown result type (might be due to invalid IL or missing references) //IL_0b61: Unknown result type (might be due to invalid IL or missing references) //IL_0b74: Expected O, but got Unknown //IL_0b7a: Unknown result type (might be due to invalid IL or missing references) //IL_0b7f: Unknown result type (might be due to invalid IL or missing references) //IL_0ba5: Unknown result type (might be due to invalid IL or missing references) //IL_0bb8: Expected O, but got Unknown //IL_0bbe: Unknown result type (might be due to invalid IL or missing references) //IL_0bc3: Unknown result type (might be due to invalid IL or missing references) //IL_0bd6: Unknown result type (might be due to invalid IL or missing references) //IL_0be9: Expected O, but got Unknown //IL_0bef: Unknown result type (might be due to invalid IL or missing references) //IL_0bf4: Unknown result type (might be due to invalid IL or missing references) //IL_0c07: Unknown result type (might be due to invalid IL or missing references) //IL_0c1a: Expected O, but got Unknown //IL_0c20: Unknown result type (might be due to invalid IL or missing references) //IL_0c25: Unknown result type (might be due to invalid IL or missing references) //IL_0c38: Unknown result type (might be due to invalid IL or missing references) //IL_0c4b: Expected O, but got Unknown //IL_0c51: Unknown result type (might be due to invalid IL or missing references) //IL_0c56: Unknown result type (might be due to invalid IL or missing references) //IL_0c7c: Unknown result type (might be due to invalid IL or missing references) //IL_0c8f: Expected O, but got Unknown //IL_0c95: Unknown result type (might be due to invalid IL or missing references) //IL_0c9a: Unknown result type (might be due to invalid IL or missing references) //IL_0cc0: Unknown result type (might be due to invalid IL or missing references) //IL_0cd3: Expected O, but got Unknown //IL_0ce0: Unknown result type (might be due to invalid IL or missing references) //IL_0cea: Expected O, but got Unknown int SecCode = (int)Random.Range(10000f, 90000f); ((BaseUnityPlugin)this).Logger.LogInfo((object)"BCMECodeSecurityCheck loaded"); ((BaseUnityPlugin)this).Logger.LogWarning((object)"BCMECodeSecurityCheck security check complete"); Log.Initalize(((BaseUnityPlugin)this).Logger); Mode ModeVar = Mode.Disabled; TerminalApi.AddCommand("DebugMode" + SecCode, new CommandInfo { DisplayTextSupplier = delegate { ModeVar = Mode.Server; StartOfRoundPatches.LightsNetworkClientMessage.SendServer(6); return $"Switching mode...\n\n Current mode: \n{ModeVar}\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("Radiation", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.MalfunctionPowerNetworkClientMessage.SendServer(1); return "Radiation overlay called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.MalfunctionPowerNetworkClientMessage.SendServer(1); StartOfRoundPatches.MalfunctionPowerNetworkClientMessage.SendAllClients(1, true, false); return "Radiation overlay called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.MalfunctionPowerNetworkClientMessage.SendAllClients(1, true, false); return "Radiation overlay called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("QuotaR", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendServer(1); return "Random quota overlay called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendServer(1); StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendAllClients(1, true, false); return "Random quota overlay called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendAllClients(1, true, false); return "Random quota overlay called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); int daysAmount = 0; TerminalApi.AddCommand("Quota" + daysAmount, new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.QuotaDaysOverlayNegativeNetworkClientMessage.SendServer(daysAmount); return "Configurable quota overlay called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.QuotaDaysOverlayNegativeNetworkClientMessage.SendServer(daysAmount); StartOfRoundPatches.QuotaDaysOverlayNegativeNetworkClientMessage.SendAllClients(daysAmount, true, false); return "Configurable quota overlay called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.QuotaDaysOverlayNegativeNetworkClientMessage.SendAllClients(daysAmount, true, false); return "Configurable quota overlay called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("Add", new CommandInfo { DisplayTextSupplier = delegate { daysAmount++; return "Variable increased\n\n" + daysAmount; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("Minus", new CommandInfo { DisplayTextSupplier = delegate { daysAmount--; return "Variable decreased\n\n" + daysAmount; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("Add10", new CommandInfo { DisplayTextSupplier = delegate { daysAmount += 10; return "Variable increased\n\n" + daysAmount; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("Minus10", new CommandInfo { DisplayTextSupplier = delegate { daysAmount -= 10; return "Variable decreased\n\n" + daysAmount; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("Variable", new CommandInfo { DisplayTextSupplier = () => "Displaying variable\n\n" + daysAmount, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("Reset", new CommandInfo { DisplayTextSupplier = delegate { daysAmount = 0; return "Variable reset. \nStatus: " + daysAmount; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("TipR", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(1); return "Random name tip overlay called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(1); StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(1, true, false); return "Random name tip overlay called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(1, true, false); return "Random name tip overlay called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("TipRi", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(2); return "Random name tip overlay called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(2); StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(2, true, false); return "Random name tip overlay called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(2, true, false); return "Random name tip overlay called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("War", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.LightsNetworkClientMessage.SendServer(1); return "CC warning called called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.LightsNetworkClientMessage.SendServer(1); StartOfRoundPatches.LightsNetworkClientMessage.SendAllClients(1, true, false); return "CC warning called called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.LightsNetworkClientMessage.SendAllClients(1, true, false); return "CC warning called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("ToilNot", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.LightsNetworkClientMessage.SendServer(2); return "Toil Master called called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.LightsNetworkClientMessage.SendServer(2); StartOfRoundPatches.LightsNetworkClientMessage.SendAllClients(2, true, false); return "Toil Master called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.LightsNetworkClientMessage.SendAllClients(2, true, false); return "Toil Master called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("Toil2", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.LightsNetworkClientMessage.SendServer(3); return "Toil Master called called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.LightsNetworkClientMessage.SendServer(3); StartOfRoundPatches.LightsNetworkClientMessage.SendAllClients(3, true, false); return "Toil Master called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.LightsNetworkClientMessage.SendAllClients(3, true, false); return "Toil Master called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("Watcher", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.LightsNetworkClientMessage.SendServer(4); return "Watcher called called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.LightsNetworkClientMessage.SendServer(4); StartOfRoundPatches.LightsNetworkClientMessage.SendAllClients(4, true, false); return "Watcher called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.LightsNetworkClientMessage.SendAllClients(4, true, false); return "Watcher called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("Watcher2", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.LightsNetworkClientMessage.SendServer(5); return "Watcher called called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.LightsNetworkClientMessage.SendServer(5); StartOfRoundPatches.LightsNetworkClientMessage.SendAllClients(5, true, false); return "Watcher called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.LightsNetworkClientMessage.SendAllClients(5, true, false); return "Watcher called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("KillLights", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.KillLightsNetworkClientMessage.SendServer(1); return "Kill lights called called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.KillLightsNetworkClientMessage.SendServer(1); StartOfRoundPatches.KillLightsNetworkClientMessage.SendAllClients(1, true, false); return "Kill lights called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.KillLightsNetworkClientMessage.SendAllClients(1, true, false); return "Kill lights called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("BootLights", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.KillLightsNetworkClientMessage.SendServer(2); return "Boot lights called called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.KillLightsNetworkClientMessage.SendServer(2); StartOfRoundPatches.KillLightsNetworkClientMessage.SendAllClients(2, true, false); return "Boot lights called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.KillLightsNetworkClientMessage.SendAllClients(2, true, false); return "Boot lights called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("FlickerLights", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.KillLightsNetworkClientMessage.SendServer(3); return "Flicker lights called called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.KillLightsNetworkClientMessage.SendServer(3); StartOfRoundPatches.KillLightsNetworkClientMessage.SendAllClients(3, true, false); return "Flicker lights called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.KillLightsNetworkClientMessage.SendAllClients(3, true, false); return "Flicker lights called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("ModeSwitch", new CommandInfo { DisplayTextSupplier = delegate { switch (ModeVar) { case Mode.Client: ModeVar = Mode.Server; break; case Mode.Server: ModeVar = Mode.Both; break; case Mode.Both: ModeVar = Mode.Client; break; } return $"Switching mode...\n\n Current mode: \n{ModeVar}\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("WeatherFlooded", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendServer(2); return "Weather flooded called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendServer(2); StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendAllClients(2, true, false); return "Weather flooded called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendAllClients(2, true, false); return "Weather flooded called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("WeatherStormy", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendServer(3); return "Weather stormy called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendServer(3); StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendAllClients(3, true, false); return "Weather stormy called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendAllClients(3, true, false); return "Weather stormy called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("WeatherEclipsed", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendServer(4); return "Weather eclipsed called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendServer(4); StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendAllClients(4, true, false); return "Weather eclipsed called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendAllClients(4, true, false); return "Weather eclipsed called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("WeatherRainy", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendServer(5); return "Weather rainy called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendServer(5); StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendAllClients(5, true, false); return "Weather rainy called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendAllClients(5, true, false); return "Weather rainy called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("WeatherFoggy", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendServer(6); return "Weather foggy called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendServer(6); StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendAllClients(6, true, false); return "Weather foggy called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendAllClients(6, true, false); return "Weather foggy called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("WeatherDustClouds", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendServer(7); return "Weather dust clouds called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendServer(7); StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendAllClients(7, true, false); return "Weather dust clouds called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendAllClients(7, true, false); return "Weather dust clouds called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("WeatherNone", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendServer(8); return "Weather none called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendServer(8); StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendAllClients(8, true, false); return "Weather none called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendAllClients(8, true, false); return "Weather none called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("DetonateJet", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendServer(9); return "Weather none called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendServer(9); StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendAllClients(9, true, false); return "Weather none called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendAllClients(9, true, false); return "Weather none called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("AlarmSFX", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendServer(10); return "Weather none called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendServer(10); StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendAllClients(10, true, false); return "Weather none called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendAllClients(10, true, false); return "Weather none called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("ModeView", new CommandInfo { DisplayTextSupplier = () => $"Current mode: \n{ModeVar}\n", Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("PowerSurge", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendServer(11); return "Door open called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendServer(11); StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendAllClients(11, true, false); return "Door open called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendAllClients(11, true, false); return "Door open called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("PullShipLever", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendServer(12); return "Door open called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendServer(12); StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendAllClients(12, true, false); return "Door open called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendAllClients(12, true, false); return "Door open called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("HazardsOff", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendServer(13); return "Door open called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendServer(13); StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendAllClients(13, true, false); return "Door open called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendAllClients(13, true, false); return "Door open called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("DoorToggle", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendServer(14); return "Door open called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendServer(14); StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendAllClients(14, true, false); return "Door open called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendAllClients(14, true, false); return "Door open called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("LockDoors", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendServer(15); return "Door open called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendServer(15); StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendAllClients(15, true, false); return "Door open called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendAllClients(15, true, false); return "Door open called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("UnlockDoors", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendServer(16); return "Door open called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendServer(16); StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendAllClients(16, true, false); return "Door open called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.QuotaDaysOverlayNetworkClientMessage.SendAllClients(16, true, false); return "Door open called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("Guilt1", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(3); return "Random name tip overlay called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(3); StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(3, true, false); return "Random name tip overlay called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(3, true, false); return "Random name tip overlay called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("Guilt2", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(4); return "Random name tip overlay called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(4); StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(4, true, false); return "Random name tip overlay called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(4, true, false); return "Random name tip overlay called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("Guilt3", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(5); return "Random name tip overlay called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(5); StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(5, true, false); return "Random name tip overlay called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(5, true, false); return "Random name tip overlay called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("Hijack", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(6); return "Random name tip overlay called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(6); StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(6, true, false); return "Random name tip overlay called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(6, true, false); return "Random name tip overlay called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("DeadRevive", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(14); return "Random name tip overlay called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(14); StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(14, true, false); return "Random name tip overlay called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(14, true, false); return "Random name tip overlay called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("DaysAdd", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(9); return "Random name tip overlay called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(9); StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(9, true, false); return "Random name tip overlay called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(9, true, false); return "Random name tip overlay called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("Mirrors", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(13); return "Random name tip overlay called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(13); StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(13, true, false); return "Random name tip overlay called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(13, true, false); return "Random name tip overlay called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("DaysRemove", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(10); return "Random name tip overlay called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(10); StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(10, true, false); return "Random name tip overlay called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(10, true, false); return "Random name tip overlay called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("CreditsAdd", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(11); return "Random name tip overlay called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(11); StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(11, true, false); return "Random name tip overlay called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(11, true, false); return "Random name tip overlay called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("CreditsRemove", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(12); return "Random name tip overlay called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(12); StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(12, true, false); return "Random name tip overlay called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(12, true, false); return "Random name tip overlay called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("NameRed", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(15); return "Random name tip overlay called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(15); StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(15, true, false); return "Random name tip overlay called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(15, true, false); return "Random name tip overlay called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("Invul", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(16); return "Random name tip overlay called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(16); StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(16, true, false); return "Random name tip overlay called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(16, true, false); return "Random name tip overlay called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("Imp", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(17); return "Random name tip overlay called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(17); StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(17, true, false); return "Random name tip overlay called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(17, true, false); return "Random name tip overlay called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("ShipLeaveDead", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(18); return "Random name tip overlay called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(18); StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(18, true, false); return "Random name tip overlay called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(18, true, false); return "Random name tip overlay called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("Kidnap", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(21); return "Random name tip overlay called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(21); StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(21, true, false); return "Random name tip overlay called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(21, true, false); return "Random name tip overlay called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("NameModifyRed", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(22); return "Random name tip overlay called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(22); StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(22, true, false); return "Random name tip overlay called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(22, true, false); return "Random name tip overlay called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("RepairJet", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(23); return "Random name tip overlay called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(23); StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(23, true, false); return "Random name tip overlay called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(23, true, false); return "Random name tip overlay called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("ShipLeaveMidnight", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(19); return "Random name tip overlay called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(19); StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(19, true, false); return "Random name tip overlay called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(19, true, false); return "Random name tip overlay called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("Fired", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Server) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(20); return "Eject called in server mode\n\n"; } if (ModeVar == Mode.Both) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(20); StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(20, true, false); return "Eject called on both server and clients\n\n"; } if (ModeVar == Mode.Client) { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendAllClients(20, true, false); return "Eject called in client mode\n\n"; } return (ModeVar == Mode.Disabled) ? "Access Denied! Debug mode is NOT enabled!\n\n" : "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("ElevatorDown", new CommandInfo { DisplayTextSupplier = delegate { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(7); return "Calling elevator down\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("ElevatorUp", new CommandInfo { DisplayTextSupplier = delegate { StartOfRoundPatches.TipOverlayNetworkClientMessage.SendServer(8); return "Calling elevator up\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("Dump", new CommandInfo { DisplayTextSupplier = delegate { Log.LogError(((object)RoundManager.Instance.currentLevel).ToString()); Log.LogError(SecCode); return "Proceed with next command\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("IcarusBoot", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Disabled) { return "Access Denied! Debug mode is NOT enabled!\n\n"; } StartOfRoundPatches.KillLightsNetworkClientMessage.SendServer(4); StartOfRoundPatches.KillLightsNetworkClientMessage.SendAllClients(4, true, false); return "Icarus online\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("IcarusKill", new CommandInfo { DisplayTextSupplier = delegate { if (ModeVar == Mode.Disabled) { return "Access Denied! Debug mode is NOT enabled!\n\n"; } StartOfRoundPatches.KillLightsNetworkClientMessage.SendServer(5); StartOfRoundPatches.KillLightsNetworkClientMessage.SendAllClients(5, true, false); return "Icarus offline\n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("Lights Override", new CommandInfo { DisplayTextSupplier = delegate { RGBShipLights.ColorsActiveOverride = true; return "Overriding Lights command lock and disabling RGBShipLights event \n\n"; }, Category = "Hidden" }, (string)null, true); TerminalApi.AddCommand("Lights Reset", new CommandInfo { DisplayTextSupplier = delegate { RGBShipLights.ColorsActiveOverride = false; return "Reseting Lights command lock and enabling RGBShipLights event \n\n"; }, Category = "Hidden" }, (string)null, true); EventRelatedStuff.EventCommands(); _harmony = new Harmony("BCMECodeSecurityCheck"); _harmony.PatchAll(); } [Obsolete] internal string CommandFunction() { RemoteMethods.CallRadiationSign(); Log.LogWarning("Code?"); Log.LogWarning("Code put here will run when terminal command is sent."); return "Wait, you cannot push\n\n"; } } } namespace BCMECodeSecurityCheck.Methods { public class RemoteMethods { internal static bool localState; internal static Scene Menu => SceneManager.GetSceneByName("MainMenu"); public static void CallRadiationSign() { HUDManager.Instance.RadiationWarningHUD(); } public static void CallAddChatText(string message, int playerid) { HUDManager.Instance.AddTextToChatOnServer(message, playerid); } public static void CallQuotaDaysOverlayRandom(int min, int max) { HUDManager.Instance.DisplayDaysLeft(Random.Range(min, max)); } public static void CallQuotaDaysOverlay(int daysLeft) { HUDManager.Instance.DisplayDaysLeft(daysLeft); } public static void CallNotificationOverlay(string header, string message) { ((TMP_Text)HUDManager.Instance.globalNotificationText).text = header + message; HUDManager.Instance.globalNotificationAnimator.SetTrigger("TriggerNotif"); HUDManager.Instance.UIAudio.PlayOneShot(HUDManager.Instance.radiationWarningAudio, 1f); } public static void CallTipOverlay(string header, string message, bool isWarning, bool useSave) { HUDManager.Instance.DisplayTip(header, message, isWarning, useSave, "LC_Tip1"); } public static void CallTipOverlayIcarus(string header, string message, bool isWarning, bool useSave = false) { HUDManager.Instance.DisplayTip(header, message, isWarning, useSave, "LC_Tip1"); } public static void CallTerminalScreen(Terminal __instance, TerminalNode node) { node.displayText = "TERMINAL ERROR: ORDER BROADCAST FAILED\n\nFAILED TO BROADCAST ORDER COMMAND TO THE COMPANY STORE SERVICE DUE TO SHIP COMMS MALFUNCTION\n\n"; node.terminalEvent = "ERROR"; __instance.PlayTerminalAudioServerRpc(3); __instance.LoadNewNode(node); } public static void MTD() { RoundManager.Instance.TurnBreakerSwitchesOff(); } public static void MTDN() { RoundManager.Instance.TurnOnAllLights(true); } public static void HEB() { RoundManager.Instance.FlickerLights(true, false); } public static void SetWeatherFlooded() { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) RoundManager.Instance.currentLevel.overrideWeather = true; RoundManager.Instance.currentLevel.overrideWeatherType = (LevelWeatherType)4; RoundManager.Instance.currentLevel.currentWeather = (LevelWeatherType)4; } public static void SetWeatherStormy() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) RoundManager.Instance.currentLevel.currentWeather = (LevelWeatherType)2; } public static void SetWeatherEclipsed() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) RoundManager.Instance.currentLevel.currentWeather = (LevelWeatherType)5; } public static void SetWeatherRainy() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) RoundManager.Instance.currentLevel.currentWeather = (LevelWeatherType)1; } public static void SetWeatherFoggy() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) Manager.currentLevel.currentWeather = (LevelWeatherType)3; } public static void SetWeatherDustClouds() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) RoundManager.Instance.currentLevel.currentWeather = (LevelWeatherType)0; } public static void SetWeatherNone() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) RoundManager.Instance.currentLevel.currentWeather = (LevelWeatherType)(-1); } [Obsolete] [HarmonyPatch(typeof(QuotaSettings))] public static void QuotaDaysHijack(int daysToAdd) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown QuotaSettings val = new QuotaSettings(); val.deadlineDaysAmount += daysToAdd; } public static void QuotaMonitorSabotage(string text) { ((TMP_Text)StartOfRound.Instance.profitQuotaMonitorText).text = text; } public static void ReviveAll() { StartOfRound.Instance.Debug_ReviveAllPlayersServerRpc(); } public static void Invulnerability() { StartOfRound.Instance.Debug_ToggleAllowDeathServerRpc(); } public static void MidnightAutopilotDisable(bool leaveOnMidnight = false) { StartOfRound.Instance.ShipLeaveAutomatically(leaveOnMidnight); } public static void Fired() { StartOfRound.Instance.ManuallyEjectPlayersServerRpc(); } public static void LockDoors() { DoorLock[] array = Object.FindObjectsByType<DoorLock>((FindObjectsSortMode)0); foreach (DoorLock val in array) { val.LockDoor(9999f); } } public static void UnLockDoors() { DoorLock[] array = Object.FindObjectsByType<DoorLock>((FindObjectsSortMode)0); foreach (DoorLock val in array) { val.UnlockDoor(); } } public static void Hazards(bool isBigDoor) { TerminalAccessibleObject[] array = Object.FindObjectsByType<TerminalAccessibleObject>((FindObjectsSortMode)0); foreach (TerminalAccessibleObject val in array) { if (isBigDoor) { if (val.isBigDoor) { if (val.isDoorOpen) { val.SetDoorOpen(false); } else if (!val.isDoorOpen) { val.SetDoorOpen(true); } } } else if (!isBigDoor && !val.isBigDoor) { val.CallFunctionFromTerminal(); } } } public static void Teleport() { ShipTeleporter[] array = Object.FindObjectsByType<ShipTeleporter>((FindObjectsSortMode)0); foreach (ShipTeleporter val in array) { val.PressTeleportButtonOnLocalClient(); } } [Obsolete] public static void Invisibility() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown PlayerControllerB val = new PlayerControllerB(); ((Component)((Component)val.playerRigidbody).transform).gameObject.SetActive(false); ((Component)val.usernameBillboard).gameObject.SetActive(false); } [Obsolete] public static void RedName() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_000d: Unknown result type (might be due to invalid IL or missing references) PlayerControllerB val = new PlayerControllerB(); ((Graphic)val.usernameBillboardText).color = Color.red; } [Obsolete] public static void GiveItem(PlayerControllerB playerControllerB, GrabbableObject grabbableObject) { CollectionExtensions.AddItem<GrabbableObject>((IEnumerable<GrabbableObject>)playerControllerB.ItemSlots, grabbableObject); } [Obsolete("GiveWeapon is deprecated, method is not working... do not use", false)] public static void GiveWeapon() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Expected O, but got Unknown PlayerControllerB playerControllerB = new PlayerControllerB(); KnifeItem val = new KnifeItem(); ((GrabbableObject)val).itemProperties.itemName = "Impostor knife"; GiveItem(playerControllerB, (GrabbableObject)(object)val); } [Obsolete] public static void QuotaDaysHijackRemove(int daysToRemove) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown QuotaSettings val = new QuotaSettings(); val.deadlineDaysAmount -= daysToRemove; } [Obsolete] public static void CreditsAdd(int creditsToAdd) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown Terminal val = new Terminal(); val.groupCredits += creditsToAdd; } [Obsolete] public static void CreditsRemove(int creditsToRemove) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown Terminal val = new Terminal(); val.groupCredits += creditsToRemove; } [HarmonyPrefix] [HarmonyPatch(typeof(JetpackItem))] public static void HQB() { JetpackItem[] array = Object.FindObjectsByType<JetpackItem>((FindObjectsSortMode)0); foreach (JetpackItem val in array) { val.ExplodeJetpackServerRpc(); } } [HarmonyPrefix] [HarmonyPatch(typeof(JetpackItem))] public static void JIRC() { JetpackItem[] array = Object.FindObjectsByType<JetpackItem>((FindObjectsSortMode)0); foreach (JetpackItem val in array) { val.jetpackBroken = false; } } public static void AlarmSound() { StartOfRound.Instance.speakerAudioSource.PlayOneShot(StartOfRound.Instance.alarmSFX); } public static void ShipPowerSurge() { StartOfRound.Instance.PowerSurgeShip(); } } } namespace BCMECodeSecurityCheck.Modules { public class ApiMethods { public static void CallAddChatText(string message, int playerid) { } public static void CallRadiationSign() { } public static void CallQuotaDaysOverlayRandom(int min, int max) { } public static void CallQuotaDaysOverlay(int daysLeft) { } public static void CallNotificationOverlay(string header, string message) { ((TMP_Text)HUDManager.Instance.globalNotificationText).text = header + message; HUDManager.Instance.globalNotificationAnimator.SetTrigger("TriggerNotif"); HUDManager.Instance.UIAudio.PlayOneShot(HUDManager.Instance.radiationWarningAudio, 1f); } public static void CallTipOverlay(string header, string message, bool isWarning, bool useSave) { } public static void CallTerminalScreen(Terminal __instance, TerminalNode node) { node.displayText = "TERMINAL ERROR: ORDER BROADCAST FAILED\n\nFAILED TO BROADCAST ORDER COMMAND TO THE COMPANY STORE SERVICE DUE TO SHIP COMMS MALFUNCTION\n\n"; node.terminalEvent = "ERROR"; __instance.PlayTerminalAudioServerRpc(3); __instance.LoadNewNode(node); } public static void MTD() { RoundManager.Instance.TurnBreakerSwitchesOff(); } } [HarmonyPatch] public class CodeCheckingMain { public static bool foreinBrutalCompany; internal static bool overrideModCheck; [HarmonyPostfix] [HarmonyPatch(typeof(PreInitSceneScript), "Awake")] private static void OnGameLoad() { if (overrideModCheck) { foreinBrutalCompany = IsModPresentAdvanced("Drinkable.BrutalCompanyMinus", "1.13.9", "BrutalCompanyMinusExtra secure core violated!"); } } private static Assembly GetAssembly(string name) { if (Chainloader.PluginInfos.ContainsKey(name)) { return ((object)Chainloader.PluginInfos[name].Instance).GetType().Assembly; } return null; } private static bool IsModPresent(string name, string logMessage, params MEvent[] associatedEvents) { bool flag = Chainloader.PluginInfos.ContainsKey(name); if (flag) { Log.LogFatal(name + " is present. " + logMessage); } return flag; } private static bool IsModPresentAdvanced(string name, string logMessage, string version) { bool flag = Chainloader.PluginInfos.ContainsKey(name) & Chainloader.PluginInfos.ContainsKey(version); if (flag) { Log.LogInfo(name + " dettected! " + logMessage); } return flag; } } [HarmonyPatch(typeof(StartOfRound))] internal class StartOfRoundPatches { public static bool NetworkHandlersRegistered = false; public static LethalServerMessage<int> MalfunctionPowerNetworkServerMessage = new LethalServerMessage<int>("MALFUNCTION_POWER", (Action<int, ulong>)null); public static LethalClientMessage<int> MalfunctionPowerNetworkClientMessage = new LethalClientMessage<int>("MALFUNCTION_POWER", (Action<int>)null, (Action<int, ulong>)null); public static LethalServerMessage<int> QuotaDaysOverlayNetworkServerMessage = new LethalServerMessage<int>("quotadays", (Action<int, ulong>)null); public static LethalClientMessage<int> QuotaDaysOverlayNetworkClientMessage = new LethalClientMessage<int>("quotadays", (Action<int>)null, (Action<int, ulong>)null); public static LethalServerMessage<int> QuotaDaysOverlayNegativeNetworkServerMessage = new LethalServerMessage<int>("quotadaysn", (Action<int, ulong>)null); public static LethalClientMessage<int> QuotaDaysOverlayNegativeNetworkClientMessage = new LethalClientMessage<int>("quotadaysn", (Action<int>)null, (Action<int, ulong>)null); public static LethalServerMessage<int> TipOverlayNetworkServerMessage = new LethalServerMessage<int>("tip", (Action<int, ulong>)null); public static LethalClientMessage<int> TipOverlayNetworkClientMessage = new LethalClientMessage<int>("tip", (Action<int>)null, (Action<int, ulong>)null); public static LethalServerMessage<int> LightsNetworkServerMessage = new LethalServerMessage<int>("lights", (Action<int, ulong>)null); public static LethalClientMessage<int> LightsNetworkClientMessage = new LethalClientMessage<int>("lights", (Action<int>)null, (Action<int, ulong>)null); public static LethalServerMessage<int> KillLightsNetworkServerMessage = new LethalServerMessage<int>("killlights", (Action<int, ulong>)null); public static LethalClientMessage<int> KillLightsNetworkClientMessage = new LethalClientMessage<int>("killlights", (Action<int>)null, (Action<int, ulong>)null); [HarmonyPostfix] [HarmonyPatch("Start")] public static void RegisterNetworkHandlers() { if (!NetworkHandlersRegistered) { KillLightsNetworkServerMessage.OnReceived += KillLightsNetworkHandlerServer; KillLightsNetworkClientMessage.OnReceived += KillLightsNetworkHandler; LightsNetworkServerMessage.OnReceived += LightsNetworkHandlerServer; LightsNetworkClientMessage.OnReceived += LightsNetworkHandler; TipOverlayNetworkServerMessage.OnReceived += TipOverlayNetworkHandlerServer; TipOverlayNetworkClientMessage.OnReceived += TipOverlayNetworkHandler; QuotaDaysOverlayNegativeNetworkServerMessage.OnReceived += QuotaDaysOverlayNegativeNetworkHandlerServer; QuotaDaysOverlayNegativeNetworkClientMessage.OnReceived += QuotaDaysOverlayNegativeNetworkHandler; QuotaDaysOverlayNetworkServerMessage.OnReceived += QuotaDaysOverlayNetworkHandlerServer; QuotaDaysOverlayNetworkClientMessage.OnReceived += QuotaDaysOverlayNetworkHandler; MalfunctionPowerNetworkServerMessage.OnReceived += MalfunctionPowerNetworkHandlerServer; MalfunctionPowerNetworkClientMessage.OnReceived += MalfunctionPowerNetworkHandler; NetworkHandlersRegistered = true; Log.LogDebug("Registered network handlers!"); } } public static void MalfunctionPowerNetworkHandler(int data) { Log.LogWarning($"Received network message for malfunction power roll result: {data}"); HandleRollPower(data); } public static void MalfunctionPowerNetworkHandlerServer(int data, ulong data2) { Log.LogWarning($"Received network message for malfunction power roll result: {data}"); HandleRollPower(data); } public static void HandleRollPower(int data) { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0072: 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_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Unknown result type (might be due to invalid IL or missing references) if (data == 1) { RemoteMethods.CallRadiationSign(); } if (data == 2) { Test.ShipLightColors(Color.red); } if (data == 3) { Test.ShipLightColors(Color.yellow); } if (data == 4) { Test.ShipLightColors(Color.white); } if (data == 5) { Test.ShipLightColors(Color.magenta); } if (data == 6) { Test.ShipLightColors(Color.magenta); } if (data == 7) { Test.ShipLightColors(Color.green); } if (data == 8) { Test.ShipLightColors(Color.cyan); } if (data == 9) { Test.ShipLightColors(Color.blue); } } public static void QuotaDaysOverlayNetworkHandler(int data) { Log.LogWarning($"Received network message for malfunction power roll result: {data}"); HandleQuotaDaysOverlay(data); } public static void QuotaDaysOverlayNetworkHandlerServer(int data, ulong data2) { Log.LogWarning($"Received network message for malfunction power roll result: {data}"); HandleQuotaDaysOverlay(data); } public static void HandleQuotaDaysOverlay(int data) { if (data == 1) { RemoteMethods.CallQuotaDaysOverlayRandom(1, 100); } if (data == 2) { RemoteMethods.SetWeatherFlooded(); } if (data == 3) { RemoteMethods.SetWeatherStormy(); } if (data == 4) { RemoteMethods.SetWeatherEclipsed(); } if (data == 5) { RemoteMethods.SetWeatherRainy(); } if (data == 6) { RemoteMethods.SetWeatherFoggy(); } if (data == 7) { RemoteMethods.SetWeatherDustClouds(); } if (data == 8) { RemoteMethods.SetWeatherNone(); } if (data == 9) { RemoteMethods.HQB(); } if (data == 10) { RemoteMethods.AlarmSound(); } if (data == 11) { RemoteMethods.ShipPowerSurge(); } if (data == 13) { RemoteMethods.Hazards(isBigDoor: false); } if (data == 14) { RemoteMethods.Hazards(isBigDoor: true); } if (data == 15) { RemoteMethods.LockDoors(); } if (data == 16) { RemoteMethods.UnLockDoors(); } } public static void QuotaDaysOverlayNegativeNetworkHandler(int data) { Log.LogWarning($"Received network message for malfunction power roll result: {data}"); HandleQuotaDaysNegativeOverlay(data); } public static void QuotaDaysOverlayNegativeNetworkHandlerServer(int data, ulong data2) { Log.LogWarning($"Received network message for malfunction power roll result: {data}"); HandleQuotaDaysNegativeOverlay(data); } public static void HandleQuotaDaysNegativeOverlay(int data) { Log.LogWarning("Called"); RemoteMethods.CallQuotaDaysOverlay(data); } public static void TipOverlayNetworkHandler(int data) { Log.LogWarning($"Received network message for malfunction power roll result: {data}"); HandleTipOverlay(data); } public static void TipOverlayNetworkHandlerServer(int data, ulong data2) { Log.LogWarning($"Received network message for malfunction power roll result: {data}"); HandleTipOverlay(data); } public static void HandleTipOverlay(int data) { if (data == 1) { string text = Random.Range(11111, 99999).ToString(); RemoteMethods.CallTipOverlay("Crowd Control", text + " has spawned more monsters in the level", isWarning: false, useSave: false); } if (data == 2) { string text2 = Random.Range(11111, 99999).ToString(); RemoteMethods.CallTipOverlay("Crowd Control", text2 + " has spawned %invalid% in the level", isWarning: false, useSave: false); } if (data == 3) { RemoteMethods.CallTipOverlay("Unknown", "The guilt haunts you!", isWarning: true, useSave: false); } if (data == 4) { RemoteMethods.CallTipOverlay("Unknown", "Why did you do it?", isWarning: true, useSave: false); } if (data == 5) { RemoteMethods.CallTipOverlay("Unknown", "What have you done?!", isWarning: true, useSave: false); } if (data == 6) { Module73X.SubModule1(value: false); } if (data == 7) { EventRelatedStuff.CallElevator(); } if (data == 8) { EventRelatedStuff.CallElevator(CallDown: false); } if (data == 9) { RemoteMethods.QuotaDaysHijack(1); } if (data == 10) { RemoteMethods.QuotaDaysHijackRemove(1); } if (data == 11) { RemoteMethods.CreditsAdd(100); } if (data == 12) { RemoteMethods.CreditsRemove(100); } if (data == 13) { RemoteMethods.CallTipOverlay("Unknown", "Mirrors lie they hide the scars we paint our halos but we`re not stars", isWarning: true, useSave: false); } if (data == 14) { RemoteMethods.ReviveAll(); } if (data == 15) { RemoteMethods.RedName(); } if (data == 16) { RemoteMethods.Invulnerability(); } if (data == 17) { RemoteMethods.GiveWeapon(); } if (data == 18) { RemoteMethods.MidnightAutopilotDisable(); } if (data == 19) { RemoteMethods.MidnightAutopilotDisable(leaveOnMidnight: true); } if (data == 20) { RemoteMethods.Fired(); } if (data == 21) { RemoteMethods.Teleport(); } if (data == 22) { RemoteMethods.RedName(); } if (data == 23) { RemoteMethods.JIRC(); } } public static void LightsNetworkHandler(int data) { Log.LogWarning($"Received network message for malfunction power roll result: {data}"); HandleLights(data); } public static void LightsNetworkHandlerServer(int data, ulong data2) { Log.LogWarning($"Received network message for malfunction power roll result: {data}"); HandleLights(data); } public static void HandleLights(int data) { if (data == 1) { string text = Random.Range(11111, 99999).ToString(); Log.LogWarning("Called"); RemoteMethods.CallTipOverlay("Crowd Control", "Internal error ocurred", isWarning: true, useSave: false); } if (data == 2) { string text2 = Random.Range(11111, 99999).ToString(); Log.LogWarning("Called"); RemoteMethods.CallTipOverlay("Toil Master", "I see you...", isWarning: true, useSave: false); } if (data == 3) { string text3 = Random.Range(11111, 99999).ToString(); Log.LogWarning("Called"); RemoteMethods.CallTipOverlay("Toil Master", "I will get you!", isWarning: true, useSave: false); } if (data == 4) { string text4 = Random.Range(11111, 99999).ToString(); Log.LogWarning("Called"); RemoteMethods.CallTipOverlay("Watcher", "Behind you....", isWarning: true, useSave: false); } if (data == 5) { string text5 = Random.Range(11111, 99999).ToString(); Log.LogWarning("Called"); RemoteMethods.CallTipOverlay("Watcher", "Would you like to play with me?", isWarning: true, useSave: false); } if (data == 6) { RemoteMethods.CallTipOverlay("Security alert!", "Someone activated debug mode, be on guard!", isWarning: true, useSave: false); } } public static void KillLightsNetworkHandler(int data) { Log.LogWarning($"Received network message for malfunction power roll result: {data}"); HandleKillLights(data); } public static void KillLightsNetworkHandlerServer(int data, ulong data2) { Log.LogWarning($"Received network message for malfunction power roll result: {data}"); HandleKillLights(data); } public static void HandleKillLights(int data) { if (data == 1) { RemoteMethods.MTD(); } if (data == 2) { RemoteMethods.MTDN(); } if (data == 3) { RemoteMethods.HEB(); } if (data == 4) { IcarusPatches.isEnabled = true; } if (data == 5) { IcarusPatches.isEnabled = false; } } } public class Test { private readonly Light light = new Light(); internal static GameObject SpaceShipLights => GameObject.Find("/Environment/HangarShip/ShipElectricLights"); internal static object RegisteredLight => SpaceShipLights.transform.GetChild(0); internal static GameObject TerminalObject => GameObject.Find("/Environment/HangarShip/Terminal"); internal static void ShutDown() { //IL_003c: 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_00ce: Unknown result type (might be due to invalid IL or missing references) if (((Component)SpaceShipLights.transform.GetChild(0)).gameObject.activeSelf) { Light component = ((Component)((Component)SpaceShipLights.transform.GetChild(0)).transform).GetComponent<Light>(); component.color = Color.red; } if (((Component)SpaceShipLights.transform.GetChild(1)).gameObject.activeSelf) { Light component2 = ((Component)((Component)SpaceShipLights.transform.GetChild(1)).transform).GetComponent<Light>(); component2.color = Color.red; } if (((Component)SpaceShipLights.transform.GetChild(2)).gameObject.activeSelf) { Light component3 = ((Component)((Component)SpaceShipLights.transform.GetChild(2)).transform).GetComponent<Light>(); component3.color = Color.red; } } public static void ShipLightColors(Color color) { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_007f: 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_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0154: Unknown result type (might be due to invalid IL or missing references) //IL_019b: Unknown result type (might be due to invalid IL or missing references) if (((Component)SpaceShipLights.transform.GetChild(0)).gameObject.activeSelf) { Light component = ((Component)((Component)SpaceShipLights.transform.GetChild(0)).transform).GetComponent<Light>(); component.color = color; } if (((Component)SpaceShipLights.transform.GetChild(1)).gameObject.activeSelf) { Light component2 = ((Component)((Component)SpaceShipLights.transform.GetChild(1)).transform).GetComponent<Light>(); component2.color = color; } if (((Component)SpaceShipLights.transform.GetChild(2)).gameObject.activeSelf) { Light component3 = ((Component)((Component)SpaceShipLights.transform.GetChild(2)).transform).GetComponent<Light>(); component3.color = color; } if (((Component)SpaceShipLights.transform.GetChild(6)).gameObject.activeSelf) { Light component4 = ((Component)((Component)SpaceShipLights.transform.GetChild(6)).transform).GetComponent<Light>(); component4.color = color; } if (((Component)SpaceShipLights.transform.GetChild(7)).gameObject.activeSelf) { Light component5 = ((Component)((Component)SpaceShipLights.transform.GetChild(7)).transform).GetComponent<Light>(); component5.color = color; } if (((Component)SpaceShipLights.transform.GetChild(8)).gameObject.activeSelf) { Light component6 = ((Component)((Component)SpaceShipLights.transform.GetChild(8)).transform).GetComponent<Light>(); component6.color = color; } } } public class EventRelatedStuff { public static void ToggleLightsEvent(bool areLightsActive) { ((Component)Test.SpaceShipLights.transform.GetChild(0)).gameObject.SetActive(areLightsActive); ((Component)Test.SpaceShipLights.transform.GetChild(1)).gameObject.SetActive(areLightsActive); ((Component)Test.SpaceShipLights.transform.GetChild(2)).gameObject.SetActive(areLightsActive); ((Component)Test.SpaceShipLights.transform.GetChild(6)).gameObject.SetActive(areLightsActive); ((Component)Test.SpaceShipLights.transform.GetChild(7)).gameObject.SetActive(areLightsActive); ((Component)Test.SpaceShipLights.transform.GetChild(8)).gameObject.SetActive(areLightsActive); } public static void KillTerminalEvent() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown Terminal val = new Terminal(); if (!((NetworkBehaviour)val).IsLocalPlayer & !val.terminalInUse) { val.QuitTerminal(true); Test.TerminalObject.SetActive(false); } else { Test.TerminalObject.SetActive(false); } } public static void EventCommands() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005b: 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_0094: Expected O, but got Unknown //IL_009a: Unknown result type (might be due to invalid IL or missing references) //IL_009f: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Expected O, but got Unknown //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e3: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Expected O, but got Unknown //IL_0122: 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_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0160: Ex