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 System.Threading; 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.Handlers.CustomEvents; using BrutalCompanyMinus.Minus.Handlers.Modded; using BrutalCompanyMinus.Minus.MonoBehaviours; using BrutalCompanyMinus.NetcodePatcher; using Dawn; using DigitalRuby.ThunderAndLightning; using FacilityMeltdown.API; using GameNetcodeStuff; using HarmonyLib; using HotbarPlus.Networking; using Microsoft.CodeAnalysis; using Newtonsoft.Json; using Newtonsoft.Json.Converters; using Newtonsoft.Json.Linq; using Scoops.misc; using SelfSortingStorage.Cupboard; using ShipInventoryUpdated.Objects; using ShipInventoryUpdated.Scripts; 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 WeatherRegistry; using com.github.zehsteam.TakeyGokuBracken; using com.github.zehsteam.ToilHead; [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("SoftDiamond")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("BrutalCompanyMinusExtraReborn")] [assembly: AssemblyTitle("BrutalCompanyMinus")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] [module: NetcodePatchedAssembly] 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; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } public class BloodMoonWeather : MonoBehaviour { [CompilerGenerated] private sealed class d__31 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public BloodMoonWeather <>4__this; private GrabbableObject[] 5__1; private int 5__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__31(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(15f); <>1__state = 1; return true; case 1: <>1__state = -1; 5__1 = Object.FindObjectsOfType(); 5__2 = 0; while (5__2 < 5__1.Length) { if (5__1[5__2].itemProperties.isConductiveMetal) { <>4__this.metalObjects.Add(5__1[5__2]); } 5__2++; } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } 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 metalObjects = new List(); 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; } } [IteratorStateMachine(typeof(d__31))] private IEnumerator GetMetalObjectsAfterDelay() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__31(0) { <>4__this = this }; } 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()), 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(); if ((Object)(object)component != (Object)null) { setStaticGrabbableObject = ((Component)warningObject).gameObject.GetComponent(); 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(); staticElectricityParticle.time = particleTime; staticElectricityParticle.Play(); staticElectricityParticle.time = particleTime; ((Component)staticElectricityParticle).gameObject.GetComponent().clip = staticElectricityAudio; ((Component)staticElectricityParticle).gameObject.GetComponent().Play(); ((Component)staticElectricityParticle).gameObject.GetComponent().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_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0103: 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_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_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: 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, 1f); } 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().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().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, Maneater, Barber, GiantKiwi, CadaverGrowths, BushWolf, CadaverBloom, Puma, Stingray } 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, ToyTrain, ToiletPaper, SoccerBall, PlasticCup, GarbageLid, ControlPad, Clock, ZedDog, BabyKiwiEgg, SeveredThigh, SeveredHand, SeveredEar, SeveredBone, SeveredTongue, SeveredHeart, SeveredFoot, SeveredBoneRib } 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, Eclipsed } internal static AssetBundle bundle; internal static AssetBundle customAssetBundle; public static Dictionary EnemyNameList = new Dictionary { { 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" }, { EnemyName.Maneater, "CaveDweller" }, { EnemyName.Barber, "ClaySurgeon" }, { EnemyName.GiantKiwi, "GiantKiwi" }, { EnemyName.CadaverGrowths, "CadaverGrowths" }, { EnemyName.BushWolf, "BushWolf" }, { EnemyName.CadaverBloom, "CadaverBloom" }, { EnemyName.Puma, "Puma" }, { EnemyName.Stingray, "Stingray" } }; public static Dictionary ItemNameList = new Dictionary { { 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" }, { ItemName.ToyTrain, "ToyTrain" }, { ItemName.ToiletPaper, "ToiletPaperRolls" }, { ItemName.SoccerBall, "SoccerBall" }, { ItemName.PlasticCup, "PlasticCup" }, { ItemName.GarbageLid, "GarbageLid" }, { ItemName.ControlPad, "ControlPad" }, { ItemName.Clock, "Clock" }, { ItemName.ZedDog, "ZedDog" }, { ItemName.BabyKiwiEgg, "BabyKiwiEgg" }, { ItemName.SeveredThigh, "SeveredThigh" }, { ItemName.SeveredHand, "SeveredHand" }, { ItemName.SeveredEar, "SeveredEar" }, { ItemName.SeveredBone, "SeveredBone" }, { ItemName.SeveredTongue, "SeveredTongue" }, { ItemName.SeveredHeart, "SeveredHeart" }, { ItemName.SeveredFoot, "SeveredFoot" }, { ItemName.SeveredBoneRib, "SeveredBoneRib" } }; public static Dictionary ObjectNameList = new Dictionary { { 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 AtmosphereNameList = new Dictionary { { AtmosphereName.RollingGroundFog, "rolling ground fog" }, { AtmosphereName.Rainy, "rainy" }, { AtmosphereName.Stormy, "stormy" }, { AtmosphereName.Foggy, "foggy" }, { AtmosphereName.Flooded, "flooded" }, { AtmosphereName.Eclipsed, "eclipsed" } }; public static Dictionary EnemyList = new Dictionary(); public static Dictionary ItemList = new Dictionary(); public static Dictionary ObjectList = new Dictionary(); internal static List factorySizeMultiplierList = new List(); internal static List spawnableMapObjects = new List(); internal static List averageScrapValueList = new List(); internal static List insideSpawnChanceCurves = new List(); internal static List outsideSpawnChanceCurves = new List(); internal static List daytimeSpawnChanceCurves = new List(); internal static List insideMaxPowerCounts = new List(); internal static List outsideMaxPowerCounts = new List(); internal static List daytimeMaxPowerCounts = new List(); 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"); internal static GameObject cruiser => GameObject.Find("CompanyCruiser(Clone)"); internal static GameObject Microwave => GameObject.Find("MicrowaveContainer(Clone)"); public static bool ReadSettingEarly(string filePath, string settingName) { try { if (!File.Exists(filePath)) { return false; } string input = File.ReadAllText(filePath); string pattern = Regex.Escape(settingName) + "\\s*=\\s*(true|false)"; Match match = Regex.Match(input, pattern, RegexOptions.IgnoreCase); if (match.Success) { string value = match.Groups[1].Value; return bool.Parse(value); } return false; } catch (Exception ex) { Log.LogWarning("An error occurred: " + ex.Message); return false; } } [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_0038: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Expected O, but got Unknown //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Expected O, but got Unknown //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Expected O, but got Unknown //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Expected O, but got Unknown //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Expected O, but got Unknown //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Expected O, but got Unknown //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Expected O, but got Unknown //IL_0137: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Expected O, but got Unknown //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_015a: Expected O, but got Unknown antiCoilHead = (EnemyType)customAssetBundle.LoadAsset("AntiCoilHead"); antiCoilHead.enemyName = "Anti Coil-Head"; nutSlayer = (EnemyType)customAssetBundle.LoadAsset("NutSlayer"); nutSlayer.enemyName = "NutSlayer"; kamikazieBug = (EnemyType)customAssetBundle.LoadAsset("KamikazieBug"); kamikazieBug.enemyName = "kamikazieBugs"; 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(bloodRain); LocalVolumetricFog component = ((Component)val.transform.Find("Foggy")).GetComponent(); 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 { slayerShotgun, grabbableTurret, grabbableLandmine }); } internal static void Load() { bundle = LoadAssetBundle("bcm_assets"); customAssetBundle = LoadAssetBundle("bcm_customassets"); SceneManager.sceneLoaded += OnSceneLoaded; } private static AssetBundle LoadAssetBundle(string fileName) { try { string directoryName = Path.GetDirectoryName(((BaseUnityPlugin)Plugin.Instance).Info.Location); string text = Path.Combine(directoryName, fileName); return AssetBundle.LoadFromFile(text); } catch (Exception arg) { Log.LogError($"Failed to load AssetBundle \"{fileName}\". {arg}"); } return null; } private static void OnSceneLoaded(Scene scene, LoadSceneMode mode) { if ((Object)(object)StartOfRound.Instance == (Object)null) { return; } StormyWeather[] array = Resources.FindObjectsOfTypeAll().Concat(Object.FindObjectsByType((FindObjectsInactive)1, (FindObjectsSortMode)1)).ToArray(); FloodWeather[] array2 = Resources.FindObjectsOfTypeAll().Concat(Object.FindObjectsByType((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().Concat(Object.FindObjectsByType((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 (!ReadSettingEarly(Paths.ConfigPath + "\\BrutalCompanyMinusExtraReborn\\CoreProperties.cfg", "Silence Prefab Warnings?") && (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 enemy in EnemyList) { bool flag = false; foreach (KeyValuePair enemyName in EnemyNameList) { if (enemy.Key == enemyName.Value) { flag = true; break; } } if (!ReadSettingEarly(Paths.ConfigPath + "\\BrutalCompanyMinusExtraReborn\\CoreProperties.cfg", "Silence Enum Warnings?") && !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().Concat(Object.FindObjectsByType((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 (!ReadSettingEarly(Paths.ConfigPath + "\\BrutalCompanyMinusExtraReborn\\CoreProperties.cfg", "Silence Prefab Warnings?") && (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 item in ItemList) { bool flag2 = false; foreach (KeyValuePair itemName in ItemNameList) { if (item.Key == itemName.Value) { flag2 = true; break; } } if (!ReadSettingEarly(Paths.ConfigPath + "\\BrutalCompanyMinusExtraReborn\\CoreProperties.cfg", "Silence Enum Warnings?") && !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 list = new List(); List list2 = new List(); 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 @object in ObjectList) { bool flag3 = false; foreach (KeyValuePair objectName in ObjectNameList) { if (@object.Key == objectName.Value) { flag3 = true; break; } } if (!ReadSettingEarly(Paths.ConfigPath + "\\BrutalCompanyMinusExtraReborn\\CoreProperties.cfg", "Silence Enum Warnings?") && !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_0124: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Expected O, but got Unknown //IL_012b: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Expected O, but got Unknown //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Expected O, but got Unknown //IL_0150: Unknown result type (might be due to invalid IL or missing references) //IL_0155: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0186: 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_018f: 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_01c1: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: 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 list = new List(); 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); } if (!ReadSettingEarly(Paths.ConfigPath + "\\BrutalCompanyMinusExtraReborn\\CoreProperties.cfg", "Experimental Dont Handle Spawn Chance?")) { 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) { if (EnemyList.TryGetValue(name, out EnemyType value)) { return value; } if (!ReadSettingEarly(Paths.ConfigPath + "\\BrutalCompanyMinusExtraReborn\\CoreProperties.cfg", "Silence Get Method Warnings?")) { Log.LogWarning("GetEnemy(" + name + ") failed, returning an empty enemy type"); } EnemyType val = ScriptableObject.CreateInstance(); val.enemyName = name; ((Object)val).name = name; return val; } public static EnemyType GetEnemyOrDefault(string name) { if (EnemyList.TryGetValue(name, out EnemyType value)) { return value; } if (!ReadSettingEarly(Paths.ConfigPath + "\\BrutalCompanyMinusExtraReborn\\CoreProperties.cfg", "Silence Get Method Warnings?")) { 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) { if (ItemList.TryGetValue(name, out Item value)) { return value; } if (!ReadSettingEarly(Paths.ConfigPath + "\\BrutalCompanyMinusExtraReborn\\CoreProperties.cfg", "Silence Get Method Warnings?")) { Log.LogWarning("GetItem(" + name + ") failed, returning an empty item"); } Item val = ScriptableObject.CreateInstance(); 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 { [Serializable] public struct CurrentWeatherEffect : INetworkSerializable, IEquatable { public FixedString128Bytes name; public bool state; public CurrentWeatherEffect(FixedString128Bytes name, bool state) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) this.name = name; this.state = state; } public void NetworkSerialize(BufferSerializer serializer) where T : IReaderWriter { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_0060: 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_0077: 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) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) if (serializer.IsReader) { FastBufferReader fastBufferReader = serializer.GetFastBufferReader(); ((FastBufferReader)(ref fastBufferReader)).ReadValueSafe(ref name, default(ForFixedStrings)); ((FastBufferReader)(ref fastBufferReader)).ReadValueSafe(ref state, default(ForPrimitives)); } else { FastBufferWriter fastBufferWriter = serializer.GetFastBufferWriter(); ((FastBufferWriter)(ref fastBufferWriter)).WriteValueSafe(ref name, default(ForFixedStrings)); ((FastBufferWriter)(ref fastBufferWriter)).WriteValueSafe(ref state, default(ForPrimitives)); } } public bool Equals(CurrentWeatherEffect other) { return (ref name) == (ref other.name); } } [Serializable] public struct OutsideObjectsToSpawnMethod : INetworkSerializable, IEquatable { public float density; public int objectEnumID; public OutsideObjectsToSpawnMethod(float density, int objectEnumID) { this.density = density; this.objectEnumID = objectEnumID; } public void NetworkSerialize(BufferSerializer serializer) where T : IReaderWriter { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) if (serializer.IsReader) { FastBufferReader fastBufferReader = serializer.GetFastBufferReader(); ((FastBufferReader)(ref fastBufferReader)).ReadValueSafe(ref density, default(ForPrimitives)); ((FastBufferReader)(ref fastBufferReader)).ReadValueSafe(ref objectEnumID, default(ForPrimitives)); } else { FastBufferWriter fastBufferWriter = serializer.GetFastBufferWriter(); ((FastBufferWriter)(ref fastBufferWriter)).WriteValueSafe(ref density, default(ForPrimitives)); ((FastBufferWriter)(ref fastBufferWriter)).WriteValueSafe(ref objectEnumID, default(ForPrimitives)); } } public bool Equals(OutsideObjectsToSpawnMethod other) { return objectEnumID == other.objectEnumID && density == other.density; } } public NetworkList currentWeatherMultipliers = new NetworkList(); public NetworkList outsideObjectsToSpawn; public NetworkList currentWeatherEffects; public NetworkVariable textUI = new NetworkVariable(default(FixedString4096Bytes), (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0); public bool receivedSyncedValues = false; public List objectsToSpawn = new List(); public List objectsToSpawnAmount = new List(); public List objectsToSpawnRadius = new List(); public List objectsToSpawnOffsets = new List(); private float currentIntervalTime = 0f; public NetworkVariable LeverUnityNet = new NetworkVariable(false, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0); public NetworkVariable WalkiesUnityNet = new NetworkVariable(false, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0); public NetworkVariable JetpackUnityNet = new NetworkVariable(false, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0); public NetworkVariable TerminalUnityNet = new NetworkVariable(false, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0); public NetworkVariable TargetingUnityNet = new NetworkVariable(false, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0); public NetworkVariable TeleporterUnityNet = new NetworkVariable(false, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0); public NetworkVariable ItemChargerUnityNet = new NetworkVariable(false, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0); public NetworkVariable CircuitUnityNet = new NetworkVariable(false, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0); public NetworkVariable DoorOvUnityNet = new NetworkVariable(false, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0); public NetworkVariable DoorUnityNet = new NetworkVariable(false, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0); public NetworkVariable CameraUnityNet = new NetworkVariable(false, (NetworkVariableReadPermission)0, (NetworkVariableWritePermission)0); public int _seed = 49; public static Net Instance { get; private set; } public static GameObject netObject { get; private set; } private void Awake() { currentWeatherMultipliers = new NetworkList(); outsideObjectsToSpawn = new NetworkList(); currentWeatherEffects = new NetworkList(); Log.LogWarning("Net object Awake called"); } 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(); } [ServerRpc(RequireOwnership = false)] public void GetSyncedTextServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1644092438u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1644092438u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; GetSyncedTextClientRpc(textUI.Value); } } } [ClientRpc] public void GetSyncedTextClientRpc(FixedString4096Bytes textUI) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1434020377u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref textUI, default(ForFixedStrings)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1434020377u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Manager.textUI = FixedString4096Bytes.op_Implicit(((FixedString4096Bytes)(ref textUI)).Value); } } } [ServerRpc(RequireOwnership = false)] public void GiveSeedServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2319565597u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2319565597u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; GiveSeedClientRpc(_seed++); } } } [ClientRpc] public void GiveSeedClientRpc(int seed) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2006375022u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, seed); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2006375022u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Manager.seed = seed; } } } [ServerRpc(RequireOwnership = false)] public void ClearGameObjectsServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3809690504u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3809690504u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ClearGameObjectsClientRpc(); } } } [ClientRpc] public void ClearGameObjectsClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams 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 != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; for (int i = 0; i < Manager.objectsToClear.Count; i++) { GameObject val3 = Manager.objectsToClear[i]; if ((Object)(object)val3 == (Object)null) { continue; } NetworkObject component = val3.GetComponent(); string name = ((Object)val3).name; try { if ((Object)(object)component != (Object)null) { component.Despawn(true); if (Configuration.ExtraLogging.Value) { Log.LogInfo("Despawned network object: " + name); } } else { Object.Destroy((Object)(object)val3); if (Configuration.ExtraLogging.Value) { Log.LogInfo("Destroyed non-network object: " + name); } } } catch (KeyNotFoundException ex) { Log.LogError("KeyNotFoundException while despawning/destroying '" + name + "': " + ex.Message); } catch (Exception ex2) { Log.LogError("Unexpected exception while despawning/destroying '" + name + "': " + ex2.Message); } } Manager.objectsToClear.Clear(); } [ClientRpc] public void SyncValuesClientRpc(float factorySizeMultiplier, float scrapValueMultiplier, float scrapAmountMultiplier, int bonusMaxHp) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2150416984u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref factorySizeMultiplier, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref scrapValueMultiplier, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref scrapAmountMultiplier, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val2, bonusMaxHp); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2150416984u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; RoundManager.Instance.currentLevel.factorySizeMultiplier = factorySizeMultiplier; Manager.bonusEnemyHp = bonusMaxHp; receivedSyncedValues = true; } } } [ServerRpc] 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_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0136: 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(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)) { base.__rpc_exec_stage = (__RpcExecStage)0; 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) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(268987115u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref obj, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val2, value); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 268987115u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; NetworkObject val3 = default(NetworkObject); ((NetworkObjectReference)(ref obj)).TryGet(ref val3, (NetworkManager)null); ((Component)val3).GetComponent().SetScrapValue(value); } } } [ServerRpc(RequireOwnership = false)] public void GenerateAndSyncTerminalCodeServerRpc(NetworkObjectReference netObject, int code) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2205229909u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(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)) { base.__rpc_exec_stage = (__RpcExecStage)0; GenerateAndSyncTerminalCodeClientRpc(netObject, code); } } } [ClientRpc] public void GenerateAndSyncTerminalCodeClientRpc(NetworkObjectReference netObject, int code) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3849078077u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref netObject, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val2, code); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3849078077u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; NetworkObject val3 = null; if (!((NetworkObjectReference)(ref netObject)).TryGet(ref val3, (NetworkManager)null)) { Log.LogError("Network Object is null in GenerateAndSyncTerminalCodeClientRpc()"); return; } TerminalAccessibleObject componentInChildren = ((Component)val3).GetComponentInChildren(); if ((Object)(object)componentInChildren == (Object)null) { Log.LogError("Terminal Accessible Object is null in GenerateAndSyncTerminalCodeClientRpc()"); return; } componentInChildren.InitializeValues(); componentInChildren.SetCodeTo(code); } [ServerRpc(RequireOwnership = false)] public void MoveTimeServerRpc(float amount, float speedMultiplier = 1f) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2208211795u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref amount, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref speedMultiplier, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2208211795u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; MoveTimeClientRpc(amount, speedMultiplier); } } } [ClientRpc] public void MoveTimeClientRpc(float amount, float speedMultiplier) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3436861046u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref amount, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref speedMultiplier, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3436861046u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Manager.moveTime = true; Manager.moveTimeAmount += amount; Manager.timeSpeedMultiplier *= speedMultiplier; } } } [ServerRpc(RequireOwnership = false)] public void SetTimeMultiplierServerRpc(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_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2853396074u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref speedMultiplier, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2853396074u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SetTimeMultiplierClientRpc(speedMultiplier); } } } [ClientRpc] public void SetTimeMultiplierClientRpc(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_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(512763078u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref speedMultiplier, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 512763078u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Manager.moveTime = true; 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) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams 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 == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; UI.Instance.curretShowCaseEventTime = UI.Instance.showCaseEventTime; UI.Instance.TogglePanel(state: true); UI.Instance.panelScrollBar.value = 1f; UI.Instance.showCaseEvents = true; } } } [ServerRpc(RequireOwnership = false)] 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) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams 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)) { base.__rpc_exec_stage = (__RpcExecStage)0; currentWeatherMultipliers = Weather.InitalizeWeatherMultipliers(ref currentWeatherMultipliers); UpdateCurrentWeatherMultipliersServerRpc(); } } } [ServerRpc(RequireOwnership = false)] public void UpdateCurrentWeatherMultipliersServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams 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)) { base.__rpc_exec_stage = (__RpcExecStage)0; currentWeatherMultipliers = Weather.RandomizeWeatherMultipliers(currentWeatherMultipliers); } } } [ServerRpc(RequireOwnership = false)] public void SetRecievedServerRpc(bool state) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1853859009u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref state, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1853859009u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SetRecievedClientRpc(state); } } } [ClientRpc] public void SetRecievedClientRpc(bool state) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(603622741u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref state, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 603622741u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; receivedSyncedValues = state; } } } [ServerRpc(RequireOwnership = false)] public void SetRealityShiftActiveServerRpc(bool state) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(4203994123u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref state, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 4203994123u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SetRealityShiftActiveClientRpc(state); } } } [ClientRpc] public void SetRealityShiftActiveClientRpc(bool state) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2568149201u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref state, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2568149201u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; BrutalCompanyMinus.Minus.Events.RealityShift.Active = state; } } } [ServerRpc(RequireOwnership = false)] public void SetAllWeatherActiveServerRpc(bool state) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1050877662u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref state, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1050877662u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SetAllWeatherActiveClientRpc(state); } } } [ClientRpc] public void SetAllWeatherActiveClientRpc(bool state) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1627891447u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref state, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1627891447u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; BrutalCompanyMinus.Minus.Events.AllWeather.Active = state; } } } [ServerRpc(RequireOwnership = false)] public void SetEventActiveServerRPC(string eventName, 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_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: 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(2405040997u, val, (RpcDelivery)0); bool flag = eventName != null; ((FastBufferWriter)(ref val2)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(eventName, false); } ((FastBufferWriter)(ref val2)).WriteValueSafe(ref state, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2405040997u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SetEventActiveClientRPC(eventName, state); } } [ClientRpc] public void SetEventActiveClientRPC(string eventName, 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_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Unknown result type (might be due to invalid IL or missing references) //IL_00bb: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1527620954u, val, (RpcDelivery)0); bool flag = eventName != null; ((FastBufferWriter)(ref val2)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(eventName, false); } ((FastBufferWriter)(ref val2)).WriteValueSafe(ref state, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1527620954u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; MEvent @event = MEvent.GetEvent(eventName); if (@event != null) { @event.Active = state; } } } [ServerRpc(RequireOwnership = false)] public void MessWithLightsServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams 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)) { base.__rpc_exec_stage = (__RpcExecStage)0; MessWithLightsClientRpc(); } } } [ClientRpc] public void MessWithLightsClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams 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 == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; RoundManager.Instance.FlickerLights(true, true); } } } [ServerRpc(RequireOwnership = false)] public void MessWithBreakerServerRpc(bool state) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3941924814u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref state, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3941924814u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; MessWithBreakerClientRpc(state); } } } [ClientRpc] public void MessWithBreakerClientRpc(bool state) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3457555438u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref state, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3457555438u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; BreakerBox val3 = Object.FindObjectOfType(); if ((Object)(object)val3 != (Object)null) { val3.SetSwitchesOff(); RoundManager.Instance.TurnOnAllLights(state); } } } [ServerRpc(RequireOwnership = false)] public void MessWithDoorsServerRpc(float openCloseChance, bool messWithLock = false, float messWithLockChance = 0f) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2842285472u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref openCloseChance, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref messWithLock, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref messWithLockChance, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2842285472u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (_seed == 0) { _seed = StartOfRound.Instance.randomMapSeed; } _seed++; MessWithDoorsClientRpc(openCloseChance, _seed, messWithLock, messWithLockChance); } } [ClientRpc] public void MessWithDoorsClientRpc(float openCloseChance, int seed, bool messWithLock, float messWithLockChance) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Unknown result type (might be due to invalid IL or missing references) //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1683303265u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref openCloseChance, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val2, seed); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref messWithLock, default(ForPrimitives)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref messWithLockChance, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1683303265u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; DoorLock[] array = Object.FindObjectsOfType(); 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().TriggerAnimationNonPlayer(false, true, false); val3.SetDoorAsOpen(Convert.ToBoolean(random.Next(0, 2))); } } } [ServerRpc(RequireOwnership = false)] public void UnlockAndOpenAllDoorsServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams 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)) { base.__rpc_exec_stage = (__RpcExecStage)0; TerminalAccessibleObject[] array = Object.FindObjectsOfType(); 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) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams 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 != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; DoorLock[] array = Object.FindObjectsOfType(); DoorLock[] array2 = array; foreach (DoorLock val3 in array2) { if (!((Object)(object)val3 == (Object)null)) { if (val3.isLocked) { val3.UnlockDoor(); } ((Component)val3).gameObject.GetComponent().TriggerAnimationNonPlayer(false, true, false); val3.SetDoorAsOpen(true); } } } [ServerRpc(RequireOwnership = false)] public void LockAndCloseAllDoorsServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2551708642u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2551708642u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; TerminalAccessibleObject[] array = Object.FindObjectsOfType(); TerminalAccessibleObject[] array2 = array; foreach (TerminalAccessibleObject val3 in array2) { val3.SetDoorOpenServerRpc(false); } LockAndCloseAllDoorsClientRpc(); } } [ClientRpc] public void LockAndCloseAllDoorsClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3849447749u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3849447749u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; DoorLock[] array = Object.FindObjectsOfType(); DoorLock[] array2 = array; foreach (DoorLock val3 in array2) { if (!((Object)(object)val3 == (Object)null)) { if (val3.isDoorOpened) { val3.isDoorOpened = false; val3.SetDoorAsOpen(false); } ((Component)val3).gameObject.GetComponent().TriggerAnimationNonPlayer(false, true, false); if (!val3.isLocked) { val3.LockDoor(30f); } } } } [ServerRpc(RequireOwnership = false)] public void SpawnMudPilesOutsideServerRpc(int amount) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: 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_0120: 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_012e: Unknown result type (might be due to invalid IL or missing references) //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0148: 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)) { base.__rpc_exec_stage = (__RpcExecStage)0; NavMeshHit val3 = default(NavMeshHit); Random random = new Random(_seed++); for (int i = 0; i < amount; i++) { Vector3 position = RoundManager.Instance.outsideAINodes[random.Next(0, RoundManager.Instance.outsideAINodes.Length)].transform.position; Vector3 position2 = RoundManager.Instance.GetRandomNavMeshPositionInBoxPredictable(position, 30f, val3, random, -1, 1f) + Vector3.up; SpawnMudPilesOutsideClientRpc(position2, _seed++); } } } [ClientRpc] public void SpawnMudPilesOutsideClientRpc(Vector3 position, int seed) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00eb: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams 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 == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Object.Instantiate(RoundManager.Instance.quicksandPrefab, position, Quaternion.identity, RoundManager.Instance.mapPropsContainer.transform); } } } [ServerRpc(RequireOwnership = false)] public void TeleportEnemyServerRpc(NetworkObjectReference enemy, Vector3 position) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(234264786u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref enemy, default(ForNetworkSerializable)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref position); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 234264786u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; TeleportEnemyClientRpc(enemy, position); } } } [ClientRpc] private void TeleportEnemyClientRpc(NetworkObjectReference enemy, Vector3 position) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0122: 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_0134: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1650168377u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref enemy, default(ForNetworkSerializable)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref position); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1650168377u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; NetworkObject val3 = default(NetworkObject); if (((NetworkObjectReference)(ref enemy)).TryGet(ref val3, (NetworkManager)null)) { Object.Instantiate(Assets.teleportAudio, ((Component)val3).transform.position, Quaternion.identity); Object.Instantiate(Assets.teleportAudio, position, Quaternion.identity); ((Component)val3).transform.position = position; } } } [ServerRpc(RequireOwnership = false)] public void SpawnAllWeatherServerRpc(int seed) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3701680339u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, seed); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3701680339u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SpawnAllWeatherClientRpc(seed); } } } [ClientRpc] public void SpawnAllWeatherClientRpc(int seed) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_011b: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Unknown result type (might be due to invalid IL or missing references) //IL_0145: 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_0149: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Expected I4, but got Unknown //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d4: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(910007267u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, seed); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 910007267u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (RoundManager.Instance.currentLevel.randomWeathers == null) { return; } Random random = new Random(); BrutalCompanyMinus.Minus.Handlers.AllWeather.raining = false; RandomWeatherWithVariables[] randomWeathers = RoundManager.Instance.currentLevel.randomWeathers; foreach (RandomWeatherWithVariables val3 in randomWeathers) { if (val3.weatherType == RoundManager.Instance.currentLevel.currentWeather) { continue; } LevelWeatherType weatherType = val3.weatherType; LevelWeatherType val4 = weatherType; switch (val4 - 1) { case 0: BrutalCompanyMinus.Minus.Handlers.AllWeather.raining = true; break; case 2: if (!((Object)(object)TimeOfDay.Instance.foggyWeather == (Object)null)) { LocalVolumetricFog val7 = Object.Instantiate(TimeOfDay.Instance.foggyWeather); Manager.objectsToClear.Add(((Component)val7).gameObject); val7.parameters.albedo = new Color(0.25f, 0.35f, 0.55f, 1f); val7.parameters.meanFreePath = random.Next((int)MathF.Max(4f, val3.weatherVariable), val3.weatherVariable2) * 5; val7.parameters.size.y = 255f; ((Component)val7).gameObject.SetActive(true); } break; case 3: { FloodWeather val6 = Object.Instantiate(Assets.flooded); Manager.objectsToClear.Add(((Component)val6).gameObject); BrutalCompanyMinus.Minus.Handlers.AllWeather.floodVariable1 = val3.weatherVariable; BrutalCompanyMinus.Minus.Handlers.AllWeather.floodVariable2 = val3.weatherVariable2; BrutalCompanyMinus.Minus.Handlers.AllWeather.spawnedFloodedWeather = val6; ((Component)val6).gameObject.SetActive(true); break; } case 1: { StormyWeather val5 = Object.Instantiate(Assets.stormy); Manager.objectsToClear.Add(((Component)val5).gameObject); BrutalCompanyMinus.Minus.Handlers.AllWeather.lightningVariable1 = val3.weatherVariable; BrutalCompanyMinus.Minus.Handlers.AllWeather.LightningVariable2 = val3.weatherVariable2; ((Component)val5).gameObject.SetActive(true); break; } case 4: Manager.minEnemiesToSpawnInside += val3.weatherVariable; Manager.minEnemiestoSpawnOutside += val3.weatherVariable2; break; } } } [ServerRpc(RequireOwnership = false)] public void ShiftServerRpc(NetworkObjectReference networkObject) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_015e: 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_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01cb: Unknown result type (might be due to invalid IL or missing references) //IL_01e8: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(716805725u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref networkObject, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 716805725u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsServer && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; if (BrutalCompanyMinus.Minus.Handlers.RealityShift.shiftList.Count == 0 || (Object)(object)BrutalCompanyMinus.Minus.Handlers.RealityShift.shiftList[0] == (Object)null) { return; } NetworkObject val3 = null; ((NetworkObjectReference)(ref networkObject)).TryGet(ref val3, (NetworkManager)null); if ((Object)(object)val3 == (Object)null) { Log.LogError("NetworkObject in ShiftServerRpc() is null."); return; } GrabbableObject component = ((Component)val3).GetComponent(); GameObject val4 = Object.Instantiate(BrutalCompanyMinus.Minus.Handlers.RealityShift.shiftList[0], ((Component)component).transform.position, Quaternion.identity); GrabbableObject component2 = val4.GetComponent(); if ((Object)(object)component2 == (Object)null) { Log.LogError("GrabbableObject is null in ShiftServerRpc()"); return; } component2.targetFloorPosition = component2.GetItemFloorPosition(((Component)component).transform.position); component2.SetScrapValue(BrutalCompanyMinus.Minus.Handlers.RealityShift.shiftListValues[0]); ((NetworkBehaviour)component2).NetworkObject.Spawn(false); SyncScrapValueClientRpc(NetworkObjectReference.op_Implicit(((NetworkBehaviour)component2).NetworkObject), BrutalCompanyMinus.Minus.Handlers.RealityShift.shiftListValues[0]); AddObjectToGrabToListClientRpc(NetworkObjectReference.op_Implicit(((NetworkBehaviour)component2).NetworkObject)); NetworkObject component3 = ((Component)component).GetComponent(); if ((Object)(object)component3 != (Object)null) { component3.Despawn(true); } else { Log.LogError("NetworkObject is null in ShiftServerRpc(), destroying on client instead."); Object.Destroy((Object)(object)component); } if ((Object)(object)val4 != (Object)null) { BrutalCompanyMinus.Minus.Handlers.RealityShift.shiftListValues.RemoveAt(0); BrutalCompanyMinus.Minus.Handlers.RealityShift.shiftList.RemoveAt(0); } } [ClientRpc] public void AddObjectToGrabToListClientRpc(NetworkObjectReference obj) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(4160371367u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref obj, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4160371367u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; BrutalCompanyMinus.Minus.Handlers.RealityShift.shiftedObjects.Add(obj); } } } [ServerRpc(RequireOwnership = false)] public void GenerateShiftableObjectsListServerRpc(NetworkObjectReference[] spawnedScrap) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3192420881u, val, (RpcDelivery)0); bool flag = spawnedScrap != null; ((FastBufferWriter)(ref val2)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(spawnedScrap, default(ForNetworkSerializable)); } ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3192420881u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; GenerateShiftableObjectsListClientRpc(spawnedScrap); } } [ClientRpc] public void GenerateShiftableObjectsListClientRpc(NetworkObjectReference[] spawnedScrap) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d7: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_010c: Unknown result type (might be due to invalid IL or missing references) //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2458116008u, val, (RpcDelivery)0); bool flag = spawnedScrap != null; ((FastBufferWriter)(ref val2)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(spawnedScrap, default(ForNetworkSerializable)); } ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2458116008u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; BrutalCompanyMinus.Minus.Handlers.RealityShift.ShiftableObjects.Clear(); for (int i = 0; i < spawnedScrap.Length; i++) { NetworkObjectReference val3 = spawnedScrap[i]; NetworkObject val4 = null; ((NetworkObjectReference)(ref val3)).TryGet(ref val4, (NetworkManager)null); if ((Object)(object)val4 != (Object)null) { BrutalCompanyMinus.Minus.Handlers.RealityShift.ShiftableObjects.Add(((Object)((Component)val4).gameObject).GetInstanceID()); } else { Log.LogError("Scrap spawn has null NetworkObject"); } } } [ServerRpc(RequireOwnership = false)] public void FireAtServerRpc(Vector3 at, Vector3 from) { //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_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: 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) 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(1685788616u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref at); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref from); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1685788616u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; FireAtClientRpc(at, from); } } } [ClientRpc] public void FireAtClientRpc(Vector3 at, Vector3 from) { //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_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e6: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Unknown result type (might be due to invalid IL or missing references) //IL_00fa: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2615626191u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref at); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref from); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2615626191u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; GameObject val3 = Object.Instantiate(Assets.artilleryShell, from, Quaternion.identity); ArtilleryShell component = val3.GetComponent(); component.target = at; Manager.objectsToClear.Add(val3); } } } [ServerRpc(RequireOwnership = false)] public void DisplayTipServerRpc(string headerText, string bodyText, bool isWarning = false) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0158: 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_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0113: 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(2734280710u, val, (RpcDelivery)0); bool flag = headerText != null; ((FastBufferWriter)(ref val2)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(headerText, false); } bool flag2 = bodyText != null; ((FastBufferWriter)(ref val2)).WriteValueSafe(ref flag2, default(ForPrimitives)); if (flag2) { ((FastBufferWriter)(ref val2)).WriteValueSafe(bodyText, false); } ((FastBufferWriter)(ref val2)).WriteValueSafe(ref isWarning, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2734280710u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; DisplayTipClientRpc(headerText, bodyText, isWarning); } } [ClientRpc] public void DisplayTipClientRpc(string headerText, string bodyText, bool isWarning = false) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0123: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0158: 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_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1885137978u, val, (RpcDelivery)0); bool flag = headerText != null; ((FastBufferWriter)(ref val2)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(headerText, false); } bool flag2 = bodyText != null; ((FastBufferWriter)(ref val2)).WriteValueSafe(ref flag2, default(ForPrimitives)); if (flag2) { ((FastBufferWriter)(ref val2)).WriteValueSafe(bodyText, false); } ((FastBufferWriter)(ref val2)).WriteValueSafe(ref isWarning, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1885137978u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; HUDManager.Instance.DisplayTip(headerText, bodyText, isWarning, false, "LC_Tip1"); } } [ServerRpc(RequireOwnership = false)] public void BlackFridayServerRpc(int minPercentageCut, int maxPercentageCut) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) 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(688182791u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, minPercentageCut); BytePacker.WriteValueBitPacked(val2, maxPercentageCut); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 688182791u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; BlackFridayClientRpc(minPercentageCut, maxPercentageCut, _seed++); } } } [ClientRpc] public void BlackFridayClientRpc(int minPercentageCut, int maxPercentageCut, 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_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: 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_007e: 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_00a3: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1034762097u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, minPercentageCut); BytePacker.WriteValueBitPacked(val2, maxPercentageCut); BytePacker.WriteValueBitPacked(val2, seed); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1034762097u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Random random = new Random(seed); for (int i = 0; i < Manager.currentTerminal.buyableItemsList.Length; i++) { int num = 100 - (int)Mathf.Clamp((float)random.Next(minPercentageCut, maxPercentageCut), 0f, 90f); Manager.currentTerminal.itemSalesPercentages[i] = (int)Math.Round((double)num / 10.0) * 10; } } } [ServerRpc(RequireOwnership = false)] public void SetPhonesOutServerRpc(bool active) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1342506232u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref active, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1342506232u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SetPhonesOutClientRpc(active); } } } [ClientRpc] public void SetPhonesOutClientRpc(bool active) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3705199930u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref active, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3705199930u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PhonesOut.Active = active; } } } [ServerRpc(RequireOwnership = false)] public void SetFlashlightsServerRpc(bool active) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2315487481u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref active, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2315487481u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SetFlashlightsClientRpc(active); } } } [ClientRpc] public void SetFlashlightsClientRpc(bool active) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2901997937u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref active, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2901997937u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; FlashLightsFailure.Active = active; } } } [ServerRpc(RequireOwnership = false)] public void SetEntranceServerRpc(bool active) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(550970534u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref active, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 550970534u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SetEntranceClientRpc(active); } } } [ServerRpc(RequireOwnership = false)] public void SetMetalOffNetServerRpc(bool active) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3299014331u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref active, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3299014331u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SetMetalOffNetClientRpc(active); } } } [ClientRpc] public void SetMetalOffNetClientRpc(bool active) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3060036059u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref active, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3060036059u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; NotMetal.Active = active; } } } [ServerRpc(RequireOwnership = false)] public void SetMetalOnNetServerRpc(bool active) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2499070959u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref active, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2499070959u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SetMetalOnNetClientRpc(active); } } } [ClientRpc] public void SetMetalOnNetClientRpc(bool active) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2443911055u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref active, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2443911055u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; IsMetal.Active = active; } } } [ServerRpc(RequireOwnership = false)] public void CruiserFailureServerRpc(bool active) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3964987524u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref active, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3964987524u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; CruiserFailureClientRpc(active); } } } [ClientRpc] public void CruiserFailureClientRpc(bool active) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1138105266u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref active, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1138105266u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; CruiserFailure.Active = active; } } } [ServerRpc(RequireOwnership = false)] public void SetMoldServerRpc(bool canSpawnMold, int iterations) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(754265033u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref canSpawnMold, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val2, iterations); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 754265033u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SetMoldClientRpc(canSpawnMold, iterations); } } } [ClientRpc] public void SetMoldClientRpc(bool canSpawnMold, int iterations) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3513712149u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref canSpawnMold, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val2, iterations); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3513712149u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SelectableLevel currentLevel = RoundManager.Instance.currentLevel; if ((Object)(object)currentLevel != (Object)null) { currentLevel.canSpawnMold = canSpawnMold; currentLevel.moldSpreadIterations = iterations; } } } [ServerRpc(RequireOwnership = false)] public void SaveOriginalMoldPreviousDataServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2473314841u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2473314841u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SaveOriginalMoldPreviousDataClientRpc(); } } } [ClientRpc] public void SaveOriginalMoldPreviousDataClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1026406775u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1026406775u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SelectableLevel currentLevel = RoundManager.Instance.currentLevel; if ((Object)(object)currentLevel != (Object)null && !Manager.originalMoonMoldData.ContainsKey(currentLevel.PlanetName)) { Manager.originalMoonMoldData.Add(currentLevel.PlanetName, (currentLevel.canSpawnMold, currentLevel.moldSpreadIterations)); } } } [ServerRpc(RequireOwnership = false)] public void SyncHeatMapServerRpc(ServerRpcParams rpcParams = default(ServerRpcParams)) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_010a: Unknown result type (might be due to invalid IL or missing references) //IL_0114: 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_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_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)) { FastBufferWriter val = ((NetworkBehaviour)this).__beginSendServerRpc(2084493939u, rpcParams, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val, 2084493939u, rpcParams, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (((NetworkBehaviour)RoundManager.Instance).IsServer) { ulong senderClientId = rpcParams.Receive.SenderClientId; int[] keys = Manager.heatDifficulty.Keys.ToArray(); float[] values = Manager.heatDifficulty.Values.ToArray(); ClientRpcParams val2 = default(ClientRpcParams); val2.Send = new ClientRpcSendParams { TargetClientIds = new ulong[1] { senderClientId } }; ClientRpcParams rpcParams2 = val2; SyncHeatMapClientRpc(keys, values, rpcParams2); } } } [ClientRpc] public void SyncHeatMapClientRpc(int[] keys, float[] values, ClientRpcParams rpcParams = default(ClientRpcParams)) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_012c: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { FastBufferWriter val = ((NetworkBehaviour)this).__beginSendClientRpc(408349863u, rpcParams, (RpcDelivery)0); bool flag = keys != null; ((FastBufferWriter)(ref val)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val)).WriteValueSafe(keys, default(ForPrimitives)); } bool flag2 = values != null; ((FastBufferWriter)(ref val)).WriteValueSafe(ref flag2, default(ForPrimitives)); if (flag2) { ((FastBufferWriter)(ref val)).WriteValueSafe(values, default(ForPrimitives)); } ((NetworkBehaviour)this).__endSendClientRpc(ref val, 408349863u, rpcParams, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; Manager.heatDifficulty.Clear(); for (int i = 0; i < keys.Length; i++) { Log.LogInfo("Got heat for level ID " + keys[i] + ": " + values[i]); Manager.heatDifficulty.Add(keys[i], values[i]); } Log.LogInfo("Got data from the host"); } } [ServerRpc(RequireOwnership = false)] public void SetMetalSwitchNetServerRpc(bool active) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(158049313u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref active, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 158049313u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SetMetalSwitchNetClientRpc(active); } } } [ClientRpc] public void SetMetalSwitchNetClientRpc(bool active) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3615018900u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref active, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3615018900u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; MetalSwitch.Active = active; } } } [ServerRpc(RequireOwnership = false)] public void SetKidnapperFoxNetServerRpc(bool active) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1975040828u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref active, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1975040828u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SetKidnapperFoxNetClientRpc(active); } } } [ClientRpc] public void SetKidnapperFoxNetClientRpc(bool active) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3932409819u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref active, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3932409819u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; KidnapperFox.Active = active; } } } [ClientRpc] public void SetEntranceClientRpc(bool active) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3843484901u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref active, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3843484901u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; LockedEntrance.Active = active; } } } [ServerRpc(RequireOwnership = false)] public void LightsOffServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(821412973u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 821412973u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; LightsOffClientRpc(); } } } [ClientRpc] public void LightsOffClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1327168622u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1327168622u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; GameObject hangarShip = Assets.hangarShip; if ((Object)(object)hangarShip == (Object)null) { return; } GameObject gameObject = ((Component)hangarShip.transform.Find("ShipElectricLights")).gameObject; if (!((Object)(object)gameObject == (Object)null)) { Transform obj = gameObject.transform.Find("Area Light (3)"); GameObject val3 = ((obj != null) ? ((Component)obj).gameObject : null); if ((Object)(object)val3 != (Object)null) { val3.SetActive(false); } Transform obj2 = gameObject.transform.Find("Area Light (4)"); GameObject val4 = ((obj2 != null) ? ((Component)obj2).gameObject : null); if ((Object)(object)val4 != (Object)null) { val4.SetActive(false); } Transform obj3 = gameObject.transform.Find("Area Light (5)"); GameObject val5 = ((obj3 != null) ? ((Component)obj3).gameObject : null); if ((Object)(object)val5 != (Object)null) { val5.SetActive(false); } Transform obj4 = gameObject.transform.Find("Area Light (7)"); GameObject val6 = ((obj4 != null) ? ((Component)obj4).gameObject : null); if ((Object)(object)val6 != (Object)null) { val6.SetActive(false); } Transform obj5 = gameObject.transform.Find("Area Light (8)"); GameObject val7 = ((obj5 != null) ? ((Component)obj5).gameObject : null); if ((Object)(object)val7 != (Object)null) { val7.SetActive(false); } Transform obj6 = gameObject.transform.Find("Area Light (9)"); GameObject val8 = ((obj6 != null) ? ((Component)obj6).gameObject : null); if ((Object)(object)val8 != (Object)null) { val8.SetActive(false); } } } [ServerRpc(RequireOwnership = false)] public void LightsOnServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3721949995u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3721949995u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; LightsOnClientRpc(); } } } [ClientRpc] public void LightsOnClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1497412850u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1497412850u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; GameObject hangarShip = Assets.hangarShip; if ((Object)(object)hangarShip == (Object)null) { return; } GameObject gameObject = ((Component)hangarShip.transform.Find("ShipElectricLights")).gameObject; if (!((Object)(object)gameObject == (Object)null)) { Transform obj = gameObject.transform.Find("Area Light (3)"); GameObject val3 = ((obj != null) ? ((Component)obj).gameObject : null); if ((Object)(object)val3 != (Object)null) { val3.SetActive(true); } Transform obj2 = gameObject.transform.Find("Area Light (4)"); GameObject val4 = ((obj2 != null) ? ((Component)obj2).gameObject : null); if ((Object)(object)val4 != (Object)null) { val4.SetActive(true); } Transform obj3 = gameObject.transform.Find("Area Light (5)"); GameObject val5 = ((obj3 != null) ? ((Component)obj3).gameObject : null); if ((Object)(object)val5 != (Object)null) { val5.SetActive(true); } Transform obj4 = gameObject.transform.Find("Area Light (7)"); GameObject val6 = ((obj4 != null) ? ((Component)obj4).gameObject : null); if ((Object)(object)val6 != (Object)null) { val6.SetActive(true); } Transform obj5 = gameObject.transform.Find("Area Light (8)"); GameObject val7 = ((obj5 != null) ? ((Component)obj5).gameObject : null); if ((Object)(object)val7 != (Object)null) { val7.SetActive(true); } Transform obj6 = gameObject.transform.Find("Area Light (9)"); GameObject val8 = ((obj6 != null) ? ((Component)obj6).gameObject : null); if ((Object)(object)val8 != (Object)null) { val8.SetActive(true); } } } [ServerRpc(RequireOwnership = false)] public void TeleportPlayerServerRPC(NetworkObjectReference obj, Vector3 pos) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2791130155u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref obj, default(ForNetworkSerializable)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref pos); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2791130155u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; TeleportPlayerClientRPC(obj, pos); } } } [ClientRpc] public void TeleportPlayerClientRPC(NetworkObjectReference obj, Vector3 pos) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_00a4: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1317211983u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref obj, default(ForNetworkSerializable)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref pos); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1317211983u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; NetworkObject val3 = null; ((NetworkObjectReference)(ref obj)).TryGet(ref val3, (NetworkManager)null); if ((Object)(object)val3 == (Object)null) { Log.LogError("NetworkObject in TeleportPlayerClientRpc() is null."); return; } PlayerControllerB component = ((Component)val3).GetComponent(); if ((Object)(object)component != (Object)null) { component.isInElevator = false; component.isInHangarShipRoom = false; component.isInsideFactory = true; component.averageVelocity = 0f; component.velocityLastFrame = Vector3.zero; component.TeleportPlayer(pos, false, 0f, false, true); component.beamOutParticle.Play(); AudioReverbPresets val4 = Object.FindObjectOfType(); if ((Object)(object)val4 != (Object)null) { val4.audioPresets[2].ChangeAudioReverbForPlayer(component); } } } [HarmonyPostfix] [HarmonyPriority(700)] [HarmonyPatch(typeof(GameNetworkManager), "Start")] private static void InitalizeServerObject() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown if (!((Object)(object)netObject != (Object)null)) { netObject = (GameObject)Assets.bundle.LoadAsset("BrutalCompanyMinus"); netObject.AddComponent(); netObject.AddComponent(); NetworkManager.Singleton.AddNetworkPrefab(netObject); } } [HarmonyPrefix] [HarmonyPriority(700)] [HarmonyPatch(typeof(Terminal), "Start")] private static void SpawnServerObject() { if (Object.FindObjectOfType().IsServer) { GameObject val = Object.Instantiate(netObject); val.GetComponent().Spawn(false); } } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "ShipLeave")] private static void OnGameEnd() { if (NetworkManager.Singleton.IsServer) { Instance.UpdateCurrentWeatherMultipliersServerRpc(); Instance.SetRecievedServerRpc(state: false); Instance.currentWeatherEffects.Clear(); Instance.outsideObjectsToSpawn.Clear(); } } [ServerRpc(RequireOwnership = false)] public void ResizeHotbarRandomlyServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(891856511u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 891856511u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ResizeHotbarRandomlyClientRpc(); } } } [ClientRpc] public void ResizeHotbarRandomlyClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2283522242u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2283522242u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (Compatibility.HotBarPlusPresent) { HotBarPlusCompat.ResizeHotbarRandomly(); } } } [ServerRpc(RequireOwnership = false)] public void ResizeHotbarRandomlySmallServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(623290537u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 623290537u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ResizeHotbarRandomlySmallClientRpc(); } } } [ClientRpc] public void ResizeHotbarRandomlySmallClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(278466489u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 278466489u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (Compatibility.HotBarPlusPresent) { HotBarPlusCompat.ResizeHotbarRandomlySmall(); } } } [ServerRpc(RequireOwnership = false)] public void ResetHotbarServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1475870770u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1475870770u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (Compatibility.HotBarPlusPresent) { ResetHotbarClientRpc(); } } } [ClientRpc] public void ResetHotbarClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2241597322u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2241597322u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (Compatibility.HotBarPlusPresent) { HotBarPlusCompat.ResetHotbar(); } } } [ServerRpc(RequireOwnership = false)] public void SetCruiserOfflineServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3063201182u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3063201182u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SetCruiserOfflineClientRpc(); } } } [ClientRpc] public void SetCruiserOfflineClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3008204u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3008204u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; try { GameObject cruiser = Assets.cruiser; if ((Object)(object)cruiser != (Object)null) { Log.LogInfo("Cruiser found, attempting to set ignition off."); try { VehicleController component = Assets.cruiser.GetComponent(); component.SetIgnition(false); return; } catch (Exception ex) { Log.LogError("Error setting cruiser ignition " + ex.Message); return; } } } catch (Exception ex2) { Log.LogError("Error finding cruiser or setting ignition " + ex2.Message); } } [ServerRpc(RequireOwnership = false)] public void SyncLeverTooltipServerRpc(string text) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: 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(1412564141u, val, (RpcDelivery)0); bool flag = text != null; ((FastBufferWriter)(ref val2)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(text, false); } ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1412564141u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SyncLeverTooltipClientRpc(text); } } [ClientRpc] public void SyncLeverTooltipClientRpc(string text) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2182180903u, val, (RpcDelivery)0); bool flag = text != null; ((FastBufferWriter)(ref val2)).WriteValueSafe(ref flag, default(ForPrimitives)); if (flag) { ((FastBufferWriter)(ref val2)).WriteValueSafe(text, false); } ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2182180903u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; try { StartMatchLever val3 = Object.FindObjectOfType(); val3.triggerScript.disabledHoverTip = text; } catch (Exception data) { Log.LogError(data); } } protected override void __initializeVariables() { if (currentWeatherMultipliers == null) { throw new Exception("Net.currentWeatherMultipliers cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)currentWeatherMultipliers).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)currentWeatherMultipliers, "currentWeatherMultipliers"); base.NetworkVariableFields.Add((NetworkVariableBase)(object)currentWeatherMultipliers); if (outsideObjectsToSpawn == null) { throw new Exception("Net.outsideObjectsToSpawn cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)outsideObjectsToSpawn).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)outsideObjectsToSpawn, "outsideObjectsToSpawn"); base.NetworkVariableFields.Add((NetworkVariableBase)(object)outsideObjectsToSpawn); if (currentWeatherEffects == null) { throw new Exception("Net.currentWeatherEffects cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)currentWeatherEffects).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)currentWeatherEffects, "currentWeatherEffects"); base.NetworkVariableFields.Add((NetworkVariableBase)(object)currentWeatherEffects); if (textUI == null) { throw new Exception("Net.textUI cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)textUI).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)textUI, "textUI"); base.NetworkVariableFields.Add((NetworkVariableBase)(object)textUI); if (LeverUnityNet == null) { throw new Exception("Net.LeverUnityNet cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)LeverUnityNet).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)LeverUnityNet, "LeverUnityNet"); base.NetworkVariableFields.Add((NetworkVariableBase)(object)LeverUnityNet); if (WalkiesUnityNet == null) { throw new Exception("Net.WalkiesUnityNet cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)WalkiesUnityNet).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)WalkiesUnityNet, "WalkiesUnityNet"); base.NetworkVariableFields.Add((NetworkVariableBase)(object)WalkiesUnityNet); if (JetpackUnityNet == null) { throw new Exception("Net.JetpackUnityNet cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)JetpackUnityNet).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)JetpackUnityNet, "JetpackUnityNet"); base.NetworkVariableFields.Add((NetworkVariableBase)(object)JetpackUnityNet); if (TerminalUnityNet == null) { throw new Exception("Net.TerminalUnityNet cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)TerminalUnityNet).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)TerminalUnityNet, "TerminalUnityNet"); base.NetworkVariableFields.Add((NetworkVariableBase)(object)TerminalUnityNet); if (TargetingUnityNet == null) { throw new Exception("Net.TargetingUnityNet cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)TargetingUnityNet).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)TargetingUnityNet, "TargetingUnityNet"); base.NetworkVariableFields.Add((NetworkVariableBase)(object)TargetingUnityNet); if (TeleporterUnityNet == null) { throw new Exception("Net.TeleporterUnityNet cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)TeleporterUnityNet).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)TeleporterUnityNet, "TeleporterUnityNet"); base.NetworkVariableFields.Add((NetworkVariableBase)(object)TeleporterUnityNet); if (ItemChargerUnityNet == null) { throw new Exception("Net.ItemChargerUnityNet cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)ItemChargerUnityNet).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)ItemChargerUnityNet, "ItemChargerUnityNet"); base.NetworkVariableFields.Add((NetworkVariableBase)(object)ItemChargerUnityNet); if (CircuitUnityNet == null) { throw new Exception("Net.CircuitUnityNet cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)CircuitUnityNet).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)CircuitUnityNet, "CircuitUnityNet"); base.NetworkVariableFields.Add((NetworkVariableBase)(object)CircuitUnityNet); if (DoorOvUnityNet == null) { throw new Exception("Net.DoorOvUnityNet cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)DoorOvUnityNet).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)DoorOvUnityNet, "DoorOvUnityNet"); base.NetworkVariableFields.Add((NetworkVariableBase)(object)DoorOvUnityNet); if (DoorUnityNet == null) { throw new Exception("Net.DoorUnityNet cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)DoorUnityNet).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)DoorUnityNet, "DoorUnityNet"); base.NetworkVariableFields.Add((NetworkVariableBase)(object)DoorUnityNet); if (CameraUnityNet == null) { throw new Exception("Net.CameraUnityNet cannot be null. All NetworkVariableBase instances must be initialized."); } ((NetworkVariableBase)CameraUnityNet).Initialize((NetworkBehaviour)(object)this); ((NetworkBehaviour)this).__nameNetworkVariable((NetworkVariableBase)(object)CameraUnityNet, "CameraUnityNet"); base.NetworkVariableFields.Add((NetworkVariableBase)(object)CameraUnityNet); ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Expected O, but got Unknown //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Expected O, but got Unknown //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Expected O, but got Unknown //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Expected O, but got Unknown //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Expected O, but got Unknown //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Expected O, but got Unknown //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Expected O, but got Unknown //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Expected O, but got Unknown //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_024c: Expected O, but got Unknown //IL_0259: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Expected O, but got Unknown //IL_0275: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Expected O, but got Unknown //IL_0291: Unknown result type (might be due to invalid IL or missing references) //IL_02a0: Expected O, but got Unknown //IL_02ad: Unknown result type (might be due to invalid IL or missing references) //IL_02bc: Expected O, but got Unknown //IL_02c9: Unknown result type (might be due to invalid IL or missing references) //IL_02d8: Expected O, but got Unknown //IL_02e5: Unknown result type (might be due to invalid IL or missing references) //IL_02f4: Expected O, but got Unknown //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_0310: Expected O, but got Unknown //IL_031d: Unknown result type (might be due to invalid IL or missing references) //IL_032c: Expected O, but got Unknown //IL_0339: Unknown result type (might be due to invalid IL or missing references) //IL_0348: Expected O, but got Unknown //IL_0355: Unknown result type (might be due to invalid IL or missing references) //IL_0364: Expected O, but got Unknown //IL_0371: Unknown result type (might be due to invalid IL or missing references) //IL_0380: Expected O, but got Unknown //IL_038d: Unknown result type (might be due to invalid IL or missing references) //IL_039c: Expected O, but got Unknown //IL_03a9: Unknown result type (might be due to invalid IL or missing references) //IL_03b8: Expected O, but got Unknown //IL_03c5: Unknown result type (might be due to invalid IL or missing references) //IL_03d4: Expected O, but got Unknown //IL_03e1: Unknown result type (might be due to invalid IL or missing references) //IL_03f0: Expected O, but got Unknown //IL_03fd: Unknown result type (might be due to invalid IL or missing references) //IL_040c: Expected O, but got Unknown //IL_0419: Unknown result type (might be due to invalid IL or missing references) //IL_0428: Expected O, but got Unknown //IL_0435: Unknown result type (might be due to invalid IL or missing references) //IL_0444: Expected O, but got Unknown //IL_0451: Unknown result type (might be due to invalid IL or missing references) //IL_0460: Expected O, but got Unknown //IL_046d: Unknown result type (might be due to invalid IL or missing references) //IL_047c: Expected O, but got Unknown //IL_0489: Unknown result type (might be due to invalid IL or missing references) //IL_0498: Expected O, but got Unknown //IL_04a5: Unknown result type (might be due to invalid IL or missing references) //IL_04b4: Expected O, but got Unknown //IL_04c1: Unknown result type (might be due to invalid IL or missing references) //IL_04d0: Expected O, but got Unknown //IL_04dd: Unknown result type (might be due to invalid IL or missing references) //IL_04ec: Expected O, but got Unknown //IL_04f9: Unknown result type (might be due to invalid IL or missing references) //IL_0508: Expected O, but got Unknown //IL_0515: Unknown result type (might be due to invalid IL or missing references) //IL_0524: Expected O, but got Unknown //IL_0531: Unknown result type (might be due to invalid IL or missing references) //IL_0540: Expected O, but got Unknown //IL_054d: Unknown result type (might be due to invalid IL or missing references) //IL_055c: Expected O, but got Unknown //IL_0569: Unknown result type (might be due to invalid IL or missing references) //IL_0578: Expected O, but got Unknown //IL_0585: Unknown result type (might be due to invalid IL or missing references) //IL_0594: Expected O, but got Unknown //IL_05a1: Unknown result type (might be due to invalid IL or missing references) //IL_05b0: Expected O, but got Unknown //IL_05bd: Unknown result type (might be due to invalid IL or missing references) //IL_05cc: Expected O, but got Unknown //IL_05d9: Unknown result type (might be due to invalid IL or missing references) //IL_05e8: Expected O, but got Unknown //IL_05f5: Unknown result type (might be due to invalid IL or missing references) //IL_0604: Expected O, but got Unknown //IL_0611: Unknown result type (might be due to invalid IL or missing references) //IL_0620: Expected O, but got Unknown //IL_062d: Unknown result type (might be due to invalid IL or missing references) //IL_063c: Expected O, but got Unknown //IL_0649: Unknown result type (might be due to invalid IL or missing references) //IL_0658: Expected O, but got Unknown //IL_0665: Unknown result type (might be due to invalid IL or missing references) //IL_0674: Expected O, but got Unknown //IL_0681: Unknown result type (might be due to invalid IL or missing references) //IL_0690: Expected O, but got Unknown //IL_069d: Unknown result type (might be due to invalid IL or missing references) //IL_06ac: Expected O, but got Unknown //IL_06b9: Unknown result type (might be due to invalid IL or missing references) //IL_06c8: Expected O, but got Unknown //IL_06d5: Unknown result type (might be due to invalid IL or missing references) //IL_06e4: Expected O, but got Unknown //IL_06f1: Unknown result type (might be due to invalid IL or missing references) //IL_0700: Expected O, but got Unknown //IL_070d: Unknown result type (might be due to invalid IL or missing references) //IL_071c: Expected O, but got Unknown //IL_0729: Unknown result type (might be due to invalid IL or missing references) //IL_0738: Expected O, but got Unknown //IL_0745: Unknown result type (might be due to invalid IL or missing references) //IL_0754: Expected O, but got Unknown //IL_0761: Unknown result type (might be due to invalid IL or missing references) //IL_0770: Expected O, but got Unknown //IL_077d: Unknown result type (might be due to invalid IL or missing references) //IL_078c: Expected O, but got Unknown //IL_0799: Unknown result type (might be due to invalid IL or missing references) //IL_07a8: Expected O, but got Unknown //IL_07b5: Unknown result type (might be due to invalid IL or missing references) //IL_07c4: Expected O, but got Unknown //IL_07d1: Unknown result type (might be due to invalid IL or missing references) //IL_07e0: Expected O, but got Unknown //IL_07ed: Unknown result type (might be due to invalid IL or missing references) //IL_07fc: Expected O, but got Unknown //IL_0809: Unknown result type (might be due to invalid IL or missing references) //IL_0818: Expected O, but got Unknown //IL_0825: Unknown result type (might be due to invalid IL or missing references) //IL_0834: Expected O, but got Unknown //IL_0841: Unknown result type (might be due to invalid IL or missing references) //IL_0850: Expected O, but got Unknown //IL_085d: Unknown result type (might be due to invalid IL or missing references) //IL_086c: Expected O, but got Unknown //IL_0879: Unknown result type (might be due to invalid IL or missing references) //IL_0888: Expected O, but got Unknown //IL_0895: Unknown result type (might be due to invalid IL or missing references) //IL_08a4: Expected O, but got Unknown //IL_08b1: Unknown result type (might be due to invalid IL or missing references) //IL_08c0: Expected O, but got Unknown //IL_08cd: Unknown result type (might be due to invalid IL or missing references) //IL_08dc: Expected O, but got Unknown //IL_08e9: Unknown result type (might be due to invalid IL or missing references) //IL_08f8: Expected O, but got Unknown //IL_0905: Unknown result type (might be due to invalid IL or missing references) //IL_0914: Expected O, but got Unknown //IL_0921: Unknown result type (might be due to invalid IL or missing references) //IL_0930: Expected O, but got Unknown //IL_093d: Unknown result type (might be due to invalid IL or missing references) //IL_094c: Expected O, but got Unknown //IL_0959: Unknown result type (might be due to invalid IL or missing references) //IL_0968: Expected O, but got Unknown //IL_0975: Unknown result type (might be due to invalid IL or missing references) //IL_0984: Expected O, but got Unknown //IL_0991: Unknown result type (might be due to invalid IL or missing references) //IL_09a0: Expected O, but got Unknown //IL_09ad: Unknown result type (might be due to invalid IL or missing references) //IL_09bc: Expected O, but got Unknown //IL_09c9: Unknown result type (might be due to invalid IL or missing references) //IL_09d8: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1644092438u, new RpcReceiveHandler(__rpc_handler_1644092438), "GetSyncedTextServerRpc"); ((NetworkBehaviour)this).__registerRpc(1434020377u, new RpcReceiveHandler(__rpc_handler_1434020377), "GetSyncedTextClientRpc"); ((NetworkBehaviour)this).__registerRpc(2319565597u, new RpcReceiveHandler(__rpc_handler_2319565597), "GiveSeedServerRpc"); ((NetworkBehaviour)this).__registerRpc(2006375022u, new RpcReceiveHandler(__rpc_handler_2006375022), "GiveSeedClientRpc"); ((NetworkBehaviour)this).__registerRpc(3809690504u, new RpcReceiveHandler(__rpc_handler_3809690504), "ClearGameObjectsServerRpc"); ((NetworkBehaviour)this).__registerRpc(174694319u, new RpcReceiveHandler(__rpc_handler_174694319), "ClearGameObjectsClientRpc"); ((NetworkBehaviour)this).__registerRpc(2150416984u, new RpcReceiveHandler(__rpc_handler_2150416984), "SyncValuesClientRpc"); ((NetworkBehaviour)this).__registerRpc(875794818u, new RpcReceiveHandler(__rpc_handler_875794818), "SyncScrapValueServerRpc"); ((NetworkBehaviour)this).__registerRpc(268987115u, new RpcReceiveHandler(__rpc_handler_268987115), "SyncScrapValueClientRpc"); ((NetworkBehaviour)this).__registerRpc(2205229909u, new RpcReceiveHandler(__rpc_handler_2205229909), "GenerateAndSyncTerminalCodeServerRpc"); ((NetworkBehaviour)this).__registerRpc(3849078077u, new RpcReceiveHandler(__rpc_handler_3849078077), "GenerateAndSyncTerminalCodeClientRpc"); ((NetworkBehaviour)this).__registerRpc(2208211795u, new RpcReceiveHandler(__rpc_handler_2208211795), "MoveTimeServerRpc"); ((NetworkBehaviour)this).__registerRpc(3436861046u, new RpcReceiveHandler(__rpc_handler_3436861046), "MoveTimeClientRpc"); ((NetworkBehaviour)this).__registerRpc(2853396074u, new RpcReceiveHandler(__rpc_handler_2853396074), "SetTimeMultiplierServerRpc"); ((NetworkBehaviour)this).__registerRpc(512763078u, new RpcReceiveHandler(__rpc_handler_512763078), "SetTimeMultiplierClientRpc"); ((NetworkBehaviour)this).__registerRpc(1744607847u, new RpcReceiveHandler(__rpc_handler_1744607847), "ShowCaseEventsClientRpc"); ((NetworkBehaviour)this).__registerRpc(1335262659u, new RpcReceiveHandler(__rpc_handler_1335262659), "InitalizeCurrentWeatherMultipliersServerRpc"); ((NetworkBehaviour)this).__registerRpc(466041418u, new RpcReceiveHandler(__rpc_handler_466041418), "UpdateCurrentWeatherMultipliersServerRpc"); ((NetworkBehaviour)this).__registerRpc(1853859009u, new RpcReceiveHandler(__rpc_handler_1853859009), "SetRecievedServerRpc"); ((NetworkBehaviour)this).__registerRpc(603622741u, new RpcReceiveHandler(__rpc_handler_603622741), "SetRecievedClientRpc"); ((NetworkBehaviour)this).__registerRpc(4203994123u, new RpcReceiveHandler(__rpc_handler_4203994123), "SetRealityShiftActiveServerRpc"); ((NetworkBehaviour)this).__registerRpc(2568149201u, new RpcReceiveHandler(__rpc_handler_2568149201), "SetRealityShiftActiveClientRpc"); ((NetworkBehaviour)this).__registerRpc(1050877662u, new RpcReceiveHandler(__rpc_handler_1050877662), "SetAllWeatherActiveServerRpc"); ((NetworkBehaviour)this).__registerRpc(1627891447u, new RpcReceiveHandler(__rpc_handler_1627891447), "SetAllWeatherActiveClientRpc"); ((NetworkBehaviour)this).__registerRpc(2405040997u, new RpcReceiveHandler(__rpc_handler_2405040997), "SetEventActiveServerRPC"); ((NetworkBehaviour)this).__registerRpc(1527620954u, new RpcReceiveHandler(__rpc_handler_1527620954), "SetEventActiveClientRPC"); ((NetworkBehaviour)this).__registerRpc(3368901509u, new RpcReceiveHandler(__rpc_handler_3368901509), "MessWithLightsServerRpc"); ((NetworkBehaviour)this).__registerRpc(2808903510u, new RpcReceiveHandler(__rpc_handler_2808903510), "MessWithLightsClientRpc"); ((NetworkBehaviour)this).__registerRpc(3941924814u, new RpcReceiveHandler(__rpc_handler_3941924814), "MessWithBreakerServerRpc"); ((NetworkBehaviour)this).__registerRpc(3457555438u, new RpcReceiveHandler(__rpc_handler_3457555438), "MessWithBreakerClientRpc"); ((NetworkBehaviour)this).__registerRpc(2842285472u, new RpcReceiveHandler(__rpc_handler_2842285472), "MessWithDoorsServerRpc"); ((NetworkBehaviour)this).__registerRpc(1683303265u, new RpcReceiveHandler(__rpc_handler_1683303265), "MessWithDoorsClientRpc"); ((NetworkBehaviour)this).__registerRpc(1559123307u, new RpcReceiveHandler(__rpc_handler_1559123307), "UnlockAndOpenAllDoorsServerRpc"); ((NetworkBehaviour)this).__registerRpc(969155834u, new RpcReceiveHandler(__rpc_handler_969155834), "UnlockAndOpenAllDoorsClientRpc"); ((NetworkBehaviour)this).__registerRpc(2551708642u, new RpcReceiveHandler(__rpc_handler_2551708642), "LockAndCloseAllDoorsServerRpc"); ((NetworkBehaviour)this).__registerRpc(3849447749u, new RpcReceiveHandler(__rpc_handler_3849447749), "LockAndCloseAllDoorsClientRpc"); ((NetworkBehaviour)this).__registerRpc(3079998733u, new RpcReceiveHandler(__rpc_handler_3079998733), "SpawnMudPilesOutsideServerRpc"); ((NetworkBehaviour)this).__registerRpc(1000423920u, new RpcReceiveHandler(__rpc_handler_1000423920), "SpawnMudPilesOutsideClientRpc"); ((NetworkBehaviour)this).__registerRpc(234264786u, new RpcReceiveHandler(__rpc_handler_234264786), "TeleportEnemyServerRpc"); ((NetworkBehaviour)this).__registerRpc(1650168377u, new RpcReceiveHandler(__rpc_handler_1650168377), "TeleportEnemyClientRpc"); ((NetworkBehaviour)this).__registerRpc(3701680339u, new RpcReceiveHandler(__rpc_handler_3701680339), "SpawnAllWeatherServerRpc"); ((NetworkBehaviour)this).__registerRpc(910007267u, new RpcReceiveHandler(__rpc_handler_910007267), "SpawnAllWeatherClientRpc"); ((NetworkBehaviour)this).__registerRpc(716805725u, new RpcReceiveHandler(__rpc_handler_716805725), "ShiftServerRpc"); ((NetworkBehaviour)this).__registerRpc(4160371367u, new RpcReceiveHandler(__rpc_handler_4160371367), "AddObjectToGrabToListClientRpc"); ((NetworkBehaviour)this).__registerRpc(3192420881u, new RpcReceiveHandler(__rpc_handler_3192420881), "GenerateShiftableObjectsListServerRpc"); ((NetworkBehaviour)this).__registerRpc(2458116008u, new RpcReceiveHandler(__rpc_handler_2458116008), "GenerateShiftableObjectsListClientRpc"); ((NetworkBehaviour)this).__registerRpc(1685788616u, new RpcReceiveHandler(__rpc_handler_1685788616), "FireAtServerRpc"); ((NetworkBehaviour)this).__registerRpc(2615626191u, new RpcReceiveHandler(__rpc_handler_2615626191), "FireAtClientRpc"); ((NetworkBehaviour)this).__registerRpc(2734280710u, new RpcReceiveHandler(__rpc_handler_2734280710), "DisplayTipServerRpc"); ((NetworkBehaviour)this).__registerRpc(1885137978u, new RpcReceiveHandler(__rpc_handler_1885137978), "DisplayTipClientRpc"); ((NetworkBehaviour)this).__registerRpc(688182791u, new RpcReceiveHandler(__rpc_handler_688182791), "BlackFridayServerRpc"); ((NetworkBehaviour)this).__registerRpc(1034762097u, new RpcReceiveHandler(__rpc_handler_1034762097), "BlackFridayClientRpc"); ((NetworkBehaviour)this).__registerRpc(1342506232u, new RpcReceiveHandler(__rpc_handler_1342506232), "SetPhonesOutServerRpc"); ((NetworkBehaviour)this).__registerRpc(3705199930u, new RpcReceiveHandler(__rpc_handler_3705199930), "SetPhonesOutClientRpc"); ((NetworkBehaviour)this).__registerRpc(2315487481u, new RpcReceiveHandler(__rpc_handler_2315487481), "SetFlashlightsServerRpc"); ((NetworkBehaviour)this).__registerRpc(2901997937u, new RpcReceiveHandler(__rpc_handler_2901997937), "SetFlashlightsClientRpc"); ((NetworkBehaviour)this).__registerRpc(550970534u, new RpcReceiveHandler(__rpc_handler_550970534), "SetEntranceServerRpc"); ((NetworkBehaviour)this).__registerRpc(3299014331u, new RpcReceiveHandler(__rpc_handler_3299014331), "SetMetalOffNetServerRpc"); ((NetworkBehaviour)this).__registerRpc(3060036059u, new RpcReceiveHandler(__rpc_handler_3060036059), "SetMetalOffNetClientRpc"); ((NetworkBehaviour)this).__registerRpc(2499070959u, new RpcReceiveHandler(__rpc_handler_2499070959), "SetMetalOnNetServerRpc"); ((NetworkBehaviour)this).__registerRpc(2443911055u, new RpcReceiveHandler(__rpc_handler_2443911055), "SetMetalOnNetClientRpc"); ((NetworkBehaviour)this).__registerRpc(3964987524u, new RpcReceiveHandler(__rpc_handler_3964987524), "CruiserFailureServerRpc"); ((NetworkBehaviour)this).__registerRpc(1138105266u, new RpcReceiveHandler(__rpc_handler_1138105266), "CruiserFailureClientRpc"); ((NetworkBehaviour)this).__registerRpc(754265033u, new RpcReceiveHandler(__rpc_handler_754265033), "SetMoldServerRpc"); ((NetworkBehaviour)this).__registerRpc(3513712149u, new RpcReceiveHandler(__rpc_handler_3513712149), "SetMoldClientRpc"); ((NetworkBehaviour)this).__registerRpc(2473314841u, new RpcReceiveHandler(__rpc_handler_2473314841), "SaveOriginalMoldPreviousDataServerRpc"); ((NetworkBehaviour)this).__registerRpc(1026406775u, new RpcReceiveHandler(__rpc_handler_1026406775), "SaveOriginalMoldPreviousDataClientRpc"); ((NetworkBehaviour)this).__registerRpc(2084493939u, new RpcReceiveHandler(__rpc_handler_2084493939), "SyncHeatMapServerRpc"); ((NetworkBehaviour)this).__registerRpc(408349863u, new RpcReceiveHandler(__rpc_handler_408349863), "SyncHeatMapClientRpc"); ((NetworkBehaviour)this).__registerRpc(158049313u, new RpcReceiveHandler(__rpc_handler_158049313), "SetMetalSwitchNetServerRpc"); ((NetworkBehaviour)this).__registerRpc(3615018900u, new RpcReceiveHandler(__rpc_handler_3615018900), "SetMetalSwitchNetClientRpc"); ((NetworkBehaviour)this).__registerRpc(1975040828u, new RpcReceiveHandler(__rpc_handler_1975040828), "SetKidnapperFoxNetServerRpc"); ((NetworkBehaviour)this).__registerRpc(3932409819u, new RpcReceiveHandler(__rpc_handler_3932409819), "SetKidnapperFoxNetClientRpc"); ((NetworkBehaviour)this).__registerRpc(3843484901u, new RpcReceiveHandler(__rpc_handler_3843484901), "SetEntranceClientRpc"); ((NetworkBehaviour)this).__registerRpc(821412973u, new RpcReceiveHandler(__rpc_handler_821412973), "LightsOffServerRpc"); ((NetworkBehaviour)this).__registerRpc(1327168622u, new RpcReceiveHandler(__rpc_handler_1327168622), "LightsOffClientRpc"); ((NetworkBehaviour)this).__registerRpc(3721949995u, new RpcReceiveHandler(__rpc_handler_3721949995), "LightsOnServerRpc"); ((NetworkBehaviour)this).__registerRpc(1497412850u, new RpcReceiveHandler(__rpc_handler_1497412850), "LightsOnClientRpc"); ((NetworkBehaviour)this).__registerRpc(2791130155u, new RpcReceiveHandler(__rpc_handler_2791130155), "TeleportPlayerServerRPC"); ((NetworkBehaviour)this).__registerRpc(1317211983u, new RpcReceiveHandler(__rpc_handler_1317211983), "TeleportPlayerClientRPC"); ((NetworkBehaviour)this).__registerRpc(891856511u, new RpcReceiveHandler(__rpc_handler_891856511), "ResizeHotbarRandomlyServerRpc"); ((NetworkBehaviour)this).__registerRpc(2283522242u, new RpcReceiveHandler(__rpc_handler_2283522242), "ResizeHotbarRandomlyClientRpc"); ((NetworkBehaviour)this).__registerRpc(623290537u, new RpcReceiveHandler(__rpc_handler_623290537), "ResizeHotbarRandomlySmallServerRpc"); ((NetworkBehaviour)this).__registerRpc(278466489u, new RpcReceiveHandler(__rpc_handler_278466489), "ResizeHotbarRandomlySmallClientRpc"); ((NetworkBehaviour)this).__registerRpc(1475870770u, new RpcReceiveHandler(__rpc_handler_1475870770), "ResetHotbarServerRpc"); ((NetworkBehaviour)this).__registerRpc(2241597322u, new RpcReceiveHandler(__rpc_handler_2241597322), "ResetHotbarClientRpc"); ((NetworkBehaviour)this).__registerRpc(3063201182u, new RpcReceiveHandler(__rpc_handler_3063201182), "SetCruiserOfflineServerRpc"); ((NetworkBehaviour)this).__registerRpc(3008204u, new RpcReceiveHandler(__rpc_handler_3008204), "SetCruiserOfflineClientRpc"); ((NetworkBehaviour)this).__registerRpc(1412564141u, new RpcReceiveHandler(__rpc_handler_1412564141), "SyncLeverTooltipServerRpc"); ((NetworkBehaviour)this).__registerRpc(2182180903u, new RpcReceiveHandler(__rpc_handler_2182180903), "SyncLeverTooltipClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1644092438(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).GetSyncedTextServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1434020377(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { FixedString4096Bytes val = default(FixedString4096Bytes); ((FastBufferReader)(ref reader)).ReadValueSafe(ref val, default(ForFixedStrings)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).GetSyncedTextClientRpc(val); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2319565597(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).GiveSeedServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2006375022(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int seed = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref seed); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).GiveSeedClientRpc(seed); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3809690504(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).ClearGameObjectsServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_174694319(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).ClearGameObjectsClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2150416984(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: 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_0087: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { float factorySizeMultiplier = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref factorySizeMultiplier, default(ForPrimitives)); float scrapValueMultiplier = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref scrapValueMultiplier, default(ForPrimitives)); float scrapAmountMultiplier = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref scrapAmountMultiplier, default(ForPrimitives)); int bonusMaxHp = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref bonusMaxHp); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).SyncValuesClientRpc(factorySizeMultiplier, scrapValueMultiplier, scrapAmountMultiplier, bonusMaxHp); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_875794818(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_009e: 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_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { NetworkObjectReference obj = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref obj, default(ForNetworkSerializable)); int value = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref value); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).SyncScrapValueServerRpc(obj, value); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_268987115(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkObjectReference obj = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref obj, default(ForNetworkSerializable)); int value = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref value); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).SyncScrapValueClientRpc(obj, value); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2205229909(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkObjectReference val = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref val, default(ForNetworkSerializable)); int code = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref code); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).GenerateAndSyncTerminalCodeServerRpc(val, code); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3849078077(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkObjectReference val = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref val, default(ForNetworkSerializable)); int code = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref code); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).GenerateAndSyncTerminalCodeClientRpc(val, code); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2208211795(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { float amount = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref amount, default(ForPrimitives)); float speedMultiplier = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref speedMultiplier, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).MoveTimeServerRpc(amount, speedMultiplier); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3436861046(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { float amount = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref amount, default(ForPrimitives)); float speedMultiplier = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref speedMultiplier, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).MoveTimeClientRpc(amount, speedMultiplier); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2853396074(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { float timeMultiplierServerRpc = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref timeMultiplierServerRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).SetTimeMultiplierServerRpc(timeMultiplierServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_512763078(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { float timeMultiplierClientRpc = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref timeMultiplierClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).SetTimeMultiplierClientRpc(timeMultiplierClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1744607847(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).ShowCaseEventsClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1335262659(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).InitalizeCurrentWeatherMultipliersServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_466041418(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).UpdateCurrentWeatherMultipliersServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1853859009(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool recievedServerRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref recievedServerRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).SetRecievedServerRpc(recievedServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_603622741(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool recievedClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref recievedClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).SetRecievedClientRpc(recievedClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4203994123(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool realityShiftActiveServerRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref realityShiftActiveServerRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).SetRealityShiftActiveServerRpc(realityShiftActiveServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2568149201(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool realityShiftActiveClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref realityShiftActiveClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).SetRealityShiftActiveClientRpc(realityShiftActiveClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1050877662(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool allWeatherActiveServerRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref allWeatherActiveServerRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).SetAllWeatherActiveServerRpc(allWeatherActiveServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1627891447(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool allWeatherActiveClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref allWeatherActiveClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).SetAllWeatherActiveClientRpc(allWeatherActiveClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2405040997(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); string eventName = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref eventName, false); } bool state = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref state, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).SetEventActiveServerRPC(eventName, state); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1527620954(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); string eventName = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref eventName, false); } bool state = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref state, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).SetEventActiveClientRPC(eventName, state); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3368901509(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).MessWithLightsServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2808903510(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).MessWithLightsClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3941924814(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool state = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref state, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).MessWithBreakerServerRpc(state); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3457555438(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool state = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref state, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).MessWithBreakerClientRpc(state); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2842285472(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006b: 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_009c: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { float openCloseChance = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref openCloseChance, default(ForPrimitives)); bool messWithLock = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref messWithLock, default(ForPrimitives)); float messWithLockChance = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref messWithLockChance, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).MessWithDoorsServerRpc(openCloseChance, messWithLock, messWithLockChance); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1683303265(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005d: 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_0078: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { float openCloseChance = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref openCloseChance, default(ForPrimitives)); int seed = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref seed); bool messWithLock = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref messWithLock, default(ForPrimitives)); float messWithLockChance = default(float); ((FastBufferReader)(ref reader)).ReadValueSafe(ref messWithLockChance, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).MessWithDoorsClientRpc(openCloseChance, seed, messWithLock, messWithLockChance); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1559123307(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).UnlockAndOpenAllDoorsServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_969155834(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).UnlockAndOpenAllDoorsClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2551708642(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).LockAndCloseAllDoorsServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3849447749(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).LockAndCloseAllDoorsClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3079998733(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int amount = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref amount); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).SpawnMudPilesOutsideServerRpc(amount); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1000423920(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); int seed = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref seed); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).SpawnMudPilesOutsideClientRpc(position, seed); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_234264786(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkObjectReference enemy = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref enemy, default(ForNetworkSerializable)); Vector3 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).TeleportEnemyServerRpc(enemy, position); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1650168377(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkObjectReference enemy = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref enemy, default(ForNetworkSerializable)); Vector3 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).TeleportEnemyClientRpc(enemy, position); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3701680339(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int seed = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref seed); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).SpawnAllWeatherServerRpc(seed); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_910007267(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int seed = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref seed); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).SpawnAllWeatherClientRpc(seed); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_716805725(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkObjectReference networkObject = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref networkObject, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).ShiftServerRpc(networkObject); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4160371367(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkObjectReference obj = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref obj, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).AddObjectToGrabToListClientRpc(obj); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3192420881(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); NetworkObjectReference[] spawnedScrap = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref spawnedScrap, default(ForNetworkSerializable)); } target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).GenerateShiftableObjectsListServerRpc(spawnedScrap); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2458116008(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); NetworkObjectReference[] spawnedScrap = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref spawnedScrap, default(ForNetworkSerializable)); } target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).GenerateShiftableObjectsListClientRpc(spawnedScrap); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1685788616(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 at = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref at); Vector3 from = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref from); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).FireAtServerRpc(at, from); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2615626191(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 at = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref at); Vector3 from = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref from); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).FireAtClientRpc(at, from); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2734280710(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0067: 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_009f: 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_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); string headerText = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref headerText, false); } bool flag2 = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag2, default(ForPrimitives)); string bodyText = null; if (flag2) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref bodyText, false); } bool isWarning = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref isWarning, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).DisplayTipServerRpc(headerText, bodyText, isWarning); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1885137978(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0067: 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_009f: 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_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); string headerText = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref headerText, false); } bool flag2 = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag2, default(ForPrimitives)); string bodyText = null; if (flag2) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref bodyText, false); } bool isWarning = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref isWarning, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).DisplayTipClientRpc(headerText, bodyText, isWarning); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_688182791(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int minPercentageCut = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref minPercentageCut); int maxPercentageCut = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref maxPercentageCut); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).BlackFridayServerRpc(minPercentageCut, maxPercentageCut); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1034762097(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0030: 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: 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) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int minPercentageCut = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref minPercentageCut); int maxPercentageCut = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref maxPercentageCut); int seed = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref seed); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).BlackFridayClientRpc(minPercentageCut, maxPercentageCut, seed); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1342506232(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool phonesOutServerRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref phonesOutServerRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).SetPhonesOutServerRpc(phonesOutServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3705199930(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool phonesOutClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref phonesOutClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).SetPhonesOutClientRpc(phonesOutClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2315487481(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flashlightsServerRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flashlightsServerRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).SetFlashlightsServerRpc(flashlightsServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2901997937(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flashlightsClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flashlightsClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).SetFlashlightsClientRpc(flashlightsClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_550970534(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool entranceServerRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref entranceServerRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).SetEntranceServerRpc(entranceServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3299014331(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool metalOffNetServerRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref metalOffNetServerRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).SetMetalOffNetServerRpc(metalOffNetServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3060036059(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool metalOffNetClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref metalOffNetClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).SetMetalOffNetClientRpc(metalOffNetClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2499070959(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool metalOnNetServerRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref metalOnNetServerRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).SetMetalOnNetServerRpc(metalOnNetServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2443911055(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool metalOnNetClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref metalOnNetClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).SetMetalOnNetClientRpc(metalOnNetClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3964987524(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool active = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref active, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).CruiserFailureServerRpc(active); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1138105266(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool active = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref active, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).CruiserFailureClientRpc(active); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_754265033(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool canSpawnMold = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref canSpawnMold, default(ForPrimitives)); int iterations = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref iterations); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).SetMoldServerRpc(canSpawnMold, iterations); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3513712149(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool canSpawnMold = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref canSpawnMold, default(ForPrimitives)); int iterations = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref iterations); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).SetMoldClientRpc(canSpawnMold, iterations); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2473314841(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).SaveOriginalMoldPreviousDataServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1026406775(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).SaveOriginalMoldPreviousDataClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2084493939(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { ServerRpcParams server = rpcParams.Server; target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).SyncHeatMapServerRpc(server); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_408349863(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0074: 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_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: 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_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: 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_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); int[] keys = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref keys, default(ForPrimitives)); } bool flag2 = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag2, default(ForPrimitives)); float[] values = null; if (flag2) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref values, default(ForPrimitives)); } ClientRpcParams client = rpcParams.Client; target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).SyncHeatMapClientRpc(keys, values, client); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_158049313(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool metalSwitchNetServerRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref metalSwitchNetServerRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).SetMetalSwitchNetServerRpc(metalSwitchNetServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3615018900(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool metalSwitchNetClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref metalSwitchNetClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).SetMetalSwitchNetClientRpc(metalSwitchNetClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1975040828(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool kidnapperFoxNetServerRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref kidnapperFoxNetServerRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).SetKidnapperFoxNetServerRpc(kidnapperFoxNetServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3932409819(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool kidnapperFoxNetClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref kidnapperFoxNetClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).SetKidnapperFoxNetClientRpc(kidnapperFoxNetClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3843484901(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool entranceClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref entranceClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).SetEntranceClientRpc(entranceClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_821412973(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).LightsOffServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1327168622(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).LightsOffClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3721949995(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).LightsOnServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1497412850(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).LightsOnClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2791130155(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkObjectReference obj = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref obj, default(ForNetworkSerializable)); Vector3 pos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pos); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).TeleportPlayerServerRPC(obj, pos); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1317211983(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkObjectReference obj = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref obj, default(ForNetworkSerializable)); Vector3 pos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref pos); target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).TeleportPlayerClientRPC(obj, pos); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_891856511(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).ResizeHotbarRandomlyServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2283522242(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).ResizeHotbarRandomlyClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_623290537(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).ResizeHotbarRandomlySmallServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_278466489(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).ResizeHotbarRandomlySmallClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1475870770(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).ResetHotbarServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2241597322(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).ResetHotbarClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3063201182(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).SetCruiserOfflineServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3008204(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).SetCruiserOfflineClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1412564141(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); string text = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref text, false); } target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).SyncLeverTooltipServerRpc(text); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2182180903(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); string text = null; if (flag) { ((FastBufferReader)(ref reader)).ReadValueSafe(ref text, false); } target.__rpc_exec_stage = (__RpcExecStage)1; ((Net)(object)target).SyncLeverTooltipClientRpc(text); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "Net"; } } [HarmonyPatch] public class UI : MonoBehaviour { [CompilerGenerated] private sealed class d__51 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; private Exception 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__51(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(0.2f); <>1__state = 1; return true; case 1: <>1__state = -1; try { ClearText(); } catch (Exception ex) { 5__1 = ex; Log.LogError("Encountered an error in the ClearAfterDelay coroutine: " + 5__1.Message); } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__46 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public UI <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__46(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { switch (<>1__state) { default: return false; case 0: <>1__state = -1; break; case 1: <>1__state = -1; break; } if (Keyboard.current == null) { <>2__current = null; <>1__state = 1; return true; } <>4__this.keyboard = Keyboard.current; <>4__this.keyControl = <>4__this.keyboard.FindKeyOnCurrentKeyboardLayout(<>4__this.key); <>4__this.keyboard.onTextInput += <>4__this.OnKeyboardInput; return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public GameObject panelBackground; public GameObject upArrowPanel; public GameObject downArrowPanel; public TextMeshProUGUI panelText; public TextMeshProUGUI letter; public TextMeshProUGUI upArrow; public TextMeshProUGUI downArrow; public Scrollbar panelScrollBar; public string key = "K"; public KeyControl keyControl; public KeyControl upKeyControl; public KeyControl downKeyControl; public bool showCaseEvents = false; public float showCaseEventTime = 45f; public float curretShowCaseEventTime = 0f; public bool keyPressEnabledTyping = true; public bool keyPressEnabledTerminal = true; public bool keyPressEnabledSettings = true; public Keyboard keyboard; public static bool canClearText = true; public static string colorHex = "00A000"; public static float uiColorReduction = 0.6275f; public static Color letterColor = new Color(0f, 0.6275f, 0f); public static int hexColor = 40960; public static string colorArrowHex = "00A000"; public static Color arrowColor = new Color(0f, 0.6275f, 0f); public static float arrowColorActive = 1.59375f; public static int hexArrowColor = 40960; public static string colorTextHex = "00FF00"; public static UI Instance { get; private set; } public static GameObject eventUIObject { get; set; } public void Start() { //IL_0363: Unknown result type (might be due to invalid IL or missing references) //IL_0396: Unknown result type (might be due to invalid IL or missing references) //IL_0548: Unknown result type (might be due to invalid IL or missing references) //IL_0667: Unknown result type (might be due to invalid IL or missing references) //IL_061d: Unknown result type (might be due to invalid IL or missing references) //IL_0622: Unknown result type (might be due to invalid IL or missing references) //IL_062d: Unknown result type (might be due to invalid IL or missing references) //IL_0319: Unknown result type (might be due to invalid IL or missing references) //IL_031e: Unknown result type (might be due to invalid IL or missing references) //IL_0329: Unknown result type (might be due to invalid IL or missing references) //IL_04fe: Unknown result type (might be due to invalid IL or missing references) //IL_0503: Unknown result type (might be due to invalid IL or missing references) //IL_050e: Unknown result type (might be due to invalid IL or missing references) Instance = this; showCaseEventTime = Configuration.UITime.Value; NetworkVariable textUI = Net.Instance.textUI; textUI.OnValueChanged = (OnValueChangedDelegate)(object)Delegate.Combine((Delegate?)(object)textUI.OnValueChanged, (Delegate?)(object)(OnValueChangedDelegate)delegate(FixedString4096Bytes previous, FixedString4096Bytes current) { ((TMP_Text)panelText).text = ((object)(FixedString4096Bytes)(ref current)).ToString(); }); try { colorTextHex = Configuration.colorText.Value.Replace("#", ""); } catch { Log.LogWarning("Failed to get text color configuration, using default color."); } Component[] componentsInChildren = eventUIObject.GetComponentsInChildren(true); Component[] array = componentsInChildren; foreach (Component val in array) { try { switch (((Object)val).name) { case "EventPanel": if ((Object)(object)panelBackground == (Object)null) { panelBackground = val.gameObject; } break; case "EventText": if ((Object)(object)panelText == (Object)null) { panelText = val.GetComponent(); } break; case "Letter": if (!((Object)(object)letter == (Object)null)) { break; } letter = val.GetComponent(); key = Configuration.UIKey.Value.ToUpper(); try { colorHex = Configuration.color.Value; uiColorReduction = Mathf.Max(Configuration.uiColorReduction.Value, 0f); try { hexColor = Convert.ToInt32(colorHex.Replace("#", ""), 16); letterColor = new Color((float)((hexColor >> 16) & 0xFF) / 255f * uiColorReduction, (float)((hexColor >> 8) & 0xFF) / 255f * uiColorReduction, (float)(hexColor & 0xFF) / 255f * uiColorReduction); ((Graphic)letter).color = letterColor; Log.LogDebug("Set UI letter color to: " + colorHex); } catch { ((Graphic)letter).color = new Color(0f, 0.6275f, 0f); Log.LogWarning("Failed to parse color hex string, using default color."); } } catch { ((Graphic)letter).color = new Color(0f, 0.6275f, 0f); Log.LogWarning("Failed to get color configurations correctly, using default color."); } ((TMP_Text)letter).text = key; break; case "LetterPanel": if (!Configuration.ShowUILetterBox.Value || !Configuration.EnableUI.Value) { val.gameObject.SetActive(false); } break; case "Scrollbar": if ((Object)(object)panelScrollBar == (Object)null) { panelScrollBar = val.GetComponent(); } break; case "UpArrowPannel": if ((Object)(object)upArrowPanel == (Object)null) { upArrowPanel = val.gameObject; } break; case "DownArrowPanel": if ((Object)(object)downArrowPanel == (Object)null) { downArrowPanel = val.gameObject; } break; case "UpArrow": if ((Object)(object)upArrow == (Object)null) { upArrow = val.GetComponent(); } try { colorArrowHex = Configuration.colorArrows.Value; arrowColorActive = Configuration.colorArrowsIncrease.Value; try { hexArrowColor = Convert.ToInt32(colorArrowHex.Replace("#", ""), 16); arrowColor = new Color((float)((hexArrowColor >> 16) & 0xFF) / 255f, (float)((hexArrowColor >> 8) & 0xFF) / 255f, (float)(hexArrowColor & 0xFF) / 255f); ((Graphic)upArrow).color = arrowColor; Log.LogDebug("Set UI Up Arrow color to: " + colorArrowHex); } catch { ((Graphic)upArrow).color = new Color(0f, 0.6275f, 0f); Log.LogWarning("Failed to parse color hex string, using default color."); } } catch { Log.LogWarning("Failed to get arrow color configuration, using default color."); } break; case "DownArrow": if ((Object)(object)downArrow == (Object)null) { downArrow = val.GetComponent(); } try { colorArrowHex = Configuration.colorArrows.Value; arrowColorActive = Mathf.Max(Configuration.colorArrowsIncrease.Value, 0f); try { hexArrowColor = Convert.ToInt32(colorArrowHex.Replace("#", ""), 16); arrowColor = new Color((float)((hexArrowColor >> 16) & 0xFF) / 255f, (float)((hexArrowColor >> 8) & 0xFF) / 255f, (float)(hexArrowColor & 0xFF) / 255f); ((Graphic)downArrow).color = arrowColor; Log.LogDebug("Set UI Down Arrow color to: " + colorArrowHex); } catch { ((Graphic)downArrow).color = new Color(0f, 0.6275f, 0f); Log.LogWarning("Failed to parse color hex string, using default color."); } } catch { Log.LogWarning("Failed to get arrow color configuration, using default color."); } break; } } catch { Log.LogError("Failed to capture EventUI component/s."); } } keyboard = Keyboard.current; if (keyboard != null && Configuration.EnableUI.Value) { keyControl = keyboard.FindKeyOnCurrentKeyboardLayout(key); if (keyControl == null) { try { string text = "/" + key.ToLower(); ref KeyControl reference = ref keyControl; InputControl obj9 = InputSystem.FindControl(text); reference = (KeyControl)(object)((obj9 is KeyControl) ? obj9 : null); } catch { Log.LogError("Failed to find key '" + key + "'. Input will be turned off for the main key."); return; } } downKeyControl = keyboard.downArrowKey; upKeyControl = keyboard.upArrowKey; keyboard.onTextInput += OnKeyboardInput; } ((TMP_Text)panelText).text = ((object)(FixedString4096Bytes)(ref Manager.textUI)).ToString(); } private void Update() { //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_01fb: Unknown result type (might be due to invalid IL or missing references) //IL_029f: Unknown result type (might be due to invalid IL or missing references) //IL_033b: Unknown result type (might be due to invalid IL or missing references) //IL_0316: Unknown result type (might be due to invalid IL or missing references) //IL_027a: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) if (showCaseEvents) { curretShowCaseEventTime -= Time.deltaTime; if (curretShowCaseEventTime <= showCaseEventTime * 0.6f) { Scrollbar obj = panelScrollBar; obj.value -= 1f / (showCaseEventTime * 0.8f) * Time.deltaTime * 2f; } if (curretShowCaseEventTime < 0f) { panelScrollBar.value = 1f; showCaseEvents = false; TogglePanel(state: false); } } if (!panelBackground.activeSelf || downKeyControl == null || upKeyControl == null) { return; } if (((ButtonControl)downKeyControl).isPressed) { showCaseEvents = false; try { ((Graphic)downArrow).color = new Color((float)((hexArrowColor >> 16) & 0xFF) / 255f * arrowColorActive, (float)((hexArrowColor >> 8) & 0xFF) / 255f * arrowColorActive, (float)(hexArrowColor & 0xFF) / 255f * arrowColorActive); } catch { ((Graphic)downArrow).color = new Color(0f, 1f, 0f); } Scrollbar obj3 = panelScrollBar; obj3.value -= Time.deltaTime * Configuration.scrollSpeed.Value; } else { try { ((Graphic)downArrow).color = new Color((float)((hexArrowColor >> 16) & 0xFF) / 255f, (float)((hexArrowColor >> 8) & 0xFF) / 255f, (float)(hexArrowColor & 0xFF) / 255f); } catch { ((Graphic)downArrow).color = new Color(0f, 0.6f, 0f); } } if (((ButtonControl)upKeyControl).isPressed) { showCaseEvents = false; try { ((Graphic)upArrow).color = new Color((float)((hexArrowColor >> 16) & 0xFF) / 255f * arrowColorActive, (float)((hexArrowColor >> 8) & 0xFF) / 255f * arrowColorActive, (float)(hexArrowColor & 0xFF) / 255f * arrowColorActive); } catch { ((Graphic)upArrow).color = new Color(0f, 1f, 0f); } Scrollbar obj6 = panelScrollBar; obj6.value += Time.deltaTime * Configuration.scrollSpeed.Value; return; } try { ((Graphic)upArrow).color = new Color((float)((hexArrowColor >> 16) & 0xFF) / 255f, (float)((hexArrowColor >> 8) & 0xFF) / 255f, (float)(hexArrowColor & 0xFF) / 255f); } catch { ((Graphic)upArrow).color = new Color(0f, 0.6f, 0f); } } public static void SpawnObject() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected O, but got Unknown //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) if (!((Object)(object)eventUIObject != (Object)null)) { eventUIObject = (GameObject)Assets.bundle.LoadAsset("EventGUI"); eventUIObject.AddComponent(); eventUIObject = Object.Instantiate(eventUIObject, Vector3.zero, Quaternion.identity); } } public static void GenerateText(List events) { //IL_01c7: Unknown result type (might be due to invalid IL or missing references) string text = "
이벤트:
"; foreach (string currentEventDescription in EventManager.currentEventDescriptions) { text = text + "-" + currentEventDescription + "
"; } if (Configuration.ShowExtraProperties.Value) { float num = RoundManager.Instance.scrapValueMultiplier * Manager.scrapValueMultiplier; if (Configuration.NormaliseScrapValueDisplay.Value) { num *= 2.5f; } text += GetDifficultyText(); text = text + "

추가사항:"; text = text + $"
-스크랩 가치: x{num:F2}" + $"
-스크랩 수: x{RoundManager.Instance.scrapAmountMultiplier * Manager.scrapAmountMultiplier:F2}" + $"
-시설 크기: x{RoundManager.Instance.currentLevel.factorySizeMultiplier:F2}" + $"
-생성 확률: x{Manager.spawnChanceMultiplier:F2}" + $"
-몬스터 최대 수: x{Manager.spawncapMultipler:F2}" + "
-적 추가 체력: " + plusMinus(Manager.bonusEnemyHp) + ""; } Net.Instance.textUI.Value = new FixedString4096Bytes(text); if (Configuration.PopUpUI.Value && Configuration.EnableUI.Value) { Net.Instance.ShowCaseEventsClientRpc(); } } private static string plusMinus(float value) { string text = value.ToString(); if (value >= 0f) { text = "+" + text; } return text; } private static string plusMinusExclusive(float value) { return (value < 0f) ? "" : "+"; } [ServerRpc(RequireOwnership = false)] private static void ClearTextServerRpc() { try { ClearText(); } catch (Exception ex) { Log.LogError("Failed to clear text in main function: " + ex.Message); Log.LogError("Stack trace: " + ex.StackTrace); } } public static void ClearText() { //IL_027c: Unknown result type (might be due to invalid IL or missing references) //IL_025e: Unknown result type (might be due to invalid IL or missing references) if (Configuration.DisplayExtraPropertiesAfterShipLeaves.Value) { string text = ""; Manager.ComputeDifficultyValues(); if (!Configuration.useCustomWeights.Value) { EventManager.UpdateAllEventWeights(); text = text + "
이벤트 난이도 확률:
-불가능: " + Helper.GetPercentage(EventManager.eventTypeRarities[0]) + "
-매우나쁨: " + Helper.GetPercentage(EventManager.eventTypeRarities[1]) + "
-나쁨: " + Helper.GetPercentage(EventManager.eventTypeRarities[2]) + "
-일상: " + Helper.GetPercentage(EventManager.eventTypeRarities[3]) + "
-좋음: " + Helper.GetPercentage(EventManager.eventTypeRarities[4]) + "
-매우좋음: " + Helper.GetPercentage(EventManager.eventTypeRarities[5]) + "
-희귀: " + Helper.GetPercentage(EventManager.eventTypeRarities[6]) + "
-삭제됨: " + Helper.GetPercentage(EventManager.eventTypeRarities[7]) + "
"; } text += GetDifficultyText(); Net.Instance.textUI.Value = new FixedString4096Bytes(text); } else { Net.Instance.textUI.Value = new FixedString4096Bytes(" "); } } private static string GetDifficultyText() { string text = "
난이도: " + Helper.GetDifficultyText() + $"
-난이도 : {Manager.difficulty:F1}"; if (Configuration.scaleByDaysPassed.Value) { text += $"
-일수: {plusMinusExclusive(Manager.daysDifficulty)}{Manager.daysDifficulty:F1}"; } if (Configuration.scaleByQuota.Value) { text += $"
-할당량: {plusMinusExclusive(Manager.quotaDifficulty)}{Manager.quotaDifficulty:F1}"; } if (Configuration.scaleByScrapInShip.Value) { text += $"
-함선스크랩: {plusMinusExclusive(Manager.scrapInShipDifficulty)}{Manager.scrapInShipDifficulty:F1}"; } if (Configuration.scaleByMoonGrade.Value) { text += string.Format("
-위성 난이도: {2}{3:F1}", colorTextHex, Helper.GetDifficultyColorHex(Manager.moonGradeDifficulty, Configuration.gradeAdditives["S+++"]), plusMinusExclusive(Manager.moonGradeDifficulty), Manager.moonGradeDifficulty); } if (Configuration.scaleByWeather.Value) { text += $"
-날씨: {plusMinusExclusive(Manager.weatherDifficulty)}{Manager.weatherDifficulty:F1}"; } if (Configuration.scaleHeat.Value) { text += $"
-열기: {plusMinusExclusive(EventManager.currentHeatDifficulty())}{EventManager.currentHeatDifficulty():F1}"; } return text; } [IteratorStateMachine(typeof(d__46))] private IEnumerator WaitForKeyboard() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__46(0) { <>4__this = this }; } public void OnKeyboardInput(char input) { if (keyboard == null) { return; } bool flag = false; flag = ((keyControl == null) ? (input.ToString().ToUpper() == key.ToUpper()) : ((ButtonControl)keyControl).isPressed); if (flag && keyPressEnabledTyping && keyPressEnabledTerminal && keyPressEnabledSettings) { bool flag2 = !panelBackground.activeSelf; if (!flag2 && showCaseEvents) { showCaseEvents = false; panelScrollBar.value = 1f; } TogglePanel(flag2); } } public void UnsubscribeFromKeyboardEvent() { if (Configuration.EnableUI.Value) { keyboard.onTextInput -= OnKeyboardInput; } } public void TogglePanel(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) //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Unknown result type (might be due to invalid IL or missing references) if (Configuration.DisplayExtraPropertiesAfterShipLeaves.Value) { FixedString4096Bytes value = Net.Instance.textUI.Value; if (((FixedString4096Bytes)(ref value)).IsEmpty) { ClearTextServerRpc(); } } panelBackground.SetActive(state); upArrowPanel.SetActive(state); downArrowPanel.SetActive(state); try { ((Graphic)letter).color = new Color(state ? ((float)((hexColor >> 16) & 0xFF) / 255f) : ((float)((hexColor >> 16) & 0xFF) / 255f * uiColorReduction), state ? ((float)((hexColor >> 8) & 0xFF) / 255f) : ((float)((hexColor >> 8) & 0xFF) / 255f * uiColorReduction), state ? ((float)(hexColor & 0xFF) / 255f) : ((float)(hexColor & 0xFF) / 255f * uiColorReduction)); } catch { ((Graphic)letter).color = new Color(0f, state ? 1f : 0.6275f, 0f); } } [HarmonyPostfix] [HarmonyPatch(typeof(StartOfRound), "ArriveAtLevel")] [HarmonyPatch(typeof(StartOfRound), "SetShipReadyToLand")] [HarmonyPatch(typeof(StartOfRound), "EndPlayersFiredSequenceClientRpc")] private static void OnChangeLevel(ref StartOfRound __instance) { if (!NetworkManager.Singleton.IsServer || !canClearText) { return; } try { ClearText(); } catch (Exception) { ((MonoBehaviour)__instance).StartCoroutine(ClearAfterDelay()); } } [IteratorStateMachine(typeof(d__51))] internal static IEnumerator ClearAfterDelay() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__51(0); } [HarmonyPrefix] [HarmonyPriority(800)] [HarmonyPatch(typeof(StartOfRound), "ShipLeave")] private static void OnShipLeave() { canClearText = true; if (!((NetworkBehaviour)RoundManager.Instance).IsHost) { return; } if (!Configuration.DisplayUIAfterShipLeaves.Value) { ClearText(); return; } if (Configuration.EnableUI.Value) { GenerateText(EventManager.currentEvents); } if (!Configuration.showEventsInChat.Value) { return; } HUDManager.Instance.AddTextToChatOnServer("이벤트:", -1); foreach (string currentEventDescription in EventManager.currentEventDescriptions) { HUDManager.Instance.AddTextToChatOnServer(currentEventDescription, -1); } } [HarmonyPrefix] [HarmonyPatch(typeof(Terminal), "Update")] private static void OnTerminalUpdate(ref bool ___terminalInUse) { if ((Object)(object)Instance == (Object)null) { return; } try { Instance.keyPressEnabledTerminal = !___terminalInUse; } catch (Exception ex) { Log.LogError("Failed to update keyPressEnabledTerminal: " + ex.Message); } } [HarmonyPrefix] [HarmonyPatch(typeof(PlayerControllerB), "Update")] public static void OnPlayerControllerBUpdate(ref QuickMenuManager ___quickMenuManager) { if ((Object)(object)Instance == (Object)null) { return; } try { Instance.keyPressEnabledSettings = !___quickMenuManager.isMenuOpen; } catch (Exception ex) { Log.LogError("Failed to update keyPressEnabledSettings: " + ex.Message); } } [HarmonyPrefix] [HarmonyPatch(typeof(HUDManager), "Update")] public static void OnUpdate(ref PlayerControllerB ___localPlayer) { if ((Object)(object)Instance == (Object)null || (Object)(object)___localPlayer == (Object)null) { return; } try { Instance.keyPressEnabledTyping = !___localPlayer.isTypingChat; } catch (Exception ex) { Log.LogError("Failed to update keyPressEnabledTyping: " + ex.Message); } } } [HarmonyPatch] public class Compatibility { internal static bool yippeeModCompatibilityMode; internal static AudioClip[] yippeeNewSFX; internal static bool lethalEscapePresent; internal static bool lethalThingsPresent; internal static bool diversityPresent; internal static bool scopophobiaPresent; internal static bool shrimpPresent; internal static bool herobrinePresent; internal static bool peepersPresent; internal static bool sirenheadPresent; internal static bool rollinggiantPresent; internal static bool theFiendPresent; internal static bool immortalSnailPresent; internal static bool takeyPlushPresent; internal static bool lockerPresent; internal static bool theGiantSpecimensPresent; internal static bool mimicsPresent; internal static bool footballPresent; internal static bool emergencyDicePresent; internal static bool toilheadPresent; internal static bool goldScrapPresent; internal static bool cullFactoryPresent; internal static bool NonShippingAuthorisationPresent; internal static bool moonsweptPresent; internal static bool shockwaveDronesPresent; internal static bool zombiesPlushPresent; internal static bool takeyGokuPresent; internal static bool takeyGokuEssentialPresent; internal static bool crowdControlPresent; internal static bool officialExternalModulePresent; internal static bool facelessStalekerPresent; internal static bool gokuBrackenPresent; internal static bool moaiEnemyPresent; internal static bool BaldiPresent; internal static bool ShibaPresent; internal static bool SurfacedPresent; internal static bool VarietyPresent; internal static bool CodeRebirthPresent; internal static bool LegendWeathersPresent; internal static bool ShipInventoryPresent; internal static bool SelfSortingStorage; internal static bool SuperEclipsePresent; internal static bool SkullEnemyPresent; internal static bool ManStalkerPresent; internal static bool FoxyPresent; internal static bool PlaytimePresent; internal static bool CrittersPresent; internal static bool FacilityMeltdownPresent; internal static bool NeedyCatsPresent; internal static bool furniturePackPresent; internal static bool yesFoxPresent; internal static bool soulDevPresent; internal static bool lighteaterPresent; internal static bool BiodiversityPresent; internal static bool OoblterraPresent; internal static bool LethalPhonesPresent; internal static bool HotBarPlusPresent; internal static bool KidnapperFoxPresent; internal static bool EndlessElevatorPresent; internal static bool BarberFixesPresent; internal static bool SCP939Present; internal static bool SCP682Present; internal static bool CombinedWeatherToolKitPresent; internal static bool LethalElementsPresent; internal static bool DawnLibPresent; internal static bool ScanVanPresent; internal static bool StarLancereNemyEscapePresent; internal static bool WeatherRegistryPresent; internal static FieldInfo peeperSpawnChance; internal static MethodInfo cullOnTeleportLocalPlayer; internal static MethodInfo cullOnTeleportOtherPlayer; internal static MethodInfo DeafMakerShroom1; [HarmonyPostfix] [HarmonyPatch(typeof(PreInitSceneScript), "Awake")] private static void OnGameLoad() { Assembly assembly = GetAssembly("sunnobunno.YippeeMod"); if (assembly != null) { Log.LogInfo("Found YippeeMod, Will attempt to replace kamikazie bug SFX"); Type type = assembly.GetType("YippeeMod.YippeeModBase"); if (type != null) { FieldInfo field = type.GetField("newSFX", BindingFlags.Static | BindingFlags.NonPublic); if (field != null) { yippeeNewSFX = (AudioClip[])field.GetValue(null); if (yippeeNewSFX != null) { Log.LogInfo("YippeeMod compatibility succeeded."); yippeeModCompatibilityMode = true; } } } } Assembly assembly2 = GetAssembly("x753.Peepers"); if (assembly2 != null) { Log.LogInfo("Found PeepersMod, Will attempt to get spawnChance field."); Type type2 = assembly2.GetType("LCPeeper.Peeper"); if (type2 != null) { peeperSpawnChance = type2.GetField("PeeperSpawnChance", BindingFlags.Static | BindingFlags.Public); if (peeperSpawnChance != null) { Log.LogInfo("Found spawnChance Field, Peepers and NoPeepers event's will now occur"); NoPeepers.oldSpawnChance = (float)peeperSpawnChance.GetValue(null); peepersPresent = true; EventManager.moddedEvents.Add(new Peepers()); EventManager.moddedEvents.Add(new NoPeepers()); } } } Assembly assembly3 = GetAssembly("com.fumiko.CullFactory"); if (assembly3 != null) { Log.LogInfo("Found CullFactory mod, Will attempt to grab OnTeleportOtherPlayerThroughEntrance() and OnTeleportLocalPlayerThroughEntrance() methodInfos"); Type type3 = assembly3.GetType("CullFactory.Extenders.TeleportExtender"); if (type3 != null) { cullOnTeleportLocalPlayer = type3.GetMethod("OnTeleportLocalPlayerThroughEntrance", BindingFlags.Static | BindingFlags.NonPublic); cullOnTeleportOtherPlayer = type3.GetMethod("OnTeleportOtherPlayerThroughEntrance", BindingFlags.Static | BindingFlags.NonPublic); if (cullOnTeleportLocalPlayer != null && cullOnTeleportOtherPlayer != null) { Log.LogInfo("Found OnTeleportOtherPlayerThroughEntrance() and OnTeleportLocalPlayerThroughEntrance() methodInfos, passages are now compatible with cullfactory"); cullFactoryPresent = true; } } } Assembly assembly4 = GetAssembly("zigzag.combinedweatherstoolkit"); if (assembly4 != null) { CustomWeather.RegisterWeathers(); } lethalEscapePresent = IsModPresent("xCeezy.LethalEscape", "Will prevent SafeOutside event from occuring.") || IsModPresent("AudioKnight.StarlancerEnemyEscape", "Will prevent SafeOutside event from occuring"); lethalThingsPresent = IsModPresent("evaisa.lethalthings", "Roomba and TeleporterTraps event will now occur."); diversityPresent = IsModPresent("Chaos.Diversity", "Walker event will now occur."); scopophobiaPresent = IsModPresent("Scopophobia", "Shy Guy and NoShyGuy event will now occur."); shrimpPresent = IsModPresent("Piggy.Shrimp", "Shrimp event will now occur."); herobrinePresent = IsModPresent("Kittenji.HerobrineMod", "Herobrine event will now occur."); sirenheadPresent = IsModPresent("Ccode.SirenHead", "SirenHead event will now occur."); rollinggiantPresent = IsModPresent("nomnomab.rollinggiant", "RollingGiant and NoRollingGiant event will now occur."); theFiendPresent = IsModPresent("com.RuthlessCompany", "TheFiend and NoFiend event will now occur."); immortalSnailPresent = IsModPresent("ImmortalSnail", "ImmortalSnail and NoImmortalSnail event will now occur."); lockerPresent = IsModPresent("com.zealsprince.locker", "Locker and NoLocker event will now occur."); theGiantSpecimensPresent = IsModPresent("TheGiantSpecimens", "GiantShowdown event will now occur."); footballPresent = IsModPresent("Kittenji.FootballEntity", "Football event will now occur."); toilheadPresent = IsModPresent("com.github.zehsteam.ToilHead", "Toilhead event will now occur"); emergencyDicePresent = IsModPresent("Theronguard.EmergencyDice", "BadDice and Dice events will now occur."); goldScrapPresent = IsModPresent("LCGoldScrapMod", "CityOfGold event will now occur"); moonsweptPresent = IsModPresent("MoonsweptTeam.Moonswept", "Cleaner and MobileTurrets events will now occur"); shockwaveDronesPresent = IsModPresent("droneenemy", "Shockwave Drones event will now occur"); facelessStalekerPresent = IsModPresent("sparble.slendermanmod", "SlenderMan event will now occur"); NonShippingAuthorisationPresent = IsModPresent("NonShippingAuthorisation", "Authorisation accepted"); takeyGokuPresent = IsModPresent("com.github.zehsteam.TakeyGokuBracken", "Takey Goku dettected"); takeyGokuEssentialPresent = IsModPresent("Vulf.GokuBracken", "GokuBracken detected, proceeding with TakeyGoku check"); officialExternalModulePresent = IsModPresent("BCME-ExternalModule", "ExternalModule dettected..."); crowdControlPresent = IsModPresent("WarpWorld.CrowdControl", "Warning! CrowdControl dettected, shutting down incompatible events"); moaiEnemyPresent = IsModPresent("MoaiEnemy", "Moai Enemies were detected"); BaldiPresent = IsModPresent("com.riskivr.BaldiEnemy", "Baldi Mod Detected"); FacilityMeltdownPresent = IsModPresent("me.loaforc.facilitymeltdown", "Facility Meltdown Detected"); ShibaPresent = IsModPresent("ReavsStuff.ShibaEnemy", "Shiba Bat Detected"); SurfacedPresent = IsModPresent("Surfaced", "Surfaced Detected"); VarietyPresent = IsModPresent("TestAccount666.TestAccountVariety", "Test Account Variety Detected"); CodeRebirthPresent = IsModPresent("CodeRebirth", "CodeRebirth Detected"); SuperEclipsePresent = IsModPresent("Millie.SuperEclipse", "Super Eclipse Detected"); ManStalkerPresent = IsModPresent("menstalker_yaboiduckisnickerbar", "Man Stalker Detected"); SkullEnemyPresent = IsModPresent("SkullEnemy", "Skull Enemy Detected"); FoxyPresent = IsModPresent("NightmareFoxy", "NightmareFoxy Detected"); PlaytimePresent = IsModPresent("Nuclear_Fox.LethalPlaytime", "Lethal Playtime Detected"); CrittersPresent = IsModPresent("Nuclear_Fox.SmilingCritters", "Critters Present"); NeedyCatsPresent = IsModPresent("Jordo.NeedyCats", "Needy Cats Detected"); ShipInventoryPresent = IsModPresent("org.lethalcompanymodding.shipinventoryupdated", "Ship Inventory Detected. Including in inventory checks"); HotBarPlusPresent = IsModPresent("FlipMods.HotbarPlus", "HotBarPlus Detected."); yesFoxPresent = IsModPresent("uk.1a3.yesfox", "Yes Fox Detected"); soulDevPresent = IsModPresent("SoulDev", "Soul Dev Detected"); BiodiversityPresent = IsModPresent("com.github.biodiversitylc.Biodiversity", "Biodiversity Detected"); furniturePackPresent = IsModPresent("MelanieMelicious.furniturePack0", "Furniture Pack Detected"); OoblterraPresent = IsModPresent("SkullCrusher.WTO", "Ooblterra Detected"); lighteaterPresent = IsModPresent("Lega.LightEater", "Light Eater Detected"); LethalPhonesPresent = IsModPresent("LethalPhones", "Lethal Phones Detected"); SelfSortingStorage = IsModPresent("zigzag.SelfSortingStorage", "Self Sorting Storage Detected"); KidnapperFoxPresent = IsModPresent("uk.1a3.yesfox", "Kidnapper Fox Detected"); LethalElementsPresent = IsModPresent("voxx.LethalElementsPlugin", "Lethal Elements Detected"); BarberFixesPresent = IsModPresent("butterystancakes.lethalcompany.barberfixes", "Barber Fixes Detected"); SCP939Present = IsModPresent("project_scp.scp939", "SCP939 Detected"); SCP682Present = IsModPresent("ProjectSCP.SCP682", "SCP682 Detected"); WeatherRegistryPresent = IsModPresent("mrov.WeatherRegistry", "Weather Registry Detected"); LegendWeathersPresent = IsModPresent("zigzag.legendweathers", "Legend Weathers Detected"); EndlessElevatorPresent = IsModPresent("kite.ZelevatorCode", "Endless Elevator Detected"); CombinedWeatherToolKitPresent = IsModPresent("zigzag.combinedweatherstoolkit", "Combined Weathers Toolkit Detected"); DawnLibPresent = IsModPresent("com.github.teamxiaolan.dawnlib", "DawnLib Detected."); StarLancereNemyEscapePresent = IsModPresent("AudioKnight.StarlancerEnemyEscape", "Starlancer Enemy Escape Detected."); ScanVanPresent = IsModPresent("Scandal.CruiserXL", "ScanVan Detected."); } public static Assembly GetAssembly(string name) { if (Chainloader.PluginInfos.ContainsKey(name)) { return ((object)Chainloader.PluginInfos[name].Instance).GetType().Assembly; } return null; } public static bool IsModPresent(string name, string logMessage = "") { bool flag = Chainloader.PluginInfos.ContainsKey(name); if (flag) { Log.LogInfo(name + " is present. " + logMessage); } return flag; } } [HarmonyPatch] public class Configuration { [Flags] public enum HeatSettingsFlags { None = 0, Difficulty = 1, InsidePower = 2, OutsidePower = 4, All = -1 } public static ConfigFile? uiConfig; public static ConfigFile? eventConfig; public static ConfigFile? weatherConfig; public static ConfigFile? customAssetsConfig; public static ConfigFile? difficultyConfig; public static ConfigFile? moddedEventConfig; public static ConfigFile? customEventConfig; public static ConfigFile? allEnemiesConfig; public static ConfigFile? levelPropertiesConfig; public static ConfigFile? CorePropertiesConfig; public static List> eventWeights = new List>(); public static List> eventDescriptions = new List>(); public static List> eventColorHexes = new List>(); public static List> eventTypes = new List>(); public static List> eventScales = new List>(); public static List> showTip = new List>(); public static List> TipsList = new List>(); public static List> TipsTitles = new List>(); public static List> TipIsWarning = new List>(); public static List> eventEnables = new List>(); public static List> eventsToRemove = new List>(); public static List> eventsToSpawnWith = new List>(); public static List> eventAliases = new List>(); public static List> moonBlacklist = new List>(); public static List> moonWhitelist = new List>(); public static List> moonMode = new List>(); public static List> eventSpecial = new List>(); public static List> eventBeta = new List>(); public static List> monsterEvents = new List>(); public static List transmutationEvents = new List(); public static ConfigEntry? useCustomWeights; public static ConfigEntry? showEventsInChat; public static MEvent.Scale eventsToSpawn; public static float[]? weightsForExtraEvents; public static MEvent.Scale[] eventTypeScales = new MEvent.Scale[8]; public static Dictionary scrapValueByEventTypeScale = new Dictionary(); public static Dictionary scrapAmountByEventTypeScale = new Dictionary(); public static ConfigEntry? MoonsToIgnore; public static MEvent.Scale factorySizeMultiplier = default(MEvent.Scale); public static EventManager.DifficultyTransition[]? difficultyTransitions; public static ConfigEntry? enableQuotaChanges; public static ConfigEntry? deadLineDaysAmount; public static ConfigEntry? startingCredits; public static ConfigEntry? startingQuota; public static ConfigEntry? baseIncrease; public static ConfigEntry? increaseSteepness; public static MEvent.Scale spawnChanceMultiplierScaling = default(MEvent.Scale); public static MEvent.Scale insideEnemyMaxPowerCountScaling = default(MEvent.Scale); public static MEvent.Scale outsideEnemyPowerCountScaling = default(MEvent.Scale); public static MEvent.Scale enemyBonusHpScaling = default(MEvent.Scale); public static MEvent.Scale spawnCapMultiplier = default(MEvent.Scale); public static MEvent.Scale scrapAmountMultiplier = default(MEvent.Scale); public static MEvent.Scale scrapValueMultiplier = default(MEvent.Scale); public static MEvent.Scale insideSpawnChanceAdditive = default(MEvent.Scale); public static MEvent.Scale outsideSpawnChanceAdditive = default(MEvent.Scale); public static ConfigEntry? ignoreMaxCap; public static ConfigEntry? difficultyMaxCap; public static ConfigEntry? scrapValueMax; public static ConfigEntry? scrapAmountMax; public static ConfigEntry? FactorySizeMax; public static ConfigEntry? FactorySizeMin; public static ConfigEntry? scaleByDaysPassed; public static ConfigEntry? scaleByScrapInShip; public static ConfigEntry? scaleByMoonGrade; public static ConfigEntry? scaleByWeather; public static ConfigEntry? scaleByQuota; public static ConfigEntry? scaleHeat; public static ConfigEntry? daysPassedDifficultyMultiplier; public static ConfigEntry? daysPassedDifficultyCap; public static ConfigEntry? scrapInShipDifficultyMultiplier; public static ConfigEntry? scrapInShipDifficultyCap; public static ConfigEntry? quotaDifficultyMultiplier; public static ConfigEntry? quotaDifficultyCap; public static Dictionary gradeAdditives = new Dictionary(); public static Dictionary weatherAdditives = new Dictionary(); public static ConfigEntry? enableCustomTimeAdjustments; public static MEvent.Scale timeScaling = default(MEvent.Scale); public static MEvent.Scale startingTime = default(MEvent.Scale); public static ConfigEntry? heatIncrementAmount; public static ConfigEntry? heatDecrementAmount; public static ConfigEntry? heatMaxCap; public static ConfigEntry? heatDampening; public static ConfigEntry? heatMultiplierDifficulty; public static ConfigEntry? heatMultiplierOtherCalculations; public static ConfigEntry? startingHeat; public static ConfigEntry? heatForceEventAtMax; public static ConfigEntry? heatEventsToForce; public static ConfigEntry? heatSettingsToAffect; public static ConfigEntry? enablePlayerScaling; public static ConfigEntry? playerScalingType; public static ConfigEntry? playerScalingMultiplier; public static ConfigEntry? basePlayerAmount; public static ConfigEntry? useWeatherMultipliers; public static ConfigEntry? randomizeWeatherMultipliers; public static ConfigEntry? enableTerminalText; public static ConfigEntry? weatherRandomRandomMinInclusive; public static ConfigEntry? weatherRandomRandomMaxInclusive; public static Weather noneMultiplier; public static Weather dustCloudMultiplier; public static Weather rainyMultiplier; public static Weather stormyMultiplier; public static Weather foggyMultiplier; public static Weather floodedMultiplier; public static Weather eclipsedMultiplier; public static ConfigEntry? UIKey; public static ConfigEntry? NormaliseScrapValueDisplay; public static ConfigEntry? EnableUI; public static ConfigEntry? ShowUILetterBox; public static ConfigEntry? ShowExtraProperties; public static ConfigEntry? PopUpUI; public static ConfigEntry? DisplayUIAfterShipLeaves; public static ConfigEntry? DisplayExtraPropertiesAfterShipLeaves; public static ConfigEntry? displayEvents; public static ConfigEntry? UITime; public static ConfigEntry? scrollSpeed; public static ConfigEntry? color; public static ConfigEntry? uiColorReduction; public static ConfigEntry? colorArrowsIncrease; public static ConfigEntry? colorArrows; public static ConfigEntry? colorText; public static ConfigEntry? nutSlayerLives; public static ConfigEntry? nutSlayerHp; public static ConfigEntry? nutSlayerMovementSpeed; public static ConfigEntry? nutSlayerImmortal; public static ConfigEntry? onlyPlayersAttackSlayer; public static ConfigEntry? slayerShotgunMinValue; public static ConfigEntry? slayerShotgunMaxValue; public static ConfigEntry? enableAllEnemies; public static ConfigEntry? enableAllAllEnemies; public static Dictionary levelProperties = new Dictionary(); public static CultureInfo en = new CultureInfo("en-US"); public static string scaleDescription = "형식: 기본값, 증가값, 최솟값, 최댓값 공식: 기본값 + (증가값 * 난이도) 기본적으로 난이도는 특정 요소에 따라 0~100 사이를 오갑니다"; public static string customEventsFolder = Paths.ConfigPath + "\\BrutalCompanyMinusExtraReborn\\CustomEvents"; public static ConfigEntry? enableCustomEvents; public static ConfigEntry? ExtraLogging; public static ConfigEntry? SilenceEnum; public static ConfigEntry? SilencePrefab; public static ConfigEntry? GetMethods; public static ConfigEntry? DisableAllEvents; public static ConfigEntry? dontHandlePower; public static ConfigEntry? dontHandleSpawnCurves; public static ConfigEntry? AffectPropertiesOutOfEvents; public static ConfigEntry? deferWeatherToMods; public static ConfigEntry? enforceEscapeModChecks; public static ConfigEntry? enableSpecialEvents; public static ConfigEntry? enableBetaEvents; public static MEvent.Scale timeChaosScale = default(MEvent.Scale); public static ConfigEntry? transmutationBlacklist; public static ConfigEntry? handleScanCommand; public static ConfigEntry? speedrunMode; public static MEvent.Scale EventChanceGlobal = default(MEvent.Scale); public static ConfigEntry? timeBetweenTips; public static ConfigEntry? InitTimePopUp; internal static bool Initalized = false; private static string header = "All Enemies"; private static void Initalize() { useCustomWeights = difficultyConfig.Bind("_Event Settings", "Use custom weights?", false, "'false'= 이벤트 유형 가중치로 모든 가중치 설정 'true'= 직접 설정한 가중치 사용"); eventsToSpawn = Helper.getScale(difficultyConfig.Bind("_Event Settings", "Event scale amount", "2, 0.03, 2.0, 5.0", "이벤트의 기본 발생 수 형식: 기본값, 증가값, 최솟값, 최댓값 " + scaleDescription).Value); weightsForExtraEvents = Helper.ParseValuesFromString(difficultyConfig.Bind("_Event Settings", "Weights for bonus events", "40, 39, 15, 5, 1", "추가 이벤트 가중치, 확장 가능. (40, 39, 15, 5, 1)은 (+0, +1, +2, +3, +4) 이벤트에 해당").Value); eventTypeScales = new MEvent.Scale[8] { Helper.getScale(difficultyConfig.Bind("_EventType Weights", "Insane event scale", "3, 0.05, 3, 20", scaleDescription).Value), Helper.getScale(difficultyConfig.Bind("_EventType Weights", "VeryBad event scale", "5, 0.25, 5, 30", scaleDescription).Value), Helper.getScale(difficultyConfig.Bind("_EventType Weights", "Bad event scale", "40, -0.15, 25, 40", scaleDescription).Value), Helper.getScale(difficultyConfig.Bind("_EventType Weights", "Neutral event scale", "10, -0.05, 5, 10", scaleDescription).Value), Helper.getScale(difficultyConfig.Bind("_EventType Weights", "Good event scale", "23, -0.1, 13, 23", scaleDescription).Value), Helper.getScale(difficultyConfig.Bind("_EventType Weights", "VeryGood event scale", "3, 0.14, 3, 17", scaleDescription).Value), Helper.getScale(difficultyConfig.Bind("_EventType Weights", "Rare event scale", "2, 0.02, 2, 10", scaleDescription).Value), Helper.getScale(difficultyConfig.Bind("_EventType Weights", "Remove event scale", "15, -0.05, 10, 15", "이 이벤트들은 무언가를 제거합니다 " + scaleDescription).Value) }; difficultyTransitions = Helper.GetDifficultyTransitionsFromString(difficultyConfig.Bind("Difficulty Scaling", "Difficulty Transitions", "쉬움,00FF00,0|보통,008000,15|어려움,FF0000,30|매우어려움,800000,50|절망,140000,75", "형식: 이름,16진수색상,기준값, 기준값은 해당 이름이 표시되는 난이도 수치입니다.").Value); ignoreMaxCap = difficultyConfig.Bind("Difficulty Scaling", "Ignore max cap?", false, "true로 설정 시 최대 상한을 무시합니다. 상한은 '난이도 최대 상한' 설정에 의해서도 결정됩니다."); difficultyMaxCap = difficultyConfig.Bind("Difficulty Scaling", "Difficulty max cap", 100f, "난이도 수치가 이 값을 초과하지 않습니다."); scaleByDaysPassed = difficultyConfig.Bind("Difficulty Scaling", "Scale by days passed?", true, "경과 일수에 따라 난이도가 증가합니다."); daysPassedDifficultyMultiplier = difficultyConfig.Bind("Difficulty Scaling", "Difficulty per days passed?", 1f, "경과한 일수 1일당 추가되는 난이도입니다."); daysPassedDifficultyCap = difficultyConfig.Bind("Difficulty Scaling", "Days passed difficulty cap", 60f, "경과 일수로 인한 난이도 증가가 이 값을 초과하지 않습니다."); scaleByScrapInShip = difficultyConfig.Bind("Difficulty Scaling", "Scale by scrap in ship?", true, "함선 내 스크랩 양에 따라 난이도가 증가합니다."); scrapInShipDifficultyMultiplier = difficultyConfig.Bind("Difficulty Scaling", "Difficulty per scrap value in ship?", 0.0025f, "기본값: 함선 내 스크랩 400당 +1.0"); scrapInShipDifficultyCap = difficultyConfig.Bind("Difficulty Scaling", "Scrap in ship difficulty cap", 30f, "함선 내 스크랩으로 인한 난이도 증가가 이 값을 초과하지 않습니다."); scaleByQuota = difficultyConfig.Bind("Difficulty Scaling", "Scale by quota?", false, "할당량 수치에 따라 난이도가 증가합니다."); quotaDifficultyMultiplier = difficultyConfig.Bind("Difficulty Scaling", "Difficulty per quota value?", 0.005f, "기본값: 할당량 200당 +1.0"); quotaDifficultyCap = difficultyConfig.Bind("Difficulty Scaling", "Quota difficulty cap", 100f, "할당량으로 인한 난이도 증가가 이 값을 초과하지 않습니다"); scaleByMoonGrade = difficultyConfig.Bind("Difficulty Scaling", "Scale by moon grade?", true, "착륙한 달의 등급에 따라 난이도가 증가합니다."); gradeAdditives = Helper.GetMoonRiskFromString(difficultyConfig.Bind("Difficulty Scaling", "Grade difficulty scaling", "D,-8|C,-8|B,-4|A,5|S,10|S+,15|S++,20|S+++,30|Other,10", "형식: 등급,난이도, 'Other'는 삭제하지 마세요").Value); scaleByWeather = difficultyConfig.Bind("Difficulty Scaling", "Scale by weather type?", false, "착륙한 달의 날씨에 따라 난이도가 증가합니다."); scaleHeat = difficultyConfig.Bind("Difficulty Scaling", "Scale by Heat?", false, "행성의 현재 열기에 따라 난이도를 조정합니다. 열기 값은 0 미만으로 내려가지 않습니다."); heatIncrementAmount = difficultyConfig.Bind("Difficulty Scaling", "Heat difficulty additive", 1f, "달을 방문한 뒤, 같은 달을 다시 갈 때 이만큼 열기가 쌓입니다."); heatDecrementAmount = difficultyConfig.Bind("Difficulty Scaling", "Heat difficulty decrement", 1f, "전날과 다른 달을 방문하면 열기가 이만큼 줄어듭니다."); heatDampening = difficultyConfig.Bind("Difficulty Scaling", "Heat dampening factor", 0.15f, "열기 보정 계수입니다. 0에 가까울수록 난이도가 더 크게 오르고, 값이 클수록 원래 수치에 가깝게 유지됩니다."); heatMultiplierDifficulty = difficultyConfig.Bind("Difficulty Scaling", "Heat multiplier (Difficulty)", 0.0015f, "난이도 계산에 쓰입니다. 값이 클수록 열기가 난이도에 더 빠르게 반영됩니다."); heatMultiplierOtherCalculations = difficultyConfig.Bind("Difficulty Scaling", "Heat multiplier (Non-Difficulty)", 0.004f, "난이도 외(예: 파워 값) 계산에 쓰입니다. 값이 클수록 더 빠르게 반영됩니다."); startingHeat = difficultyConfig.Bind("Difficulty Scaling", "Starting Heat", 0f, "각 행성을 처음 방문할 때의 시작 열기입니다. 기본값은 0입니다."); heatMaxCap = difficultyConfig.Bind("Difficulty Scaling", "Heat Max Cap", 10f, "열기가 이 값을 넘지 않습니다."); heatForceEventAtMax = difficultyConfig.Bind("Difficulty Scaling", "Force event at max heat?", false, "true이면 열기가 최대일 때 아래 목록의 이벤트를 강제로 발생시킵니다."); heatEventsToForce = difficultyConfig.Bind("Difficulty Scaling", "Events to force at max heat", "", "열기가 최대일 때 강제 발생할 이벤트 이름입니다. 쉼표로 구분하며, 등록된 이름과 대소문자가 정확히 같아야 합니다. 앞뒤 공백은 자동으로 제거됩니다."); heatSettingsToAffect = difficultyConfig.Bind("Difficulty Scaling", "Heat Affects What Properties", HeatSettingsFlags.Difficulty, "열기가 영향을 줄 항목을 선택합니다."); weatherAdditives = new Dictionary { { (LevelWeatherType)(-1), difficultyConfig.Bind("Difficulty Scaling", "None weather difficulty", 0f, "날씨 없음 상태에서 플레이 시 추가 난이도").Value }, { (LevelWeatherType)1, difficultyConfig.Bind("Difficulty Scaling", "Rainy weather difficulty", 2f, "비 날씨에서 플레이 시 추가 난이도").Value }, { (LevelWeatherType)0, difficultyConfig.Bind("Difficulty Scaling", "DustClouds weather difficulty", 2f, "먼지 구름 날씨에서 플레이 시 추가 난이도").Value }, { (LevelWeatherType)4, difficultyConfig.Bind("Difficulty Scaling", "Flooded weather difficulty", 4f, "홍수 날씨에서 플레이 시 추가 난이도").Value }, { (LevelWeatherType)3, difficultyConfig.Bind("Difficulty Scaling", "Foggy weather difficulty", 4f, "안개 날씨에서 플레이 시 추가 난이도").Value }, { (LevelWeatherType)2, difficultyConfig.Bind("Difficulty Scaling", "Stormy weather difficulty", 7f, "폭풍 날씨에서 플레이 시 추가 난이도").Value }, { (LevelWeatherType)5, difficultyConfig.Bind("Difficulty Scaling", "Eclipsed weather difficulty", 7f, "일식 날씨에서 플레이 시 추가 난이도").Value } }; scrapValueMax = difficultyConfig.Bind("Difficulty Scaling", "Scrap value max cap", 2.1474836E+09f, "스크랩 가치 배율의 합산이 이 값을 초과하지 않습니다."); scrapAmountMax = difficultyConfig.Bind("Difficulty Scaling", "Scrap amount max cap", 2.1474836E+09f, "스크랩 수량 배율의 합산이 이 값을 초과하지 않습니다."); FactorySizeMax = difficultyConfig.Bind("Difficulty Scaling", "Factory size max cap", 2.1474836E+09f, "공장 크기 배율의 합산이 이 값을 초과하지 않습니다. 사용에 주의하세요"); FactorySizeMin = difficultyConfig.Bind("Difficulty Scaling", "Factory size min cap", 0.01f, "공장 크기 배율의 합산이 이 값 미만으로 내려가지 않습니다. 사용에 주의하세요."); enableCustomTimeAdjustments = difficultyConfig.Bind("Difficulty Scaling", "Enable Time Adjustments?", false, "난이도 스케일링에 커스텀 시간 조정을 전역으로 활성화합니다."); timeScaling = Helper.getScale(difficultyConfig.Bind("Difficulty Scaling", "Time Scaling", "1, 0.0, 1, 1", "난이도 스케일링에 따른 시간 배율" + scaleDescription).Value); startingTime = Helper.getScale(difficultyConfig.Bind("Difficulty Scaling", "Starting Time", "100, 0.0, 100, 100", "난이도에 따른 시작 시간" + scaleDescription).Value); spawnChanceMultiplierScaling = Helper.getScale(difficultyConfig.Bind("Difficulty", "Spawn chance multiplier scale", "1.0, 0.017, 1.0, 2.0", "이 값으로 스폰 확률을 곱합니다, " + scaleDescription).Value); insideSpawnChanceAdditive = Helper.getScale(difficultyConfig.Bind("Difficulty", "Inside spawn chance additive", "0.0, 0.0, 0.0, 0.0", "애니메이션 커브의 내부 스폰 키프레임에 이 값을 더합니다, " + scaleDescription).Value); outsideSpawnChanceAdditive = Helper.getScale(difficultyConfig.Bind("Difficulty", "Outside spawn chance additive", "0.0, 0.0, 0.0, 0.0", "애니메이션 커브의 외부 스폰 키프레임에 이 값을 더합니다, " + scaleDescription).Value); spawnCapMultiplier = Helper.getScale(difficultyConfig.Bind("Difficulty", "Spawn cap multipler scale", "1.0, 0.017, 1.0, 2.0", "내외부 파워 카운트를 이 값으로 곱합니다, " + scaleDescription).Value); insideEnemyMaxPowerCountScaling = Helper.getScale(difficultyConfig.Bind("Difficulty", "Additional Inside Max Enemy Power Count", "0, 0, 0, 0", "내부 적의 최대 파워 카운트에 추가, " + scaleDescription).Value); outsideEnemyPowerCountScaling = Helper.getScale(difficultyConfig.Bind("Difficulty", "Additional Outside Max Enemy Power Count", "0, 0, 0, 0", "외부 적의 최대 파워 카운트에 추가, " + scaleDescription).Value); enemyBonusHpScaling = Helper.getScale(difficultyConfig.Bind("Difficulty", "Additional hp scale", "0, 0, 0, 0", "모든 적의 체력에 추가, " + scaleDescription).Value); scrapValueMultiplier = Helper.getScale(difficultyConfig.Bind("Difficulty", "Scrap value multiplier scale", "1.0, 0.003, 1.0, 1.3", "전역 스크랩 가치 배율, " + scaleDescription).Value); scrapAmountMultiplier = Helper.getScale(difficultyConfig.Bind("Difficulty", "Scrap amount multiplier scale", "1.0, 0.003, 1.0, 1.3", "전역 스크랩 수량 배율, " + scaleDescription).Value); factorySizeMultiplier = Helper.getScale(difficultyConfig.Bind("Difficulty", "Factory Size multiplier scale", "1.0, 0, 1.0, 1.0", "공장 크기 배율. 사용에 주의하세요. 로딩이 안 되거나 생성에 매우 오랜 시간이 걸릴 수 있습니다." + scaleDescription).Value); enablePlayerScaling = difficultyConfig.Bind("Player Scaling", "Enable player scaling?", false, "플레이어 스케일링 활성화"); playerScalingType = difficultyConfig.Bind("Player Scaling", "Player scaling type", "Linear", "플레이어 수에 대한 스케일링 유형. 옵션: 선형(Linear), 지수(Exponential), 로그(Logarithmic), 3차(Cubic)"); playerScalingMultiplier = difficultyConfig.Bind("Player Scaling", "Player scaling multiplier", 1f, "플레이어 스케일링 배율"); basePlayerAmount = difficultyConfig.Bind("Player Scaling", "기본 플레이어 수", 4, "기본 플레이어 수"); MEvent.EventType[] array = (MEvent.EventType[])Enum.GetValues(typeof(MEvent.EventType)); foreach (MEvent.EventType eventType in array) { scrapAmountByEventTypeScale.Add(eventType, bindEventTypeScrapAmountMultiplier(eventType)); scrapValueByEventTypeScale.Add(eventType, bindEventTypeScrapValueMultiplier(eventType)); } MoonsToIgnore = difficultyConfig.Bind("Moons Settings", "Moons to Not Spawn Events On", "", "이 달에서는 이벤트가 발생하지 않습니다. 달 이름은 쉼표로 구분하세요."); nutSlayerLives = customAssetsConfig.Bind("NutSlayer", "Lives", 5, "체력이 0 이하가 되면 목숨이 1 줄고 체력이 초기화됩니다. 목숨이 0이 되면 사망합니다."); nutSlayerHp = customAssetsConfig.Bind("NutSlayer", "Hp", 6, (ConfigDescription)null); nutSlayerMovementSpeed = customAssetsConfig.Bind("NutSlayer", "Speed?", 9.5f, (ConfigDescription)null); nutSlayerImmortal = customAssetsConfig.Bind("NutSlayer", "Immortal?", true, (ConfigDescription)null); onlyPlayersAttackSlayer = customAssetsConfig.Bind("NutSlayer", "Only players can attack NutSlayer?", false, "넛슬레이어가 무적이면 효과가 없습니다. true면 플레이어만 공격할 수 있습니다."); Assets.grabbableTurret.minValue = customAssetsConfig.Bind("Grabbable Landmine", "Min value", 50, (ConfigDescription)null).Value; Assets.grabbableTurret.maxValue = customAssetsConfig.Bind("Grabbable Landmine", "Max value", 75, (ConfigDescription)null).Value; Assets.grabbableLandmine.minValue = customAssetsConfig.Bind("Grabbable Turret", "Min value", 100, (ConfigDescription)null).Value; Assets.grabbableLandmine.maxValue = customAssetsConfig.Bind("Grabbable Turret", "Max value", 150, (ConfigDescription)null).Value; slayerShotgunMinValue = customAssetsConfig.Bind("Slayer Shotgun", "Min value", 200, (ConfigDescription)null); slayerShotgunMaxValue = customAssetsConfig.Bind("Slayer Shotgun", "Max value", 300, (ConfigDescription)null); useWeatherMultipliers = weatherConfig.Bind("_Weather Settings", "Enable weather multipliers?", true, "'false'= 모든 날씨 배율 비활성화 'true'= 날씨 배율 활성화"); randomizeWeatherMultipliers = weatherConfig.Bind("_Weather Settings", "Weather multiplier randomness?", false, "'false'= 비활성화 'true'= 활성화"); enableTerminalText = weatherConfig.Bind("_Weather Settings", "Enable terminal text?", true, "터미널에 날씨 관련 문구를 표시할지 여부입니다."); weatherRandomRandomMinInclusive = weatherConfig.Bind("_Weather Random Multipliers", "Min Inclusive", 0.9f, "무작위 배율의 최솟값(이상)입니다."); weatherRandomRandomMaxInclusive = weatherConfig.Bind("_Weather Random Multipliers", "Max Inclusive", 1.2f, "무작위 배율의 최댓값(이하)입니다."); noneMultiplier = createWeatherSettings(new Weather((LevelWeatherType)(-1), 1f, 1f)); dustCloudMultiplier = createWeatherSettings(new Weather((LevelWeatherType)0, 1.05f, 1f)); rainyMultiplier = createWeatherSettings(new Weather((LevelWeatherType)1, 1.05f, 1f)); stormyMultiplier = createWeatherSettings(new Weather((LevelWeatherType)2, 1.35f, 1.2f)); foggyMultiplier = createWeatherSettings(new Weather((LevelWeatherType)3, 1.15f, 1.1f)); floodedMultiplier = createWeatherSettings(new Weather((LevelWeatherType)4, 1.25f, 1.15f)); eclipsedMultiplier = createWeatherSettings(new Weather((LevelWeatherType)5, 1.35f, 1.2f)); UIKey = uiConfig.Bind("UI Options", "Toggle UI Key", "K", (ConfigDescription)null); color = uiConfig.Bind("UI Options", "UI Color Hex", "00A000", "UI 요소 색상(16진수)입니다."); uiColorReduction = uiConfig.Bind("UI Options", "UI Color Reduction Factor", 0.6275f, "UI가 비활성일 때 색을 어둡게 하는 비율입니다(0~1)."); colorArrows = uiConfig.Bind("UI Options", "UI Arrow Color Hex", "00A000", "UI 화살표 색상(16진수)입니다."); colorArrowsIncrease = uiConfig.Bind("UI Options", "UI Arrow Color Amplification", 1.59375f, "화살표가 활성일 때 색에 곱하는 배율입니다."); colorText = uiConfig.Bind("UI Options", "UI Text Color Hex", "00FF00", "UI 텍스트 색상(16진수)입니다."); NormaliseScrapValueDisplay = uiConfig.Bind("UI Options", "Normalize scrap value display number?", true, "게임 기본 표시값(0.4)을 2.5배해 UI에 익숙한 숫자로 보이게 합니다."); EnableUI = uiConfig.Bind("UI Options", "Enable UI?", true, "이벤트 UI를 사용할지 여부입니다."); ShowUILetterBox = uiConfig.Bind("UI Options", "Display UI Letter Box?", true, "UI 글자 상자를 표시할지 여부입니다."); ShowExtraProperties = uiConfig.Bind("UI Options", "Display extra properties", true, "스크랩 가치·수량 배율 등 추가 정보를 UI에 표시합니다."); PopUpUI = uiConfig.Bind("UI Options", "PopUp UI?", true, "하루를 시작할 때 UI가 자동으로 뜨게 할지 여부입니다."); UITime = uiConfig.Bind("UI Options", "PopUp UI time.", 45f, "UI가 자동으로 닫히기까지의 시간(초)입니다."); scrollSpeed = uiConfig.Bind("UI Options", "Scroll speed", 1f, "화살표로 스크롤할 때의 속도 배율입니다."); DisplayUIAfterShipLeaves = uiConfig.Bind("UI Options", "Display UI after ship leaves?", false, "true이면 함선이 떠난 뒤에만 이벤트를 표시합니다."); DisplayExtraPropertiesAfterShipLeaves = uiConfig.Bind("UI Options", "Display extra properties on UI after ship leaves?", true, "함선 출발 후 다음 날 이벤트 유형 확률과 난이도 정보를 표시합니다."); displayEvents = uiConfig.Bind("UI Options", "Display events?", true, "false이면 UI에 이벤트 목록을 표시하지 않습니다."); showEventsInChat = uiConfig.Bind("UI Options", "Will Minus display events in chat?", false, "true이면 채팅에도 이벤트 목록을 표시합니다."); enableCustomEvents = CorePropertiesConfig.Bind("Custom Events", "Enable Custom Events?", true, "커스텀 이벤트 폴더에서 이벤트를 불러옵니다."); ExtraLogging = CorePropertiesConfig.Bind("Debugging", "Enable Extra Logging?", false, "디버깅용 추가 로그를 출력합니다."); SilenceEnum = CorePropertiesConfig.Bind("Debugging", "Silence Enum Warnings?", true, "열거형(enum) 불일치 경고를 숨깁니다."); SilencePrefab = CorePropertiesConfig.Bind("Debugging", "Silence Prefab Warnings?", true, "프리팹 누락 경고를 숨깁니다."); GetMethods = CorePropertiesConfig.Bind("Debugging", "Silence Get Method Warnings?", true, "설치되지 않은 모드의 적·아이템 관련 경고를 숨깁니다."); DisableAllEvents = CorePropertiesConfig.Bind("Events Features", "Disable all events?", false, "true이면 모든 이벤트 발생을 끕니다. 이벤트 수가 0이 됩니다."); dontHandlePower = CorePropertiesConfig.Bind("Mod Compatibility", "Experimental Dont Handle Power?", false, "다른 모드가 파워 레벨을 처리하게 하려면 켜세요. 일부 설정은 여전히 영향을 줄 수 있습니다."); dontHandleSpawnCurves = CorePropertiesConfig.Bind("Mod Compatibility", "Experimental Dont Handle Spawn Chance?", false, "다른 모드가 스폰 확률 곡선을 처리하게 하려면 켜세요. 일부 설정은 여전히 영향을 줄 수 있습니다."); AffectPropertiesOutOfEvents = CorePropertiesConfig.Bind("Mod Compatibility", "Let Brutal handle properties outside of events?", true, "false이면 이벤트 밖의 속성은 Brutal이 건드리지 않습니다."); deferWeatherToMods = CorePropertiesConfig.Bind("Mod Compatibility", "Defer Weather To Weather ToolKit Mod?", false, "다른 모드가 Brutal 날씨 효과를 처리하게 하려면 켜세요. 커스텀 이벤트에는 기본적으로 Weather Toolkit을 씁니다."); enforceEscapeModChecks = CorePropertiesConfig.Bind("Mod Compatibility", "Enforce Escape Mod Checks?", true, "탈출 AI 모드가 없을 때, AI 오작동을 막기 위해 일부 이벤트 스폰을 조정합니다. 안전 검사 없이 쓰려면 끄세요."); enableSpecialEvents = CorePropertiesConfig.Bind("Events Features", "Enable Special Events?", false, "스페셜 이벤트를 불러옵니다."); enableBetaEvents = CorePropertiesConfig.Bind("Events Features", "Enable Beta Events?", false, "베타 이벤트를 불러옵니다. 미검증이라 버그가 많을 수 있습니다."); transmutationBlacklist = CorePropertiesConfig.Bind("Events Features", "Transmutation Blacklist", "", "스크랩 변환에 쓰이지 않게 막을 아이템 목록입니다. itemProperties.itemName(컴포넌트 이름)을 사용합니다."); handleScanCommand = CorePropertiesConfig.Bind("Mod Compatibility", "Let Brutal handle the SCAN command?", true, "true이면 Brutal이 SCAN 명령과 스크랩 가치 표시를 처리합니다. 다른 모드가 담당하면 끄세요. 끄면 수정된 가치가 SCAN에 반영되지 않을 수 있습니다."); speedrunMode = CorePropertiesConfig.Bind("Events Features", "Enable Speedrun Mode?", false, "true이면 스피드런에 맞게 일부 이벤트·기능을 조정합니다. 스피드런이 아니면 끄는 것을 권장합니다."); EventChanceGlobal = Helper.getScale(CorePropertiesConfig.Bind("Events Features", "Chance of Events Occurring", "100, 0.0, 100, 100", "하루에 이벤트가 발생할 확률입니다. " + scaleDescription).Value); InitTimePopUp = CorePropertiesConfig.Bind("Events Features", "Initial Time PopUp", 5f, "첫 팁이 뜨기까지의 대기 시간(초)입니다."); timeBetweenTips = CorePropertiesConfig.Bind("Events Features", "Time between tips", 5f, "팁 메시지 사이 간격(초)입니다."); try { if (!Directory.Exists(customEventsFolder)) { Directory.CreateDirectory(customEventsFolder); } } catch (Exception ex) { Log.LogWarning("Failed to create custom events folder: " + ex.Message); } RegisterEvents(eventConfig, EventManager.vanillaEvents); RegisterEvents(moddedEventConfig, EventManager.moddedEvents); if (enableCustomEvents.Value) { string[] files = Directory.GetFiles(customEventsFolder); foreach (string text in files) { if (text.EndsWith(".json")) { MEvent mEvent = new GeneralCustomEvent(text); mEvent.Initalize(); if (mEvent.Enabled) { EventManager.customEvents.Add(mEvent); } } } RegisterEvents(customEventConfig, EventManager.customEvents); } EventManager.events.AddRange(EventManager.vanillaEvents); EventManager.events.AddRange(EventManager.moddedEvents); EventManager.events.AddRange(EventManager.customEvents); BrutalCompanyMinus.Minus.Handlers.FacilityGhost.actionTimeCooldown = eventConfig.Bind("FacilityGhost", "Normal Action Time Interval", 15f, "유령이 행동을 결정하는 간격(초)입니다.").Value; BrutalCompanyMinus.Minus.Handlers.FacilityGhost.ghostCrazyActionInterval = eventConfig.Bind("FacilityGhost", "Crazy Action Time Interval", 0.1f, "유령이 광란 상태일 때 행동을 결정하는 간격(초)입니다.").Value; BrutalCompanyMinus.Minus.Handlers.FacilityGhost.ghostCrazyPeriod = eventConfig.Bind("FacilityGhost", "Crazy Period", 5f, "유령이 광란 상태로 유지되는 시간(초)입니다.").Value; BrutalCompanyMinus.Minus.Handlers.FacilityGhost.crazyGhostChance = eventConfig.Bind("FacilityGhost", "Crazy Chance", 0.1f, "행동 결정 시 광란 상태가 될 확률입니다.").Value; BrutalCompanyMinus.Minus.Handlers.FacilityGhost.DoNothingWeight = eventConfig.Bind("FacilityGhost", "Do Nothing Weight?", 25, "행동 결정 시 아무것도 하지 않을 가중치입니다.").Value; BrutalCompanyMinus.Minus.Handlers.FacilityGhost.OpenCloseBigDoorsWeight = eventConfig.Bind("FacilityGhost", "Open and close big doors weight", 20, "행동 결정 시 대형 문을 열고 닫을 가중치입니다.").Value; BrutalCompanyMinus.Minus.Handlers.FacilityGhost.MessWithLightsWeight = eventConfig.Bind("FacilityGhost", "Mess with lights weight", 16, "행동 결정 시 조명을 건드릴 가중치입니다.").Value; BrutalCompanyMinus.Minus.Handlers.FacilityGhost.MessWithBreakerWeight = eventConfig.Bind("FacilityGhost", "Mess with breaker weight", 4, "행동 결정 시 차단기를 건드릴 가중치입니다.").Value; BrutalCompanyMinus.Minus.Handlers.FacilityGhost.disableTurretsWeight = eventConfig.Bind("FacilityGhost", "Disable turrets weight?", 5, "행동 결정 시 포탑을 끌 가중치입니다.").Value; BrutalCompanyMinus.Minus.Handlers.FacilityGhost.disableLandminesWeight = eventConfig.Bind("FacilityGhost", "Disable landmines weight?", 5, "행동 결정 시 지뢰를 끌 가중치입니다.").Value; BrutalCompanyMinus.Minus.Handlers.FacilityGhost.turretRageWeight = eventConfig.Bind("FacilityGhost", "Turret rage weight?", 5, "행동 결정 시 포탑을 폭주시킬 가중치입니다.").Value; BrutalCompanyMinus.Minus.Handlers.FacilityGhost.OpenCloseDoorsWeight = eventConfig.Bind("FacilityGhost", "Open and close normal doors weight", 9, "행동 결정 시 일반 문을 열고 닫을 가중치입니다.").Value; BrutalCompanyMinus.Minus.Handlers.FacilityGhost.lockUnlockDoorsWeight = eventConfig.Bind("FacilityGhost", "Lock and unlock normal doors weight", 3, "행동 결정 시 일반 문을 잠그거나 열 가중치입니다.").Value; BrutalCompanyMinus.Minus.Handlers.FacilityGhost.chanceToOpenCloseDoor = eventConfig.Bind("FacilityGhost", "Chance to open and close normal doors", 0.3f, "문 열기·닫기를 선택했을 때, 각 문마다 실제로 적용될 확률입니다.").Value; BrutalCompanyMinus.Minus.Handlers.FacilityGhost.rageTurretsChance = eventConfig.Bind("FacilityGhost", "Chance to rage a turret", 0.3f, "포탑 폭주를 선택했을 때, 각 포탑마다 실제로 적용될 확률입니다.").Value; BrutalCompanyMinus.Minus.Handlers.RealityShift.normalScrapWeight = eventConfig.Bind("RealityShift", "Normal shift weight", 85, "스크랩을 다른 스크랩으로 바꿀 가중치입니다.").Value; BrutalCompanyMinus.Minus.Handlers.RealityShift.grabbableLandmineWeight = eventConfig.Bind("RealityShift", "Grabbable landmine shift weight", 15, "스크랩을 줍기 가능한 지뢰로 바꿀 가중치입니다.").Value; BrutalCompanyMinus.Minus.Handlers.RealityShift.transmuteChance = eventConfig.Bind("RealityShift", "Chance to transmute", 0.5f, "변환이 일어날 확률입니다.").Value; BrutalCompanyMinus.Minus.Handlers.RealityShift.enemyTeleportChance = eventConfig.Bind("RealityShift", "Enemy teleport chance", 0.1f, "적이 맞았을 때 순간이동할 확률입니다.").Value; DDay.bombardmentInterval = eventConfig.Bind("Warzone", "Bombardment interval", 100, "포격 이벤트 사이의 대기 시간입니다.").Value; DDay.bombardmentTime = eventConfig.Bind("Warzone", "Bombardment time", 15, "포격이 한 번 발생하면 지속되는 시간(초)입니다.").Value; DDay.fireInterval = eventConfig.Bind("Warzone", "Fire interval", 1, "포격 중 발사 간격(초)입니다.").Value; DDay.fireAmount = eventConfig.Bind("Warzone", "Fire amount", 8, "발사 간격마다 쏘는 발 수입니다. 큰 맵일수록 더 많아집니다.").Value; DDay.displayWarning = eventConfig.Bind("Warzone", "Display warning?", true, "포격 전에 경고 메시지를 표시할지 여부입니다.").Value; DDay.volume = eventConfig.Bind("Warzone", "Siren Volume?", 0.3f, "사이렌 음량입니다(0.0~1.0).").Value; ArtilleryShell.speed = eventConfig.Bind("Warzone", "Artillery shell speed", 100f, "포탄이 날아가는 속도입니다.").Value; SelectableLevel[] levels = StartOfRound.Instance.levels; foreach (SelectableLevel val in levels) { if (!((Object)(object)val == (Object)null)) { MEvent.Scale scale = Helper.getScale(levelPropertiesConfig.Bind($"{val.levelID}:{((Object)val).name}", "Min scrap amount scale", "1.0, 0.0, 1.0, 1.0", scaleDescription).Value); MEvent.Scale scale2 = Helper.getScale(levelPropertiesConfig.Bind($"{val.levelID}:{((Object)val).name}", "Max scrap amount scale", "1.0, 0.0, 1.0, 1.0", scaleDescription).Value); MEvent.Scale scale3 = Helper.getScale(levelPropertiesConfig.Bind($"{val.levelID}:{((Object)val).name}", "Min scrap value scale", "1.0, 0.0, 1.0, 1.0", scaleDescription).Value); MEvent.Scale scale4 = Helper.getScale(levelPropertiesConfig.Bind($"{val.levelID}:{((Object)val).name}", "Max scrap value scale", "1.0, 0.0, 1.0, 1.0", scaleDescription).Value); levelProperties.TryAdd(val.levelID, new LevelProperties(val.levelID, scale, scale2, scale3, scale4)); } } static void RegisterEvents(ConfigFile toConfig, List events) { //IL_082f: Unknown result type (might be due to invalid IL or missing references) //IL_0835: Expected O, but got Unknown foreach (MEvent @event in events) { eventWeights.Add(toConfig.Bind(@event.Name(), "Custom Weight", @event.Weight, "직접 가중치를 쓰려면 '_Event Settings'의 'Use custom weights?'를 true로 설정하세요.")); eventDescriptions.Add(Helper.ListToDescriptions(toConfig.Bind(@event.Name(), "Descriptions", Helper.StringsToList(@event.Descriptions, "|"), "| 로 구분합니다.").Value)); eventColorHexes.Add(toConfig.Bind(@event.Name(), "Color Hex", @event.ColorHex, (ConfigDescription)null)); eventTypes.Add(toConfig.Bind(@event.Name(), "Event Type", @event.Type, (ConfigDescription)null)); showTip.Add(toConfig.Bind(@event.Name(), "Show Tip?", @event.showTip, "true이면 팁을 표시합니다.")); TipsTitles.Add(Helper.ListToDescriptions(toConfig.Bind(@event.Name(), "Tip Titles", Helper.StringsToList(@event.TipTitle, "|"), "| 로 구분합니다.").Value)); TipsList.Add(Helper.ListToDescriptions(toConfig.Bind(@event.Name(), "Tip Messages", Helper.StringsToList(@event.TipMessages, "|"), "| 로 구분합니다.").Value)); TipIsWarning.Add(toConfig.Bind(@event.Name(), "Is Tip A Warning?", @event.isWarning, "true이면 빨간 경고로, false이면 노란 안내로 표시합니다.")); eventEnables.Add(toConfig.Bind(@event.Name(), "Event Enabled?", @event.Enabled, "false이면 이 이벤트는 발생하지 않습니다.")); Dictionary dictionary = new Dictionary(); foreach (KeyValuePair scale5 in @event.ScaleList) { dictionary.Add(scale5.Key, Helper.getScale(toConfig.Bind(@event.Name(), scale5.Key.ToString(), Helper.GetStringFromScale(scale5.Value), MEvent.ScaleInfoList[scale5.Key] + " " + scaleDescription).Value)); } eventScales.Add(dictionary); eventsToRemove.Add(Helper.ListToStrings(toConfig.Bind(@event.Name(), "Events To Remove", Helper.StringsToList(@event.EventsToRemove, ", "), "목록의 이벤트가 발생하지 않도록 막습니다.").Value)); eventsToSpawnWith.Add(Helper.ListToStrings(toConfig.Bind(@event.Name(), "Events To Spawn With", Helper.StringsToList(@event.EventsToSpawnWith, ", "), "목록의 이벤트를 함께 발생시킵니다.").Value)); eventAliases.Add(Helper.ListToStrings(toConfig.Bind(@event.Name(), "Event Aliases", Helper.StringsToList(@event.Aliases, ", "), "쉼표로 별칭을 구분합니다. 이벤트 강제 발생 시 쓸 수 있으며 대소문자를 구분하지 않습니다. 여러 이벤트에 같은 별칭을 쓰지 마세요.").Value)); moonMode.Add(toConfig.Bind(@event.Name(), "Whitelist Mode?", @event.MoonMode, "어떤 달 목록을 쓸지 선택합니다. 화이트리스트 모드는 항목이 하나 이상 있어야 합니다.")); eventSpecial.Add(toConfig.Bind(@event.Name(), "Special Event?", @event.isSpecialEvent, "스페셜 이벤트는 'Enable Special Events'가 켜져 있어야 합니다.")); eventBeta.Add(toConfig.Bind(@event.Name(), "Beta Event?", @event.isBetaEvent, "베타 이벤트는 'Enable Beta Events'가 켜져 있어야 합니다.")); moonBlacklist.Add(Helper.ListToStrings(toConfig.Bind(@event.Name(), "Moons To Not Spawn On", Helper.StringsToList(@event.Blacklist, ", "), "이 달에서는 이벤트가 발생하지 않습니다. 달 이름은 쉼표로 구분하고 목록을 채워야 합니다.").Value)); moonWhitelist.Add(Helper.ListToStrings(toConfig.Bind(@event.Name(), "Moons To Spawn Only On", Helper.StringsToList(@event.Whitelist, ", "), "이 달에서만 이벤트가 발생합니다. 달 이름은 쉼표로 구분하고 목록을 채워야 합니다.").Value)); List list = new List(); for (int l = 0; l < @event.monstersToSpawn.Count; l++) { list.Add(new MEvent.MonsterEvent(toConfig.Bind(@event.Name(), $"Enemy {l} Name", ((Object)@event.monstersToSpawn[l].enemy).name, "잘못된 적 이름이면 빈 enemyType이 반환됩니다.").Value, Helper.getScale(toConfig.Bind(@event.Name(), $"{((Object)@event.monstersToSpawn[l].enemy).name} {MEvent.ScaleType.InsideEnemyRarity}", Helper.GetStringFromScale(@event.monstersToSpawn[l].insideSpawnRarity), MEvent.ScaleInfoList[MEvent.ScaleType.InsideEnemyRarity] + " " + scaleDescription).Value), Helper.getScale(toConfig.Bind(@event.Name(), $"{((Object)@event.monstersToSpawn[l].enemy).name} {MEvent.ScaleType.OutsideEnemyRarity}", Helper.GetStringFromScale(@event.monstersToSpawn[l].outsideSpawnRarity), MEvent.ScaleInfoList[MEvent.ScaleType.OutsideEnemyRarity] + " " + scaleDescription).Value), Helper.getScale(toConfig.Bind(@event.Name(), $"{((Object)@event.monstersToSpawn[l].enemy).name} {MEvent.ScaleType.MinInsideEnemy}", Helper.GetStringFromScale(@event.monstersToSpawn[l].minInside), MEvent.ScaleInfoList[MEvent.ScaleType.MinInsideEnemy] + " " + scaleDescription).Value), Helper.getScale(toConfig.Bind(@event.Name(), $"{((Object)@event.monstersToSpawn[l].enemy).name} {MEvent.ScaleType.MaxInsideEnemy}", Helper.GetStringFromScale(@event.monstersToSpawn[l].maxInside), MEvent.ScaleInfoList[MEvent.ScaleType.MaxInsideEnemy] + " " + scaleDescription).Value), Helper.getScale(toConfig.Bind(@event.Name(), $"{((Object)@event.monstersToSpawn[l].enemy).name} {MEvent.ScaleType.MinOutsideEnemy}", Helper.GetStringFromScale(@event.monstersToSpawn[l].minOutside), MEvent.ScaleInfoList[MEvent.ScaleType.MinOutsideEnemy] + " " + scaleDescription).Value), Helper.getScale(toConfig.Bind(@event.Name(), $"{((Object)@event.monstersToSpawn[l].enemy).name} {MEvent.ScaleType.MaxOutsideEnemy}", Helper.GetStringFromScale(@event.monstersToSpawn[l].maxOutside), MEvent.ScaleInfoList[MEvent.ScaleType.MaxOutsideEnemy] + " " + scaleDescription).Value))); } monsterEvents.Add(list); MEvent.Scale amount = new MEvent.Scale(0f, 0f, 0f, 0f); if (@event.scrapTransmutationEvent.items.Length != 0) { amount = Helper.getScale(toConfig.Bind(@event.Name(), "Percentage", Helper.GetStringFromScale(@event.scrapTransmutationEvent.amount), MEvent.ScaleInfoList[MEvent.ScaleType.Percentage] + " " + scaleDescription).Value); } SpawnableItemWithRarity[] array2 = (SpawnableItemWithRarity[])(object)new SpawnableItemWithRarity[@event.scrapTransmutationEvent.items.Length]; for (int m = 0; m < @event.scrapTransmutationEvent.items.Length; m++) { array2[m] = new SpawnableItemWithRarity(Assets.GetItem(toConfig.Bind(@event.Name(), $"Scrap {m} name", ((Object)@event.scrapTransmutationEvent.items[m].spawnableItem).name, "잘못된 스크랩 이름이면 빈 아이템이 반환됩니다.").Value), toConfig.Bind(@event.Name(), ((Object)@event.scrapTransmutationEvent.items[m].spawnableItem).name + " Rarity", @event.scrapTransmutationEvent.items[m].rarity, (ConfigDescription)null).Value); } transmutationEvents.Add(new MEvent.ScrapTransmutationEvent(amount, array2)); } } static MEvent.Scale bindEventTypeScrapAmountMultiplier(MEvent.EventType difficulty) { return Helper.getScale(difficultyConfig.Bind("_EventType Scrap Multipliers", difficulty.ToString() + " scrap amount scale", "1, 0.0, 1, 1", scaleDescription).Value); } static MEvent.Scale bindEventTypeScrapValueMultiplier(MEvent.EventType difficulty) { return Helper.getScale(difficultyConfig.Bind("_EventType Scrap Multipliers", difficulty.ToString() + " scrap value scale", "1, 0.0, 1, 1", scaleDescription).Value); } static Weather createWeatherSettings(Weather weather) { //IL_0094: Unknown result type (might be due to invalid IL or missing references) string text2 = "(" + ((object)(LevelWeatherType)(ref weather.weatherType)).ToString() + ") Weather multipliers"; float value = weatherConfig.Bind(text2, "Scrap Value Multiplier", weather.scrapValueMultiplier, ((object)(LevelWeatherType)(ref weather.weatherType)).ToString() + " 날씨의 스크랩 가치 배율입니다.").Value; float value2 = weatherConfig.Bind(text2, "Scrap Amount Multiplier", weather.scrapAmountMultiplier, ((object)(LevelWeatherType)(ref weather.weatherType)).ToString() + " 날씨의 스크랩 수량 배율입니다.").Value; return new Weather(weather.weatherType, value, value2); } } public static void CreateConfig() { if (Initalized) { return; } foreach (MEvent vanillaEvent in EventManager.vanillaEvents) { vanillaEvent.Initalize(); } foreach (MEvent moddedEvent in EventManager.moddedEvents) { moddedEvent.Initalize(); } Initalize(); for (int i = 0; i != EventManager.events.Count; i++) { EventManager.events[i].Weight = eventWeights[i].Value; EventManager.events[i].Descriptions = eventDescriptions[i]; EventManager.events[i].ColorHex = eventColorHexes[i].Value; EventManager.events[i].Type = eventTypes[i].Value; EventManager.events[i].ScaleList = eventScales[i]; EventManager.events[i].showTip = showTip[i].Value; EventManager.events[i].isWarning = TipIsWarning[i].Value; EventManager.events[i].TipTitle = TipsTitles[i]; EventManager.events[i].TipMessages = TipsList[i]; EventManager.events[i].Enabled = eventEnables[i].Value; EventManager.events[i].EventsToRemove = eventsToRemove[i]; EventManager.events[i].EventsToSpawnWith = eventsToSpawnWith[i]; EventManager.events[i].Aliases = eventAliases[i]; EventManager.events[i].MoonMode = moonMode[i].Value; EventManager.events[i].Blacklist = moonBlacklist[i]; EventManager.events[i].Whitelist = moonWhitelist[i]; EventManager.events[i].isSpecialEvent = eventSpecial[i].Value; EventManager.events[i].isBetaEvent = eventBeta[i].Value; EventManager.events[i].monstersToSpawn = monsterEvents[i]; EventManager.events[i].scrapTransmutationEvent = transmutationEvents[i]; } List list = new List(); foreach (MEvent @event in EventManager.events) { if (!@event.Enabled) { EventManager.disabledEvents.Add(@event); continue; } list.Add(@event); switch (@event.Type) { case MEvent.EventType.Insane: EventManager.allInsane.Add(@event); break; case MEvent.EventType.VeryBad: EventManager.allVeryBad.Add(@event); break; case MEvent.EventType.Bad: EventManager.allBad.Add(@event); break; case MEvent.EventType.Neutral: EventManager.allNeutral.Add(@event); break; case MEvent.EventType.Good: EventManager.allGood.Add(@event); break; case MEvent.EventType.VeryGood: EventManager.allVeryGood.Add(@event); break; case MEvent.EventType.Rare: EventManager.allRare.Add(@event); break; case MEvent.EventType.Remove: EventManager.allRemove.Add(@event); break; } } EventManager.events = list; EventManager.UpdateEventTypeCounts(); EventManager.UpdateAllEventWeights(); Log.LogInfo($"\n\nTotal Events:{EventManager.events.Count}, Disabled Events:{EventManager.disabledEvents.Count}, Total Events - Remove Count:{(float)EventManager.events.Count - EventManager.eventTypeCount[5]}\n" + $"Very Bad:{EventManager.eventTypeCount[0]}\n" + $"Bad:{EventManager.eventTypeCount[1]}\n" + $"Neutral:{EventManager.eventTypeCount[2]}\n" + $"Good:{EventManager.eventTypeCount[3]}\n" + $"Very Good:{EventManager.eventTypeCount[4]}\n" + $"Remove:{EventManager.eventTypeCount[5]}\n"); CreateAllEnemiesConfig(); uiConfig.Save(); difficultyConfig.Save(); eventConfig.Save(); weatherConfig.Save(); customAssetsConfig.Save(); moddedEventConfig.Save(); allEnemiesConfig.Save(); levelPropertiesConfig.Save(); CorePropertiesConfig.Save(); Initalized = true; } private static void CreateAllEnemiesConfig() { enableAllEnemies = allEnemiesConfig.Bind("_All Enemies", "Enable?", false, "모든 적이 모든 달에 스폰될 수 있게 합니다. 난이도가 크게 올라갑니다."); enableAllAllEnemies = allEnemiesConfig.Bind("_All All Enemies", "Enable?", false, "내부·외부 적 구분 없이 어디서나 스폰되게 합니다(거인·벌레가 시설 안에도 등장). 'All'과 'All All'을 함께 켜면 극악 난이도입니다."); List list = new List { CreateEnemyEntry(Assets.EnemyName.Bracken, 8f, 1, EnemySpawnCycle.SpawnLocation.Inside), CreateEnemyEntry(Assets.EnemyName.HoardingBug, 60f, 10, EnemySpawnCycle.SpawnLocation.Inside), CreateEnemyEntry(Assets.EnemyName.CoilHead, 20f, 5, EnemySpawnCycle.SpawnLocation.Inside), CreateEnemyEntry(Assets.EnemyName.Thumper, 25f, 5, EnemySpawnCycle.SpawnLocation.Inside), CreateEnemyEntry(Assets.EnemyName.BunkerSpider, 35f, 5, EnemySpawnCycle.SpawnLocation.Inside), CreateEnemyEntry(Assets.EnemyName.Jester, 7f, 1, EnemySpawnCycle.SpawnLocation.Inside), CreateEnemyEntry(Assets.EnemyName.SnareFlea, 45f, 5, EnemySpawnCycle.SpawnLocation.Inside), CreateEnemyEntry(Assets.EnemyName.Hygrodere, 10f, 3, EnemySpawnCycle.SpawnLocation.Inside), CreateEnemyEntry(Assets.EnemyName.GhostGirl, 5f, 1, EnemySpawnCycle.SpawnLocation.Inside), CreateEnemyEntry(Assets.EnemyName.SporeLizard, 15f, 3, EnemySpawnCycle.SpawnLocation.Inside), CreateEnemyEntry(Assets.EnemyName.NutCracker, 15f, 3, EnemySpawnCycle.SpawnLocation.Inside), CreateEnemyEntry(Assets.EnemyName.Masked, 10f, 3, EnemySpawnCycle.SpawnLocation.Inside), CreateEnemyEntry(Assets.EnemyName.Butler, 20f, 3, EnemySpawnCycle.SpawnLocation.Inside), CreateEnemyEntry(Assets.EnemyName.Lasso, 5f, 1, EnemySpawnCycle.SpawnLocation.Inside), CreateEnemyEntry(((Object)Assets.kamikazieBug).name, 30f, 5, EnemySpawnCycle.SpawnLocation.Inside), CreateEnemyEntry(((Object)Assets.antiCoilHead).name, 10f, 2, EnemySpawnCycle.SpawnLocation.Inside), CreateEnemyEntry(((Object)Assets.nutSlayer).name, 3f, 1, EnemySpawnCycle.SpawnLocation.Inside), CreateEnemyEntry(Assets.EnemyName.EyelessDog, 25f, 5, EnemySpawnCycle.SpawnLocation.Outside), CreateEnemyEntry(Assets.EnemyName.ForestKeeper, 10f, 3, EnemySpawnCycle.SpawnLocation.Outside), CreateEnemyEntry(Assets.EnemyName.EarthLeviathan, 8f, 3, EnemySpawnCycle.SpawnLocation.Outside), CreateEnemyEntry(Assets.EnemyName.BaboonHawk, 35f, 10, EnemySpawnCycle.SpawnLocation.Outside), CreateEnemyEntry(Assets.EnemyName.OldBird, 6f, 3, EnemySpawnCycle.SpawnLocation.Outside) }; foreach (EnemyType enemy2 in Assets.EnemyList.Values) { if (!((Object)(object)enemy2 == (Object)null) && !((Object)(object)enemy2.enemyPrefab == (Object)null) && !enemy2.isDaytimeEnemy && !list.Exists((EnemySpawnCycle.EnemySpawnInfo x) => ((Object)x.enemy).name == ((Object)enemy2).name)) { if (enemy2.isOutsideEnemy) { CreateEnemyEntry(((Object)enemy2).name, 5f, 1, EnemySpawnCycle.SpawnLocation.Outside); } else { CreateEnemyEntry(((Object)enemy2).name, 5f, 1, EnemySpawnCycle.SpawnLocation.Inside); } } } EnemySpawnCycle.allEnemiesCycle = new EnemySpawnCycle.SpawnCycle { enemies = list, nothingWeight = allEnemiesConfig.Bind("_All Enemies", "All enemies nothing weight", 400f, "스폰이 일어나지 않을 가중치입니다.").Value, spawnAttemptInterval = allEnemiesConfig.Bind("_All Enemies", "Spawn interval", 86f, "이 주기가 스폰을 시도하는 간격(초)입니다.").Value, spawnCycleDuration = 0f }; header = "All All Enemies"; List enemies = new List { CreateEnemyEntry(Assets.EnemyName.Bracken, 8f, 1, EnemySpawnCycle.SpawnLocation.Inside), CreateEnemyEntry(Assets.EnemyName.HoardingBug, 60f, 10, EnemySpawnCycle.SpawnLocation.Inside), CreateEnemyEntry(Assets.EnemyName.CoilHead, 20f, 5, EnemySpawnCycle.SpawnLocation.Inside), CreateEnemyEntry(Assets.EnemyName.Thumper, 25f, 5, EnemySpawnCycle.SpawnLocation.Inside), CreateEnemyEntry(Assets.EnemyName.BunkerSpider, 35f, 5, EnemySpawnCycle.SpawnLocation.Inside), CreateEnemyEntry(Assets.EnemyName.Jester, 7f, 1, EnemySpawnCycle.SpawnLocation.Inside), CreateEnemyEntry(Assets.EnemyName.SnareFlea, 45f, 5, EnemySpawnCycle.SpawnLocation.Inside), CreateEnemyEntry(Assets.EnemyName.Hygrodere, 10f, 3, EnemySpawnCycle.SpawnLocation.Inside), CreateEnemyEntry(Assets.EnemyName.GhostGirl, 5f, 1, EnemySpawnCycle.SpawnLocation.Inside), CreateEnemyEntry(Assets.EnemyName.SporeLizard, 15f, 3, EnemySpawnCycle.SpawnLocation.Inside), CreateEnemyEntry(Assets.EnemyName.NutCracker, 15f, 3, EnemySpawnCycle.SpawnLocation.Inside), CreateEnemyEntry(Assets.EnemyName.Masked, 10f, 3, EnemySpawnCycle.SpawnLocation.Inside), CreateEnemyEntry(Assets.EnemyName.Butler, 20f, 3, EnemySpawnCycle.SpawnLocation.Inside), CreateEnemyEntry(Assets.EnemyName.Lasso, 5f, 1, EnemySpawnCycle.SpawnLocation.Inside), CreateEnemyEntry(((Object)Assets.kamikazieBug).name, 30f, 5, EnemySpawnCycle.SpawnLocation.Inside), CreateEnemyEntry(((Object)Assets.antiCoilHead).name, 10f, 2, EnemySpawnCycle.SpawnLocation.Inside), CreateEnemyEntry(((Object)Assets.nutSlayer).name, 3f, 1, EnemySpawnCycle.SpawnLocation.Inside), CreateEnemyEntry(Assets.EnemyName.EyelessDog, 10f, 5, EnemySpawnCycle.SpawnLocation.Inside), CreateEnemyEntry(Assets.EnemyName.ForestKeeper, 6f, 3, EnemySpawnCycle.SpawnLocation.Inside), CreateEnemyEntry(Assets.EnemyName.EarthLeviathan, 8f, 3, EnemySpawnCycle.SpawnLocation.Inside), CreateEnemyEntry(Assets.EnemyName.BaboonHawk, 20f, 10, EnemySpawnCycle.SpawnLocation.Inside), CreateEnemyEntry(Assets.EnemyName.OldBird, 6f, 3, EnemySpawnCycle.SpawnLocation.Inside), CreateEnemyEntry(Assets.EnemyName.Bracken, 4f, 1, EnemySpawnCycle.SpawnLocation.Outside), CreateEnemyEntry(Assets.EnemyName.HoardingBug, 30f, 10, EnemySpawnCycle.SpawnLocation.Outside), CreateEnemyEntry(Assets.EnemyName.CoilHead, 10f, 5, EnemySpawnCycle.SpawnLocation.Outside), CreateEnemyEntry(Assets.EnemyName.Thumper, 13f, 5, EnemySpawnCycle.SpawnLocation.Outside), CreateEnemyEntry(Assets.EnemyName.BunkerSpider, 18f, 5, EnemySpawnCycle.SpawnLocation.Outside), CreateEnemyEntry(Assets.EnemyName.Jester, 3f, 1, EnemySpawnCycle.SpawnLocation.Outside), CreateEnemyEntry(Assets.EnemyName.SnareFlea, 10f, 5, EnemySpawnCycle.SpawnLocation.Outside), CreateEnemyEntry(Assets.EnemyName.Hygrodere, 5f, 3, EnemySpawnCycle.SpawnLocation.Outside), CreateEnemyEntry(Assets.EnemyName.GhostGirl, 3f, 1, EnemySpawnCycle.SpawnLocation.Outside), CreateEnemyEntry(Assets.EnemyName.SporeLizard, 7f, 3, EnemySpawnCycle.SpawnLocation.Outside), CreateEnemyEntry(Assets.EnemyName.NutCracker, 8f, 3, EnemySpawnCycle.SpawnLocation.Outside), CreateEnemyEntry(Assets.EnemyName.Masked, 5f, 3, EnemySpawnCycle.SpawnLocation.Outside), CreateEnemyEntry(Assets.EnemyName.Butler, 10f, 3, EnemySpawnCycle.SpawnLocation.Outside), CreateEnemyEntry(Assets.EnemyName.Lasso, 3f, 1, EnemySpawnCycle.SpawnLocation.Outside), CreateEnemyEntry(((Object)Assets.kamikazieBug).name, 15f, 5, EnemySpawnCycle.SpawnLocation.Outside), CreateEnemyEntry(((Object)Assets.antiCoilHead).name, 5f, 2, EnemySpawnCycle.SpawnLocation.Outside), CreateEnemyEntry(((Object)Assets.nutSlayer).name, 2f, 1, EnemySpawnCycle.SpawnLocation.Outside), CreateEnemyEntry(Assets.EnemyName.EyelessDog, 15f, 5, EnemySpawnCycle.SpawnLocation.Outside), CreateEnemyEntry(Assets.EnemyName.ForestKeeper, 10f, 3, EnemySpawnCycle.SpawnLocation.Outside), CreateEnemyEntry(Assets.EnemyName.EarthLeviathan, 12f, 3, EnemySpawnCycle.SpawnLocation.Outside), CreateEnemyEntry(Assets.EnemyName.BaboonHawk, 35f, 10, EnemySpawnCycle.SpawnLocation.Outside), CreateEnemyEntry(Assets.EnemyName.OldBird, 10f, 3, EnemySpawnCycle.SpawnLocation.Outside) }; foreach (EnemyType enemy in Assets.EnemyList.Values) { if (!((Object)(object)enemy == (Object)null) && !((Object)(object)enemy.enemyPrefab == (Object)null) && !list.Exists((EnemySpawnCycle.EnemySpawnInfo x) => ((Object)x.enemy).name == ((Object)enemy).name)) { CreateEnemyEntry(((Object)enemy).name, 5f, 1, EnemySpawnCycle.SpawnLocation.Inside); CreateEnemyEntry(((Object)enemy).name, 5f, 1, EnemySpawnCycle.SpawnLocation.Outside); } } EnemySpawnCycle.allAllEnemiesCycle = new EnemySpawnCycle.SpawnCycle { enemies = enemies, nothingWeight = allEnemiesConfig.Bind("_All All Enemies", "All enemies nothing weight", 400f, "스폰이 일어나지 않을 가중치입니다.").Value, spawnAttemptInterval = allEnemiesConfig.Bind("_All All Enemies", "Spawn interval", 86f, "이 주기가 스폰을 시도하는 간격(초)입니다.").Value, spawnCycleDuration = 0f }; } private static EnemySpawnCycle.EnemySpawnInfo CreateEnemyEntry(string enemy, float defaultWeight, int spawnCap, EnemySpawnCycle.SpawnLocation spawnLocation) { return new EnemySpawnCycle.EnemySpawnInfo { enemy = Assets.GetEnemyOrDefault(enemy).enemyPrefab, enemyWeight = allEnemiesConfig.Bind(header, $"{spawnLocation} {enemy} Weight", defaultWeight, "스폰 가중치입니다.").Value, spawnCap = allEnemiesConfig.Bind(header, $"{spawnLocation} {enemy} Spawn Cap", spawnCap, "최대 스폰 수입니다.").Value, spawnLocation = spawnLocation }; } private static EnemySpawnCycle.EnemySpawnInfo CreateEnemyEntry(Assets.EnemyName name, float defaultWeight, int spawnCap, EnemySpawnCycle.SpawnLocation spawnLocation) { return CreateEnemyEntry(Assets.EnemyNameList[name], defaultWeight, spawnCap, spawnLocation); } [HarmonyPrefix] [HarmonyPatch(typeof(TimeOfDay), "Awake")] private static void OnTimeDayStart(ref TimeOfDay __instance) { enableQuotaChanges = difficultyConfig.Bind("Quota Settings", "_Enable Quota Changes", false, "true로 설정한 뒤 세이브를 불러오면 나머지 할당량 설정이 생성됩니다. 기본값은 게임 값을 따릅니다."); if (enableQuotaChanges.Value) { __instance.quotaVariables.deadlineDaysAmount = difficultyConfig.Bind("Quota Settings", "Deadline Days Amount", __instance.quotaVariables.deadlineDaysAmount, (ConfigDescription)null).Value; __instance.quotaVariables.startingCredits = difficultyConfig.Bind("Quota Settings", "Starting Credits", __instance.quotaVariables.startingCredits, (ConfigDescription)null).Value; __instance.quotaVariables.startingQuota = difficultyConfig.Bind("Quota Settings", "Starting Quota", __instance.quotaVariables.startingQuota, (ConfigDescription)null).Value; __instance.quotaVariables.baseIncrease = difficultyConfig.Bind("Quota Settings", "Base Increase", __instance.quotaVariables.baseIncrease, (ConfigDescription)null).Value; __instance.quotaVariables.increaseSteepness = difficultyConfig.Bind("Quota Settings", "Increase Steepness", __instance.quotaVariables.increaseSteepness, (ConfigDescription)null).Value; } } [HarmonyPrefix] [HarmonyPatch(typeof(Terminal), "Awake")] private static void OnTerminalAwake() { Manager.currentTerminal = Object.FindObjectOfType(); } } public static class Helper { private class CircularList : List { public T Last { get { return base[base.Count - 1]; } set { base[base.Count - 1] = value; } } public T First { get { return base[0]; } set { base[0] = value; } } public void PushLast(T obj) { Add(obj); } public T PopLast() { T result = base[base.Count - 1]; RemoveAt(base.Count - 1); return result; } public void PushFirst(T obj) { Insert(0, obj); } public T PopFirst() { T result = base[0]; RemoveAt(0); return result; } } internal static CultureInfo en = new CultureInfo("en-US"); public static List GetOutsideNodes() { return (from n in GameObject.FindGameObjectsWithTag("OutsideAINode") select n.transform.position).ToList(); } public static List GetInsideAINodes() { return (from n in GameObject.FindGameObjectsWithTag("AINode") select n.transform.position).ToList(); } public static List GetSpawnDenialNodes() { //IL_0045: Unknown result type (might be due to invalid IL or missing references) List list = (from n in GameObject.FindGameObjectsWithTag("SpawnDenialPoint") select n.transform.position).ToList(); list.Add(GameObject.FindGameObjectWithTag("ItemShipLandingNode").transform.position); list.AddRange((from i in Object.FindObjectsOfType() select ((Component)i).gameObject.transform.position).ToList()); list.AddRange((from l in Object.FindObjectsOfType() where l.isLadder select ((Component)l).gameObject.transform.position).ToList()); return list; } internal static int[] IntArray(this float[] Values) { int[] array = new int[Values.Length]; for (int i = 0; i < Values.Length; i++) { array[i] = (int)Values[i]; } return array; } public static SpawnableMapObject[] Add(this SpawnableMapObject[] toObjects, SpawnableMapObject newObject) { SpawnableMapObject[] array = (SpawnableMapObject[])(object)new SpawnableMapObject[toObjects.Length + 1]; for (int i = 0; i < toObjects.Length; i++) { array[i] = toObjects[i]; } array[toObjects.Length] = newObject; return array; } internal static WeatherEffect[] Add(this WeatherEffect[] toObjects, WeatherEffect newObject) { WeatherEffect[] array = (WeatherEffect[])(object)new WeatherEffect[toObjects.Length + 1]; for (int i = 0; i < toObjects.Length; i++) { array[i] = toObjects[i]; } array[toObjects.Length] = newObject; return array; } public static Vector3 GetRandomNavMeshPositionInBox(Vector3 pos, float minRadius, float maxRadius) { //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0088: 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_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_0095: 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_00ad: 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) float num = (maxRadius + minRadius) * 0.5f; float num2 = (maxRadius - minRadius) * 0.5f; Vector3 val = default(Vector3); NavMeshHit val2 = default(NavMeshHit); for (int i = 0; i < 15; i++) { Random.InitState(Net.Instance._seed++ + Environment.TickCount); ((Vector3)(ref val))..ctor(Mathf.Cos(Random.Range(0f, MathF.PI * 2f)) * num + pos.x, pos.y, Mathf.Sin(Random.Range(0f, MathF.PI * 2f)) * num + pos.z); if (NavMesh.SamplePosition(val, ref val2, num2, -1) && Vector3.Distance(pos, val) >= minRadius) { return ((NavMeshHit)(ref val2)).position; } } return pos; } internal static string GetPercentage(float value) { return (value * 100f).ToString("F1") + "%"; } internal static string GetDifficultyColorHex(float difficulty, float cap) { if (cap == 0f) { cap = 1f; } difficulty *= Configuration.difficultyMaxCap.Value / cap; EventManager.DifficultyTransition[] chosenAndNextTransition = GetChosenAndNextTransition(difficulty); return chosenAndNextTransition[0].GetTransitionHex(chosenAndNextTransition[1]); } internal static string GetDifficultyText() { EventManager.DifficultyTransition[] chosenAndNextTransition = GetChosenAndNextTransition(Manager.difficulty); return "" + chosenAndNextTransition[0].name + ""; } internal static EventManager.DifficultyTransition[] GetChosenAndNextTransition(float difficulty) { EventManager.DifficultyTransition difficultyTransition = Configuration.difficultyTransitions[0]; EventManager.DifficultyTransition difficultyTransition2 = Configuration.difficultyTransitions[0]; int num = 0; for (int i = 0; i < Configuration.difficultyTransitions.Length; i++) { if (Configuration.difficultyTransitions[i].above <= difficulty) { difficultyTransition = Configuration.difficultyTransitions[i]; num = i; } } difficultyTransition2 = ((num != Configuration.difficultyTransitions.Length - 1) ? Configuration.difficultyTransitions[num + 1] : difficultyTransition); return new EventManager.DifficultyTransition[2] { difficultyTransition, difficultyTransition2 }; } internal static Vector3 GetSafePosition(List nodes, List denialNodes, float radius, int seed) { //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0037: 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_003f: 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_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_009c: 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_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: 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) //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_00fe: Unknown result type (might be due to invalid IL or missing references) Random random = new Random(seed); Random.InitState(seed); Vector3 val = nodes[random.Next(nodes.Count)]; int num = 0; while (true) { num++; Vector3 randomNavMeshPositionInRadius = RoundManager.Instance.GetRandomNavMeshPositionInRadius(val, radius, default(NavMeshHit)); bool flag = true; foreach (Vector3 denialNode in denialNodes) { if (Vector3.Distance(denialNode, randomNavMeshPositionInRadius) <= 16f) { flag = false; } } if (flag) { val = randomNavMeshPositionInRadius; break; } if (num > 51) { Vector3 val2 = val; Log.LogError("GetSafePosition() got stuck, returning " + ((object)(Vector3)(ref val2)).ToString()); break; } if (num % 10 == 0) { val = nodes[Random.Range(0, nodes.Count)]; } } return val; } public static bool IsSafe(Vector3 testNode, List fromNodes, float radius) { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) foreach (Vector3 fromNode in fromNodes) { if (Vector3.Distance(testNode, fromNode) <= radius) { return false; } } return true; } public static string MostCommon(List list) { string result = ""; if (list != null && list.Count > 0) { Dictionary dictionary = new Dictionary(); foreach (string item in list) { if (dictionary.ContainsKey(item)) { dictionary[item]++; } else { dictionary.Add(item, 1); } } int num = 0; foreach (KeyValuePair item2 in dictionary) { if (item2.Value > num) { result = item2.Key; num = item2.Value; } } } return result; } internal static MEvent.Scale getScale(string from) { float[] array = ParseValuesFromString(from); return new MEvent.Scale(array[0], array[1], array[2], array[3]); } internal static string GetStringFromScale(MEvent.Scale from) { return from.Base.ToString(en) + ", " + from.Increment.ToString(en) + ", " + from.MinCap.ToString(en) + ", " + from.MaxCap.ToString(en); } internal static float[] ParseValuesFromString(string from) { return (from x in @from.Split(',') select float.Parse(x, en)).ToArray(); } internal static string StringsToList(List strings, string seperator) { string text = ""; foreach (string @string in strings) { text += @string; text += seperator; } if (strings.Count > 0) { text = text.Substring(0, text.Length - seperator.Length); } return text; } internal static List ListToStrings(string text) { if (Utility.IsNullOrWhiteSpace(text)) { return new List(); } text = text.Replace(" ", ""); return text.Split(',').ToList(); } internal static List ListToDescriptions(string text) { if (Utility.IsNullOrWhiteSpace(text)) { return new List { "" }; } return text.Split("|").ToList(); } internal static EventManager.DifficultyTransition[] GetDifficultyTransitionsFromString(string s) { string[] array = s.Split("|"); EventManager.DifficultyTransition[] array2 = new EventManager.DifficultyTransition[array.Length]; for (int i = 0; i < array.Length; i++) { string[] array3 = array[i].Split(","); if (array3.Length != 3) { Log.LogError($"DifficultyTransition config entry is of length:{array3.Length}, must be of length 3, returning a working version of difficultyTransitions."); return new EventManager.DifficultyTransition[2] { new EventManager.DifficultyTransition("Easy", "FFFFFF", 10f), new EventManager.DifficultyTransition("Medium", "000000", 20f) }; } float above = i; try { above = float.Parse(array3[2]); } catch { Log.LogError($"Failed to parse number from difficulty transition, value is going to be {i}."); } array2[i] = new EventManager.DifficultyTransition(array3[0], array3[1], above); } Array.Sort(array2); return array2; } internal static Dictionary GetMoonRiskFromString(string text) { Dictionary dictionary = new Dictionary(); string[] array = text.Split("|"); for (int i = 0; i < array.Length; i++) { string[] array2 = array[i].Split(","); float value = 0f; try { value = float.Parse(array2[1]); } catch { Log.LogError("Moon Risk Difficulty Entry contains a value that isn't a number, value will be 0, attempted input " + array2[1] + "."); } if (!dictionary.TryAdd(array2[0], value)) { Log.LogError("Entry " + array2[0] + " already exists in the dicitionary."); } } return dictionary; } internal static IList ComputeConvexHull(List points, bool sortInPlace = false) { //IL_0054: Unknown result type (might be due to invalid IL or missing references) //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_006f: 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_0075: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: 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_008e: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: 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_00d6: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: 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_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: 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) if (!sortInPlace) { points = new List(points); } points.Sort((Vector2 a, Vector2 b) => (a.x == b.x) ? a.y.CompareTo(b.y) : ((a.x > b.x) ? 1 : (-1))); CircularList circularList = new CircularList(); int num = 0; int num2 = 0; for (int num3 = points.Count - 1; num3 >= 0; num3--) { Vector2 val = points[num3]; Vector2 last; while (num >= 2 && (last = circularList.Last).Sub(circularList[circularList.Count - 2]).Cross(val.Sub(last)) >= 0f) { circularList.PopLast(); num--; } circularList.PushLast(val); num++; while (num2 >= 2 && (last = circularList.First).Sub(circularList[1]).Cross(val.Sub(last)) <= 0f) { circularList.PopFirst(); num2--; } if (num2 != 0) { circularList.PushFirst(val); } num2++; } circularList.PopLast(); return circularList; } internal static SpawnableItemWithRarity? GetChosenScrap(Func scrapSelector) { List list = RoundManager.Instance.currentLevel.spawnableScrap.Where(scrapSelector).ToList(); int num = list.Sum((SpawnableItemWithRarity i) => i.rarity); int num2 = Random.Range(0, num); int num3 = 0; foreach (SpawnableItemWithRarity item in list) { num3 += item.rarity; if (num3 > num2) { return item; } } Log.LogError("Get chosen scrap could not find a random scrap to choose. Transmute events will not work."); return null; } private static Vector2 Sub(this Vector2 a, Vector2 b) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) return a - b; } private static float Cross(this Vector2 a, Vector2 b) { //IL_0001: 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_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) return a.x * b.y - a.y * b.x; } } 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); } } [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInDependency(/*Could not decode attribute arguments.*/)] [BepInPlugin("MINE9289.BrutalCompanyMinusExtraRebornKR", "BrutalCompanyMinusExtraRebornKR", "0.2.0")] internal class Plugin : BaseUnityPlugin { private const string GUID = "MINE9289.BrutalCompanyMinusExtraRebornKR"; private const string NAME = "BrutalCompanyMinusExtraRebornKR"; private const string VERSION = "0.2.0"; private static readonly Harmony harmony = new Harmony("MINE9289.BrutalCompanyMinusExtraRebornKR"); internal static Plugin Instance { get; private set; } private void Awake() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Expected O, but got Unknown //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Expected O, but got Unknown //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a5: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Expected O, but got Unknown //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: Expected O, but got Unknown //IL_00e9: Unknown result type (might be due to invalid IL or missing references) //IL_00f3: Expected O, but got Unknown //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_010d: Expected O, but got Unknown //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0127: Expected O, but got Unknown if ((Object)(object)Instance == (Object)null) { Instance = this; } Log.Initalize(((BaseUnityPlugin)this).Logger); Configuration.uiConfig = new ConfigFile(Paths.ConfigPath + "\\BrutalCompanyMinusExtraReborn\\UI_Settings.cfg", true); Configuration.difficultyConfig = new ConfigFile(Paths.ConfigPath + "\\BrutalCompanyMinusExtraReborn\\Difficulty_Settings.cfg", true); Configuration.eventConfig = new ConfigFile(Paths.ConfigPath + "\\BrutalCompanyMinusExtraReborn\\VanillaEvents.cfg", true); Configuration.weatherConfig = new ConfigFile(Paths.ConfigPath + "\\BrutalCompanyMinusExtraReborn\\Weather_Settings.cfg", true); Configuration.customAssetsConfig = new ConfigFile(Paths.ConfigPath + "\\BrutalCompanyMinusExtraReborn\\Enemy_Scrap_Weights_Settings.cfg", true); Configuration.moddedEventConfig = new ConfigFile(Paths.ConfigPath + "\\BrutalCompanyMinusExtraReborn\\ModdedEvents.cfg", true); Configuration.customEventConfig = new ConfigFile(Paths.ConfigPath + "\\BrutalCompanyMinusExtraReborn\\CustomEvents.cfg", true); Configuration.allEnemiesConfig = new ConfigFile(Paths.ConfigPath + "\\BrutalCompanyMinusExtraReborn\\AllEnemies.cfg", true); Configuration.levelPropertiesConfig = new ConfigFile(Paths.ConfigPath + "\\BrutalCompanyMinusExtraReborn\\LevelProperties.cfg", true); Configuration.CorePropertiesConfig = new ConfigFile(Paths.ConfigPath + "\\BrutalCompanyMinusExtraReborn\\CoreProperties.cfg", true); Configuration.uiConfig.SaveOnConfigSet = false; Configuration.difficultyConfig.SaveOnConfigSet = false; Configuration.eventConfig.SaveOnConfigSet = false; Configuration.weatherConfig.SaveOnConfigSet = false; Configuration.customAssetsConfig.SaveOnConfigSet = false; Configuration.moddedEventConfig.SaveOnConfigSet = false; Configuration.customEventConfig.SaveOnConfigSet = false; Configuration.allEnemiesConfig.SaveOnConfigSet = false; Configuration.levelPropertiesConfig.SaveOnConfigSet = false; Configuration.CorePropertiesConfig.SaveOnConfigSet = false; Assets.Load(); harmony.PatchAll(); harmony.PatchAll(typeof(GrabObjectTranspiler)); if (Compatibility.IsModPresent("FlipMods.HotbarPlus")) { HotBarPlusCompat.PatchAll(harmony); } if (Compatibility.IsModPresent("LethalPhones")) { PhonesOutPatching.PatchAllPhone(harmony); } if (Compatibility.IsModPresent("Scandal.CruiserXL")) { ScanVanPatching.PatchAllCruiserXL(harmony); } if (!Compatibility.IsModPresent("AudioKnight.StarlancerAIFix")) { _EnemyAI.PatchEnemyStart(harmony); } Log.LogInfo("BrutalCompanyMinusExtraRebornKR 0.2.0 is done patching."); if (Assets.ReadSettingEarly(Paths.ConfigPath + "\\BrutalCompanyMinusExtraReborn\\DifficultySettings.cfg", "Enable time scaling?")) { } Log.LogInfo("Time adjustment is enabled."); try { File.Delete(Paths.ConfigPath + "\\BrutalCompanyMinusExtraReborn\\CustomEvents.cfg"); File.Create(Paths.ConfigPath + "\\BrutalCompanyMinusExtraReborn\\CustomEvents.cfg").Dispose(); } catch (Exception ex) { Log.LogWarning("Failed to delete custom event config file: " + ex.Message); } Init(); } private void Init() { NetworkVariableSerializationTypes.InitializeSerializer_UnmanagedByMemcpy(); NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedIEquatable(); NetworkVariableSerializationTypes.InitializeSerializer_UnmanagedByMemcpy(); NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedIEquatable(); NetworkVariableSerializationTypes.InitializeSerializer_UnmanagedByMemcpy(); NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedIEquatable(); NetworkVariableSerializationTypes.InitializeSerializer_UnmanagedByMemcpy(); NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedIEquatable(); NetworkVariableSerializationTypes.InitializeSerializer_UnmanagedByMemcpy(); NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedIEquatable(); NetworkVariableSerializationTypes.InitializeSerializer_UnmanagedByMemcpy(); NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedIEquatable(); NetworkVariableSerializationTypes.InitializeSerializer_UnmanagedByMemcpy(); NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedIEquatable(); NetworkVariableSerializationTypes.InitializeSerializer_UnmanagedByMemcpy(); NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedIEquatable(); NetworkVariableSerializationTypes.InitializeSerializer_UnmanagedByMemcpy(); NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedIEquatable(); NetworkVariableSerializationTypes.InitializeSerializer_UnmanagedByMemcpy(); NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedIEquatable(); } } public static class MyPluginInfo { public const string PLUGIN_GUID = "BrutalCompanyMinus"; public const string PLUGIN_NAME = "BrutalCompanyMinusExtraReborn"; public const string PLUGIN_VERSION = "1.0.0"; } } namespace BrutalCompanyMinus.Minus { public class API { public static void RegenerateEvents() { try { SelectableLevel newLevel = Manager.currentLevel; EventManager.FixHazardsOnLeave(); EventManager.ModifyLevel(ref newLevel); } catch (Exception arg) { Log.LogError($"Error occurred with GenerateBrutalEvents: {arg}"); } } public static void ForceEvents(string[] eventNames) { try { EventManager.forcedEvents.AddRange(EventManager.GetEventsByName(eventNames)); } catch (Exception arg) { Log.LogError($"Error occurred while forcing event(s) {eventNames}: {arg}"); } } public static bool DoesEventExist(string name) { string name2 = name; try { bool flag = EventManager.events.Any((MEvent x) => string.Equals(x.Name(), name2, StringComparison.OrdinalIgnoreCase)); if (!flag) { Log.LogWarning("The event with the name '" + name2 + "' does not exist."); } return flag; } catch (Exception arg) { Log.LogError($"Error occurred while checking if event {name2} exists: {arg}"); return false; } } public static float GetDifficulty() { try { return Manager.difficulty; } catch (Exception arg) { Log.LogError($"Error occurred while getting current difficulty: {arg}"); return 0f; } } public static float GetDaysDifficulty() { try { return Mathf.Clamp((float)Manager.daysPassed * Configuration.daysPassedDifficultyMultiplier.Value, 0f, Configuration.daysPassedDifficultyCap.Value); } catch (Exception arg) { Log.LogError($"Error occurred while getting current days difficulty: {arg}"); return 0f; } } public static float GetScrapDifficulty() { try { return Mathf.Clamp(Manager.GetScrapInShip() * Configuration.scrapInShipDifficultyMultiplier.Value, 0f, Configuration.scrapInShipDifficultyCap.Value); } catch (Exception arg) { Log.LogError($"Error occurred while getting current scrap difficulty: {arg}"); return 0f; } } public static float GetMoonDifficulty() { try { if (Configuration.gradeAdditives.TryGetValue(StartOfRound.Instance.currentLevel.riskLevel, out var value)) { return value; } return 0f; } catch (Exception arg) { Log.LogError($"Error occurred while getting current moon difficulty: {arg}"); return 0f; } } public static float GetWeatherDifficulty() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) try { return Configuration.weatherAdditives.GetValueOrDefault(StartOfRound.Instance.currentLevel.currentWeather, 0f); } catch (Exception arg) { Log.LogError($"Error occurred while getting current weather difficulty: {arg}"); return 0f; } } public static float GetQuotaDifficulty() { try { return Mathf.Clamp((float)TimeOfDay.Instance.profitQuota * Configuration.quotaDifficultyMultiplier.Value, 0f, Configuration.quotaDifficultyCap.Value); } catch (Exception arg) { Log.LogError($"Error occurred while getting current quota difficulty: {arg}"); return 0f; } } public static float GetHeatDifficulty(int levelID = -1) { try { if (levelID == -1) { levelID = RoundManager.Instance.currentLevel.levelID; } float value; return Manager.heatDifficulty.TryGetValue(levelID, out value) ? value : Configuration.startingHeat.Value; } catch (Exception arg) { Log.LogError($"Error occurred while getting current heat difficulty: {arg}"); return 0f; } } public static MEvent GetEventsByName(string names) { string names2 = names; return EventManager.events.FirstOrDefault((MEvent x) => string.Equals(x.Name(), names2, StringComparison.OrdinalIgnoreCase)); } public static List GetEventDescriptions(MEvent e) { try { return e.Descriptions; } catch (Exception ex) { Log.LogError("Error while getting event descriptions for " + e?.Name() + ": " + ex.Message); return new List(); } } public static List GetEventDescriptions(string thisEvent) { try { return GetEventsByName(thisEvent)?.Descriptions ?? new List(); } catch (Exception ex) { Log.LogError("Error while getting event descriptions for " + thisEvent + ": " + ex.Message); return new List(); } } public static string GetEventColorHex(MEvent e) { try { return e.ColorHex; } catch (Exception ex) { Log.LogError("Error while getting event color hex for " + e?.Name() + ": " + ex.Message); return ""; } } public static string GetEventColorHex(string thisEvent) { try { MEvent eventsByName = GetEventsByName(thisEvent); return eventsByName.ColorHex; } catch (Exception ex) { Log.LogError("Error while getting event color hex for " + thisEvent + ": " + ex.Message); return ""; } } public static int GetEventWeight(MEvent e) { try { return e.Weight; } catch (Exception ex) { Log.LogError("Error while getting event weight for " + e?.Name() + ": " + ex.Message); return 0; } } public static int GetEventWeight(string thisEvent) { try { MEvent eventsByName = GetEventsByName(thisEvent); return eventsByName.Weight; } catch (Exception ex) { Log.LogError("Error while getting event weight for " + thisEvent + ": " + ex.Message); return 0; } } public static string GetEventType(MEvent e) { try { return e.Type.ToString(); } catch (Exception ex) { Log.LogError("Error while getting event type for " + e?.Name() + ": " + ex.Message); return ""; } } public static string GetEventType(string thisEvent) { try { MEvent eventsByName = GetEventsByName(thisEvent); return eventsByName.Type.ToString(); } catch (Exception ex) { Log.LogError("Error while getting event type for " + thisEvent + ": " + ex.Message); return ""; } } public static bool IsEventEnabled(MEvent e) { try { return e.Enabled; } catch (Exception ex) { Log.LogError("Error while getting event enabled status for " + e?.Name() + ": " + ex.Message); return false; } } public static bool IsEventEnabled(string thisEvent) { try { MEvent eventsByName = GetEventsByName(thisEvent); return eventsByName.Enabled; } catch (Exception ex) { Log.LogError("Error while getting event enabled status for " + thisEvent + ": " + ex.Message); return false; } } public static bool IsEventSpecial(MEvent e) { try { return e.isSpecialEvent; } catch (Exception ex) { Log.LogError("Error while getting event special status for " + e?.Name() + ": " + ex.Message); return false; } } public static bool IsEventSpecial(string thisEvent) { try { MEvent eventsByName = GetEventsByName(thisEvent); return eventsByName.isSpecialEvent; } catch (Exception ex) { Log.LogError("Error while getting event special status for " + thisEvent + ": " + ex.Message); return false; } } public static bool IsEventBeta(MEvent e) { try { return e.isBetaEvent; } catch (Exception ex) { Log.LogError("Error while getting event beta status for " + e?.Name() + ": " + ex.Message); return false; } } public static bool IsEventBeta(string thisEvent) { try { MEvent eventsByName = GetEventsByName(thisEvent); return eventsByName.isBetaEvent; } catch (Exception ex) { Log.LogError("Error while getting event beta status for " + thisEvent + ": " + ex.Message); return false; } } public static bool IsEventActive(MEvent e) { try { return e.Active; } catch (Exception ex) { Log.LogError("Error while getting event active status for " + e?.Name() + ": " + ex.Message); return false; } } public static bool IsEventActive(string thisEvent) { try { MEvent eventsByName = GetEventsByName(thisEvent); return eventsByName.Active; } catch (Exception ex) { Log.LogError("Error while getting event active status for " + thisEvent + ": " + ex.Message); return false; } } public static bool IsEventExecuted(MEvent e) { try { return e.Executed; } catch (Exception ex) { Log.LogError("Error while getting event executed status for " + e?.Name() + ": " + ex.Message); return false; } } public static bool IsEventExecuted(string thisEvent) { try { MEvent eventsByName = GetEventsByName(thisEvent); return eventsByName.Executed; } catch (Exception ex) { Log.LogError("Error while getting event executed status for " + thisEvent + ": " + ex.Message); return false; } } public static List GetEventsToRemove(MEvent e) { try { return e.EventsToRemove; } catch (Exception ex) { Log.LogError("Error while getting events to remove for " + e?.Name() + ": " + ex.Message); return new List(); } } public static List GetEventsToRemove(string thisEvent) { try { return GetEventsByName(thisEvent)?.EventsToRemove ?? new List(); } catch (Exception ex) { Log.LogError("Error while getting events to remove for " + thisEvent + ": " + ex.Message); return new List(); } } public static List GetEventsToAdd(MEvent e) { try { return e.EventsToSpawnWith; } catch (Exception ex) { Log.LogError("Error while getting events to remove for " + e?.Name() + ": " + ex.Message); return new List(); } } public static List GetEventsToAdd(string thisEvent) { try { return GetEventsByName(thisEvent)?.EventsToSpawnWith ?? new List(); } catch (Exception ex) { Log.LogError("Error while getting events to remove for " + thisEvent + ": " + ex.Message); return new List(); } } public static bool IsEventSpeedRunSafe(MEvent e) { try { return e.SpeedRunSafe; } catch (Exception ex) { Log.LogError("Error while getting event speedrun safe status for " + e?.Name() + ": " + ex.Message); return false; } } public static bool IsEventSpeedRunSafe(string thisEvent) { try { MEvent eventsByName = GetEventsByName(thisEvent); return eventsByName.SpeedRunSafe; } catch (Exception ex) { Log.LogError("Error while getting event speedrun safe status for " + thisEvent + ": " + ex.Message); return false; } } public static List GetEventAliases(MEvent e) { try { return e.Aliases; } catch (Exception ex) { Log.LogError("Error while getting event aliases for " + e?.Name() + ": " + ex.Message); return new List(); } } public static List GetEventAliases(string thisEvent) { try { return GetEventsByName(thisEvent)?.Aliases ?? new List(); } catch (Exception ex) { Log.LogError("Error while getting event aliases for " + thisEvent + ": " + ex.Message); return new List(); } } public static bool isEventOnWhitelist(MEvent e) { try { return EventManager.IsEventOnMoonWhitelist(e); } catch (Exception ex) { Log.LogError("Error while checking if event is on whitelist for " + e?.Name() + ": " + ex.Message); return false; } } public static bool isEventOnWhitelist(string thisEvent) { try { MEvent eventsByName = GetEventsByName(thisEvent); return EventManager.IsEventOnMoonWhitelist(eventsByName); } catch (Exception ex) { Log.LogError("Error while checking if event is on whitelist for " + thisEvent + ": " + ex.Message); return false; } } public static bool isEventOnBlacklist(MEvent e) { try { return EventManager.IsIgnoredEventByMoonBlacklist(e); } catch (Exception ex) { Log.LogError("Error while checking if event is on blacklist for " + e?.Name() + ": " + ex.Message); return false; } } public static bool IsEventOnBlacklist(string thisEvent) { try { MEvent eventsByName = GetEventsByName(thisEvent); return EventManager.IsIgnoredEventByMoonBlacklist(eventsByName); } catch (Exception ex) { Log.LogError("Error while checking if event is on blacklist for " + thisEvent + ": " + ex.Message); return false; } } } [HarmonyPatch] public class EventManager { public struct DifficultyTransition : IComparable { internal const uint byteMask = 255u; public string name; public string hex; public float above; public uint[] rgb; public DifficultyTransition(string name, string hex, float above) { this.name = name; this.hex = hex; this.above = above; rgb = new uint[3]; uint num = 0u; try { num = uint.Parse(hex, NumberStyles.HexNumber); } catch { Log.LogError("Failed to parse hex."); } rgb[0] = (num >> 16) & 0xFFu; rgb[1] = (num >> 8) & 0xFFu; rgb[2] = num & 0xFFu; } public string GetTransitionHex(DifficultyTransition next) { float at = Mathf.Clamp((next.above - Manager.difficulty) / (next.above - above), 0f, 1f); uint num = InBetween(rgb[0], next.rgb[0], at); uint num2 = InBetween(rgb[1], next.rgb[1], at); uint num3 = InBetween(rgb[2], next.rgb[2], at); return num.ToString("X2") + num2.ToString("X2") + num3.ToString("X2"); } private uint InBetween(uint min, uint max, float at) { return (uint)Mathf.Clamp(at * (float)(max - min) + (float)min, 0f, 255f); } public int CompareTo(DifficultyTransition other) { return above.CompareTo(other.above); } } internal class CustomEvents { public ConfigFile configFile; public List events; public CustomEvents(ConfigFile configFile, List events) { this.configFile = configFile; this.events = events; } } [CompilerGenerated] private sealed class d__39 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public List events; private List.Enumerator <>s__1; private MEvent 5__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__39(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { int num = <>1__state; if (num == -3 || num == 2) { try { } finally { <>m__Finally1(); } } <>s__1 = default(List.Enumerator); 5__2 = null; <>1__state = -2; } private bool MoveNext() { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Expected O, but got Unknown //IL_0149: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Expected O, but got Unknown try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(Mathf.Abs(Configuration.InitTimePopUp.Value)); <>1__state = 1; return true; case 1: <>1__state = -1; <>s__1 = events.GetEnumerator(); <>1__state = -3; goto IL_016f; case 2: { <>1__state = -3; goto IL_0167; } IL_016f: if (<>s__1.MoveNext()) { 5__2 = <>s__1.Current; if (5__2.showTip && 5__2.TipMessages.Count > 0 && 5__2.TipTitle.Count > 0) { HUDManager.Instance.DisplayTip(5__2.TipTitle[Random.Range(0, 5__2.TipTitle.Count)], 5__2.TipMessages[Random.Range(0, 5__2.TipMessages.Count)], 5__2.isWarning, false, "LC_Tip1"); <>2__current = (object)new WaitForSeconds(Mathf.Abs(Configuration.timeBetweenTips.Value)); <>1__state = 2; return true; } goto IL_0167; } <>m__Finally1(); <>s__1 = default(List.Enumerator); tipEventsToDo.Clear(); return false; IL_0167: 5__2 = null; goto IL_016f; } } catch { //try-fault ((IDisposable)this).Dispose(); throw; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } private void <>m__Finally1() { <>1__state = -1; ((IDisposable)<>s__1).Dispose(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } internal static List vanillaEvents = new List { new SID(), new BigBonus(), new ScrapGalore(), new GoldenBars(), new BigDelivery(), new PlentyOutsideScrap(), new BlackFriday(), new BrutalCompanyMinus.Minus.Events.SafeOutside(), new VeryEarlyShip(), new TrapsFailure(), new BrutalCompanyMinus.Minus.Events.Bounty(), new Bonus(), new SmallerMap(), new MoreScrap(), new HigherScrapValue(), new GoldenFacility(), new Dentures(), new Pickles(), new Honk(), new TransmuteScrapSmall(), new SmallDelivery(), new ScarceOutsideScrap(), new FragileEnemies(), new BrutalCompanyMinus.Minus.Events.FullAccess(), new EarlyShip(), new MoreExits(), new DoorOverdriveEv(), new ZedDog(), new NotMetal(), new Nothing(), new MetalSwitch(), new Locusts(), new Birds(), new Trees(), new LeaflessBrownTrees(), new LeaflessTrees(), new Raining(), new Gloomy(), new HeavyRain(), new MaskItem(), new EasterEggs(), new Clock(), new SussyPaintings(), new Train(), new ControlPad(), new PlasticCup(), new ToiletPaper(), new FootballScrap(), new GarbageLid(), new SeveredBits(), new HoardingBugs(), new Dustpans(), new Bees(), new ShipLightsFailure(), new Landmines(), new Lizard(), new Slimes(), new Thumpers(), new Turrets(), new Spiders(), new SnareFleas(), new BrutalCompanyMinus.Minus.Events.FacilityGhost(), new OutsideTurrets(), new OutsideLandmines(), new BrutalCompanyMinus.Minus.Events.ShipmentFees(), new GrabbableLandmines(), new GrabbableTurrets(), new StrongEnemies(), new KamikazieBugs(), new BrutalCompanyMinus.Minus.Events.RealityShift(), new Masked(), new Butlers(), new SpikeTraps(), new FlowerSnake(), new LateShip(), new HolidaySeason(), new TurretsEverywhere(), new ItemChargerFailure(), new CruiserFailure(), new TeleporterFailure(), new TerminalFailure(), new DoorFailure(), new WalkieFailure(), new ManualCameraFailure(), new LeverFailure(), new WelcomeToTheFactory(), new TargetingFailureEvent(), new FlashLightsFailure(), new JetpackFailure(), new DoorCircuitFailure(), new Meteors(), new BrutalCompanyMinus.Minus.Events.AntiBounty(), new TargetingFailureEvent(), new TeleporterTraps(), new IsMetal(), new Stingray(), new Puma(), new KidnapperFox(), new Cadaver(), new CatsAndDogs(), new Nutcracker(), new KiwiBird(), new LockedEntrance(), new Arachnophobia(), new Bracken(), new Coilhead(), new BaboonHorde(), new Dogs(), new VeryLateShip(), new TeleportIn(), new GiantsOutside(), new Jester(), new LittleGirl(), new AntiCoilhead(), new BadProduce(), new TransmuteScrapBig(), new Warzone(), new BugHorde(), new ForestGiant(), new InsideBees(), new NutSlayer(), new BrutalCompanyMinus.Minus.Events.AllWeather(), new Worms(), new OldBirds(), new ShipCoreFailure(), new Dweller(), new BrutalCompanyMinus.Minus.Events.BerserkTurrets(), new BrutalCompanyMinus.Minus.Events.Hell(), new TimeChaos(), new NutSlayersMore(), new LockedDoors(), new NoBaboons(), new NoBracken(), new NoCoilhead(), new NoDogs(), new NoGiants(), new NoHoardingBugs(), new NoJester(), new NoGhosts(), new NoLizards(), new NoNutcracker(), new NoSpiders(), new NoThumpers(), new NoSnareFleas(), new NoWorm(), new NoSlimes(), new NoMasks(), new NoTurrets(), new NoLandmines(), new NoOldBird(), new NoButlers(), new NoBirds(), new NoSpikeTraps() }; public static List moddedEvents = new List { new CityOfGold(), new Dice(), new Nemo(), new HotBarMania(), new NeedyCats(), new Lockers(), new Hallowed(), new TakeyGokuBracken(), new Cleaners(), new ImmortalSnail(), new Peepers(), new RollingGiants(), new Roomba(), new ShockwaveDrones(), new Shrimp(), new Football(), new Baldi(), new Shiba(), new Seamine(), new Bertha(), new YeetBomb(), new ManStalker(), new Foxy(), new HotBarHassle(), new Bellcrab(), new LightEaterEnemy(), new LeafBoys(), new WelcomeToOoblterra(), new PhonesOut(), new Barbers(), new SCP939(), new SCP682(), new SolarFlare(), new Heatwave(), new Windy(), new MeteorShower(), new Forsaken(), new MobileTurrets(), new Mantitoil(), new ToilSlayer(), new MantiToilSlayer(), new AllSlayers(), new BadDice(), new Herobrine(), new ShyGuy(), new SirenHead(), new SlenderMan(), new TheFiend(), new ToilHead(), new Walkers(), new GiantShowdown(), new MoaiEnemy(), new Meltdown(), new SkullEnemy(), new Critters(), new PlaytimeBig(), new ItsPlaytime(), new Walkers(), new SoulDev(), new MajoraMoon(), new BloodMoon(), new Hurricane(), new NoMantitoil(), new NoToilSlayer(), new NoMantiToilSlayer(), new NoSlayers(), new NoFiend(), new NoImmortalSnails(), new NoLockers(), new NoShyGuy(), new NoPeepers() }; internal static List customEvents = new List(); internal static List events = new List(); internal static List disabledEvents = new List(); internal static List currentEvents = new List(); internal static List forcedEvents = new List(); internal static List allVeryGood = new List(); internal static List allGood = new List(); internal static List allNeutral = new List(); internal static List allBad = new List(); internal static List allVeryBad = new List(); internal static List allRemove = new List(); internal static List allInsane = new List(); internal static List allRare = new List(); internal static List allSpecial = new List(); internal static List allBeta = new List(); internal static List sideEvents = new List(); private static List tipEventsToDo = new List(); internal static List currentEventDescriptions = new List(); internal static float eventTypeSum = 0f; internal static float[] eventTypeCount = new float[0]; internal static float[] eventTypeRarities = new float[0]; public static List hazards = new List(); internal static MEvent RandomWeightedEvent(List _events, Random rng) { if (_events.Count == 0) { return new Nothing(); } int num = 0; foreach (MEvent _event in _events) { num += _event.Weight; } foreach (MEvent _event2 in _events) { if (rng.Next(0, num) < _event2.Weight) { return _event2; } num -= _event2.Weight; } return _events[_events.Count - 1]; } internal static List ChooseEvents(out List additionalEvents) { currentEvents.Clear(); sideEvents.Clear(); List list = new List(); List list2 = new List(); foreach (MEvent @event in events) { list2.Add(@event); } Random random = new Random(StartOfRound.Instance.randomMapSeed + 32345 + Environment.TickCount); int num = (int)MEvent.Scale.Compute(Configuration.eventsToSpawn) + RoundManager.Instance.GetRandomWeightedIndex(Configuration.weightsForExtraEvents.IntArray(), random); if (Configuration.scaleHeat.Value) { float num2 = currentHeatDifficulty(); if (num2 == Configuration.heatMaxCap.Value && Configuration.heatForceEventAtMax.Value) { Log.LogInfo("Current heat has hit max cap, now forcing events"); Log.LogInfo("Attempting to force events: " + Configuration.heatEventsToForce.Value); string[] names = (from s in Configuration.heatEventsToForce.Value.Split(new char[1] { ',' }, StringSplitOptions.RemoveEmptyEntries) select s.Trim()).ToArray(); forcedEvents.AddRange(GetEventsByName(names)); } } foreach (MEvent forcedEvent in forcedEvents) { list2.RemoveAll((MEvent x) => x.Name() == forcedEvent.Name()); foreach (string item in forcedEvent.EventsToRemove) { list2.RemoveAll((MEvent x) => x.Name() == forcedEvent.Name()); } } int num3; for (num3 = 0; num3 < num; num3++) { MEvent newEvent = RandomWeightedEvent(list2, random); if (!newEvent.AddEventIfOnly()) { num3--; list2.RemoveAll((MEvent x) => x.Name() == newEvent.Name()); } else { bool flag = (newEvent.MoonMode ? IsEventOnMoonWhitelist(newEvent) : (!IsIgnoredEventByMoonBlacklist(newEvent))); Log.LogInfo("Checking " + (newEvent.MoonMode ? "whitelist" : "blacklist") + " for event " + newEvent.Name()); if (!flag) { Log.LogInfo("Event " + newEvent.Name() + " is " + (newEvent.MoonMode ? "not whitelisted" : "blacklisted") + " on moon " + Manager.currentLevel.PlanetName + ", skipping."); } if (flag && (newEvent.isSpecialEvent || newEvent.isBetaEvent)) { bool flag2 = newEvent.isSpecialEvent && !Configuration.enableSpecialEvents.Value; bool flag3 = newEvent.isBetaEvent && !Configuration.enableBetaEvents.Value; flag = ((!(flag2 || flag3)) ? true : false); } if (!flag) { num3--; list2.RemoveAll((MEvent x) => x.Name() == newEvent.Name()); } else if (flag) { list.Add(newEvent); list2.RemoveAll((MEvent x) => x.Name() == newEvent.Name()); int num4 = 0; foreach (string eventToRemove in newEvent.EventsToRemove) { list2.RemoveAll((MEvent x) => x.Name() == eventToRemove); num4 += list.RemoveAll((MEvent x) => x.Name() == eventToRemove); } foreach (string eventToSpawnWith2 in newEvent.EventsToSpawnWith) { list2.RemoveAll((MEvent x) => x.Name() == eventToSpawnWith2); num4 += list.RemoveAll((MEvent x) => x.Name() == eventToSpawnWith2); } num3 -= num4; } else { num3--; } } } List list3 = new List(); for (int i = 0; i < list.Count; i++) { foreach (string eventToSpawnWith in list[i].EventsToSpawnWith) { int num5 = list3.FindIndex((MEvent x) => x.Name() == eventToSpawnWith); if (num5 == -1) { list3.Add(MEvent.GetEvent(eventToSpawnWith)); } num5 = sideEvents.FindIndex((MEvent x) => x.Name() == eventToSpawnWith); if (num5 == -1) { sideEvents.Add(MEvent.GetEvent(eventToSpawnWith)); } } } foreach (MEvent e in disabledEvents) { int num6 = list3.FindIndex((MEvent x) => x.Name() == e.Name()); if (num6 != -1) { list3.RemoveAt(num6); } } additionalEvents = list3; currentEvents = list; return list; } internal static void ApplyEvents(List currentEvents) { foreach (MEvent currentEvent in currentEvents) { if (!currentEvent.Executed) { currentEvent.Executed = true; currentEvent.Execute(); } } } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "ShipLeave")] public static void FixHazardsOnLeave() { if (((NetworkBehaviour)RoundManager.Instance).IsHost && RoundManager.Instance?.currentLevel?.indoorMapHazards != null) { List list = RoundManager.Instance.currentLevel.indoorMapHazards.ToList(); list.RemoveAll((IndoorMapHazard hazard) => hazards.Contains(hazard)); RoundManager.Instance.currentLevel.indoorMapHazards = list.ToArray(); hazards.Clear(); } } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "OnLocalDisconnect")] public static void FixHazardsOnLeaveLocalDisconnect() { FixHazardsOnLeave(); } internal static void ExecuteOnShipLeave() { Log.LogInfo("Executing OnShipLeave for all events()"); foreach (MEvent @event in events) { @event.OnShipLeave(); } foreach (MEvent vanillaEvent in vanillaEvents) { vanillaEvent.OnShipLeave(); } foreach (MEvent moddedEvent in moddedEvents) { moddedEvent.OnShipLeave(); } foreach (MEvent customEvent in customEvents) { customEvent.OnShipLeave(); } } internal static void ExecuteOnGameStart() { Log.LogInfo("Executing OnGameStart for all events()"); if (currentEvents != null) { currentEvents.Clear(); } if (sideEvents != null) { sideEvents.Clear(); } foreach (MEvent @event in events) { @event.OnGameStart(); } foreach (MEvent vanillaEvent in vanillaEvents) { vanillaEvent.OnGameStart(); } foreach (MEvent moddedEvent in moddedEvents) { moddedEvent.OnGameStart(); } foreach (MEvent customEvent in customEvents) { customEvent.OnGameStart(); } } internal static void ExecuteOnLocalDisconnect() { Log.LogInfo("Executing OnLocalDisconnect for all events()"); foreach (MEvent @event in events) { @event.OnLocalDisconnect(); } foreach (MEvent vanillaEvent in vanillaEvents) { vanillaEvent.OnLocalDisconnect(); } foreach (MEvent moddedEvent in moddedEvents) { moddedEvent.OnLocalDisconnect(); } } internal static void UpdateAllEventWeights() { if (Configuration.useCustomWeights.Value) { return; } int num = Configuration.eventTypeScales.Length; float[] array = new float[num]; for (int i = 0; i < num; i++) { array[i] = MEvent.Scale.Compute(Configuration.eventTypeScales[i]); } float num2 = 0f; for (int j = 0; j < num; j++) { num2 += array[j]; } num2 = fix(num2); float[] array2 = new float[num]; for (int k = 0; k < num; k++) { array2[k] = array[k] / num2; } eventTypeRarities = array2; int[] array3 = new int[num]; for (int l = 0; l < num; l++) { array3[l] = (int)(eventTypeSum / fix(eventTypeCount[l]) * array2[l] * 1000f); Log.LogInfo($"Set eventType weight for {((MEvent.EventType)Enum.ToObject(typeof(MEvent.EventType), l)).ToString()} to {array3[l]}"); } foreach (MEvent @event in events) { @event.Weight = array3[(int)@event.Type]; } static float fix(float value) { if (value < 1f) { return 1f; } return value; } } internal static void UpdateEventTypeCounts() { int num = Configuration.eventTypeScales.Length; eventTypeCount = new float[num]; for (int i = 0; i < num; i++) { eventTypeCount[i] = 0f; } foreach (MEvent @event in events) { eventTypeCount[(int)@event.Type] += 1f; } eventTypeSum = 0f; for (int j = 0; j < num; j++) { eventTypeSum += eventTypeCount[j]; } } internal static void UpdateEventDescriptions(List events) { if (!Configuration.displayEvents.Value) { return; } currentEventDescriptions.Clear(); foreach (MEvent @event in events) { currentEventDescriptions.Add("" + @event.Descriptions[Random.Range(0, @event.Descriptions.Count)] + ""); } } [HarmonyPrefix] [HarmonyPatch(typeof(RoundManager), "LoadNewLevel")] public static void ModifyLevel(ref SelectableLevel newLevel) { //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_0b10: Unknown result type (might be due to invalid IL or missing references) //IL_0b15: Unknown result type (might be due to invalid IL or missing references) //IL_0b70: Unknown result type (might be due to invalid IL or missing references) //IL_0b75: Unknown result type (might be due to invalid IL or missing references) //IL_0bd0: Unknown result type (might be due to invalid IL or missing references) //IL_0bd5: Unknown result type (might be due to invalid IL or missing references) ExecuteOnShipLeave(); UI.canClearText = false; Manager.ComputeDifficultyValues(); Manager.currentLevel = newLevel; Manager.currentTerminal = Object.FindObjectOfType(); Assets.generateOriginalValuesLists(); Net.Instance.ClearGameObjectsServerRpc(); if (!((NetworkBehaviour)RoundManager.Instance).IsHost || newLevel.levelID == 3) { return; } LevelModifications.ResetValues(StartOfRound.Instance); foreach (Weather currentWeatherMultiplier in Net.Instance.currentWeatherMultipliers) { if (newLevel.currentWeather == currentWeatherMultiplier.weatherType && Configuration.AffectPropertiesOutOfEvents.Value) { Manager.scrapValueMultiplier *= currentWeatherMultiplier.scrapValueMultiplier; Manager.scrapAmountMultiplier *= currentWeatherMultiplier.scrapAmountMultiplier; } } LevelProperties valueOrDefault = Configuration.levelProperties.GetValueOrDefault(newLevel.levelID); if (valueOrDefault != null && Configuration.AffectPropertiesOutOfEvents.Value) { Manager.scrapValueMultiplier *= valueOrDefault.GetScrapValueMultiplier(); Manager.scrapAmountMultiplier *= valueOrDefault.GetScrapAmountMultiplier(); } if (Configuration.scaleHeat.Value) { Manager.levelNameOnLand = RoundManager.Instance.currentLevel.levelID; if (!Manager.heatDifficulty.ContainsKey(Manager.levelNameOnLand)) { Log.LogInfo("Adding an entry to the list with the ID " + Manager.levelNameOnLand + " and heat difficulty " + Configuration.startingHeat.Value); Manager.heatDifficulty.Add(Manager.levelNameOnLand, Configuration.startingHeat.Value); } if (Manager.heatDifficulty != null) { foreach (int item in Manager.heatDifficulty.Keys.ToList()) { if (item != Manager.levelNameOnLand) { Log.LogInfo(item + " is not equal to " + Manager.levelNameOnLand + ". Current heat difficulty was " + Manager.heatDifficulty[item] + ", decrementing by " + Configuration.heatDecrementAmount.Value); Manager.heatDifficulty[item] = Math.Max(Manager.heatDifficulty[item] - Math.Abs(Configuration.heatDecrementAmount.Value), 0f); Log.LogInfo("New decremented heat recieved for " + item + " is " + Manager.heatDifficulty[item]); } } } } if (Configuration.AffectPropertiesOutOfEvents.Value) { Manager.AddEnemyHp((int)MEvent.Scale.Compute(Configuration.enemyBonusHpScaling)); Manager.AddInsideSpawnChance(newLevel, MEvent.Scale.Compute(Configuration.insideSpawnChanceAdditive)); Manager.AddOutsideSpawnChance(newLevel, MEvent.Scale.Compute(Configuration.outsideSpawnChanceAdditive)); Manager.MultiplySpawnChance(newLevel, MEvent.Scale.Compute(Configuration.spawnChanceMultiplierScaling)); Manager.MultiplySpawnCap(MEvent.Scale.Compute(Configuration.spawnCapMultiplier)); Manager.AddInsidePower((int)MEvent.Scale.Compute(Configuration.insideEnemyMaxPowerCountScaling)); Manager.AddOutsidePower((int)MEvent.Scale.Compute(Configuration.outsideEnemyPowerCountScaling)); Manager.scrapValueMultiplier *= MEvent.Scale.Compute(Configuration.scrapValueMultiplier); Manager.scrapAmountMultiplier *= MEvent.Scale.Compute(Configuration.scrapAmountMultiplier); Manager.factorySizeMultiplier = MEvent.Scale.Compute(Configuration.factorySizeMultiplier); } List additionalEvents = new List(); List list = new List(); if (newLevel.PlanetName != null) { Log.LogInfo("Moon name is " + newLevel.PlanetName); } bool flag = IsIgnoredMoon(newLevel.PlanetName); flag = !DoesEventsRunByChance(); if (Configuration.DisableAllEvents.Value) { Log.LogInfo("All events are disabled. Skipping event activation."); flag = true; } if (!flag) { if (!Configuration.useCustomWeights.Value) { UpdateAllEventWeights(); } list = ChooseEvents(out additionalEvents); foreach (MEvent item2 in list) { Log.LogInfo("Event chosen: " + item2.Name()); Manager.scrapValueMultiplier *= MEvent.Scale.Compute(Configuration.scrapValueByEventTypeScale[item2.Type]); Manager.scrapAmountMultiplier *= MEvent.Scale.Compute(Configuration.scrapAmountByEventTypeScale[item2.Type]); } foreach (MEvent item3 in additionalEvents) { Log.LogInfo("Additional events: " + item3.Name()); } ApplyEvents(list); ApplyEvents(additionalEvents); } foreach (MEvent forcedEvent in forcedEvents) { forcedEvent.Execute(); foreach (string item4 in forcedEvent.EventsToSpawnWith) { MEvent.GetEvent(item4).Execute(); } } list.AddRange(forcedEvents); forcedEvents.Clear(); UpdateEventDescriptions(list); if (Configuration.showEventsInChat.Value && !Configuration.DisplayUIAfterShipLeaves.Value) { HUDManager.Instance.AddTextToChatOnServer("이벤트:", -1); foreach (string currentEventDescription in currentEventDescriptions) { HUDManager.Instance.AddTextToChatOnServer(currentEventDescription, -1); } } if (tipEventsToDo.Count > 0) { tipEventsToDo.Clear(); } tipEventsToDo.AddRange(list); RoundManager.Instance.currentLevel.maxEnemyPowerCount = (int)((float)(RoundManager.Instance.currentLevel.maxEnemyPowerCount + Manager.bonusMaxInsidePowerCount) * Manager.spawncapMultipler); if (Configuration.scaleHeat.Value && (Configuration.heatSettingsToAffect.Value.HasFlag(Configuration.HeatSettingsFlags.InsidePower) || Configuration.heatSettingsToAffect.Value.HasFlag(Configuration.HeatSettingsFlags.All))) { float num = currentHeatDifficulty(); if (num > 0f && Configuration.AffectPropertiesOutOfEvents.Value) { SelectableLevel currentLevel = RoundManager.Instance.currentLevel; currentLevel.maxEnemyPowerCount *= (int)((double)(Configuration.heatMultiplierOtherCalculations.Value * (float)RoundManager.Instance.currentLevel.maxEnemyPowerCount / Configuration.heatDampening.Value) * Math.Pow(1f + Configuration.heatDampening.Value, num) + 1.0); } } RoundManager.Instance.currentLevel.maxOutsideEnemyPowerCount = (int)((float)(RoundManager.Instance.currentLevel.maxOutsideEnemyPowerCount + Manager.bonusMaxOutsidePowerCount) * Manager.spawncapMultipler); if (Configuration.scaleHeat.Value && (Configuration.heatSettingsToAffect.Value.HasFlag(Configuration.HeatSettingsFlags.OutsidePower) || Configuration.heatSettingsToAffect.Value.HasFlag(Configuration.HeatSettingsFlags.All))) { float num2 = currentHeatDifficulty(); if (num2 > 0f && Configuration.AffectPropertiesOutOfEvents.Value) { SelectableLevel currentLevel2 = RoundManager.Instance.currentLevel; currentLevel2.maxOutsideEnemyPowerCount *= (int)((double)(Configuration.heatMultiplierOtherCalculations.Value * (float)RoundManager.Instance.currentLevel.maxOutsideEnemyPowerCount / Configuration.heatDampening.Value) * Math.Pow(1f + Configuration.heatDampening.Value, num2) + 1.0); } } Manager.scrapValueMultiplier = Mathf.Clamp(Manager.scrapValueMultiplier, 0f, Configuration.scrapValueMax.Value); Manager.scrapAmountMultiplier = Mathf.Clamp(Manager.scrapAmountMultiplier, 0f, Configuration.scrapAmountMax.Value); SelectableLevel currentLevel3 = RoundManager.Instance.currentLevel; currentLevel3.factorySizeMultiplier *= Math.Clamp(Math.Abs(Manager.factorySizeMultiplier), Math.Abs(Configuration.FactorySizeMin.Value), Math.Abs(Configuration.FactorySizeMax.Value)); if (Configuration.enableCustomTimeAdjustments.Value) { Net.Instance.MoveTimeServerRpc(Mathf.Min(MEvent.Scale.Compute(Configuration.startingTime), 2.1474836E+09f), Mathf.Clamp(MEvent.Scale.Compute(Configuration.timeScaling), 0.001f, 2.1474836E+09f)); } Net.Instance.SyncValuesClientRpc(Manager.currentLevel.factorySizeMultiplier, Manager.scrapValueMultiplier, Manager.scrapAmountMultiplier, Manager.bonusEnemyHp); if (!Configuration.DisplayUIAfterShipLeaves.Value) { UI.GenerateText(list); } else { UI.ClearText(); } Log.LogInfo("MapMultipliers = [" + $"scrapValueMultiplier: {Manager.scrapValueMultiplier}, " + $"scrapAmountMultiplier: {Manager.scrapAmountMultiplier}, " + $"factorySizeMultiplier: {Manager.factorySizeMultiplier}, " + $"EnemyHp: {(int)MEvent.Scale.Compute(Configuration.enemyBonusHpScaling)}, " + $"insideSpawnChanceAdditive: {MEvent.Scale.Compute(Configuration.insideSpawnChanceAdditive)}, " + $"outsideSpawnChanceAdditive: {MEvent.Scale.Compute(Configuration.outsideSpawnChanceAdditive)}, " + $"SpawnChanceMultiplier: {MEvent.Scale.Compute(Configuration.spawnChanceMultiplierScaling)}, " + $"SpawnCapMultiplier: {MEvent.Scale.Compute(Configuration.spawnCapMultiplier)}, " + $"InsidePower: {(int)MEvent.Scale.Compute(Configuration.insideEnemyMaxPowerCountScaling)}, " + $"OutsidePower: {(int)MEvent.Scale.Compute(Configuration.outsideEnemyPowerCountScaling)}]"); Log.LogInfo("Inside Spawn Curve"); Keyframe[] keys = newLevel.enemySpawnChanceThroughoutDay.keys; for (int i = 0; i < keys.Length; i++) { Keyframe val = keys[i]; Log.LogInfo($"Time:{((Keyframe)(ref val)).time} + $Value:{((Keyframe)(ref val)).value}"); } Log.LogInfo("Outside Spawn Curve"); Keyframe[] keys2 = newLevel.outsideEnemySpawnChanceThroughDay.keys; for (int j = 0; j < keys2.Length; j++) { Keyframe val2 = keys2[j]; Log.LogInfo($"Time:{((Keyframe)(ref val2)).time} + $Value:{((Keyframe)(ref val2)).value}"); } Log.LogInfo("Daytime Spawn Curve"); Keyframe[] keys3 = newLevel.daytimeEnemySpawnChanceThroughDay.keys; for (int k = 0; k < keys3.Length; k++) { Keyframe val3 = keys3[k]; Log.LogInfo($"Time:{((Keyframe)(ref val3)).time} + $Value:{((Keyframe)(ref val3)).value}"); } } [HarmonyPostfix] [HarmonyPatch(typeof(RoundManager), "RefreshEnemiesList")] private static void OnRefreshEnemiesList() { ((MonoBehaviour)HUDManager.Instance).StartCoroutine(EventTips(tipEventsToDo)); } [IteratorStateMachine(typeof(d__39))] internal static IEnumerator EventTips(List events) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__39(0) { events = events }; } internal static bool IsIgnoredMoon(string moonName) { string serializedValue = ((ConfigEntryBase)Configuration.MoonsToIgnore).GetSerializedValue(); string[] array = (string.IsNullOrEmpty(serializedValue) ? new string[0] : (from moon in serializedValue.Split(new char[1] { ',' }, StringSplitOptions.RemoveEmptyEntries) select moon.Trim()).ToArray()); bool result = false; string[] array2 = array; foreach (string text in array2) { string text2 = Regex.Replace(moonName, "\\d", string.Empty).Trim(); string text3 = Regex.Replace(text, "\\d", string.Empty).Trim(); if (moonName == text || text2 == text3) { result = true; Log.LogInfo("Moon is on list of moons to ignore events. Skipping Events"); break; } } return result; } internal static bool DoesEventsRunByChance() { float num = Mathf.Clamp(MEvent.Scale.Compute(Configuration.EventChanceGlobal), 0f, 100f); float num2 = Random.Range(0f, 100f); return num2 <= num; } internal static bool IsIgnoredEventByMoonBlacklist(MEvent mEvent) { string text = Manager.currentLevel.PlanetName.Replace(" ", string.Empty).ToString(); string value = Regex.Replace(text, "\\d", string.Empty).Trim(); if (mEvent.Blacklist.Contains(text, StringComparer.OrdinalIgnoreCase) || mEvent.Blacklist.Contains(value, StringComparer.OrdinalIgnoreCase)) { Log.LogInfo("Event " + mEvent.Name() + " is ignored due to moon blacklist."); return true; } return false; } internal static bool IsEventOnMoonWhitelist(MEvent mEvent) { string text = Manager.currentLevel.PlanetName.Replace(" ", string.Empty).ToString(); string value = Regex.Replace(text, "\\d", string.Empty).Trim(); if (mEvent.Whitelist.Count == 0) { Log.LogInfo("Event " + mEvent.Name() + " has an empty moon whitelist, but whitelist mode is on. Please consider either entering entries for the list or turn off the whitelist mode"); return false; } if (mEvent.Whitelist.Contains(text, StringComparer.OrdinalIgnoreCase) || mEvent.Whitelist.Contains(value, StringComparer.OrdinalIgnoreCase)) { Log.LogInfo("Event " + mEvent.Name() + " is chosen due to moon whitelist."); return true; } return false; } public static float currentHeatDifficulty() { float result = 0f; RoundManager instance = RoundManager.Instance; if (instance != null) { SelectableLevel currentLevel = instance.currentLevel; if (currentLevel != null) { _ = currentLevel.levelID; if (true) { int levelID = RoundManager.Instance.currentLevel.levelID; Log.LogInfo("Computing heat for level ID" + levelID); result = (Manager.heatDifficulty.TryGetValue(levelID, out var value) ? value : Configuration.startingHeat.Value); Log.LogInfo("Computed Heat is " + result + " for level ID " + levelID); } } } return result; } internal static List GetEventsByName(params string[] names) { HashSet nameSet = new HashSet(names); return events.Where((MEvent n) => nameSet.Contains(n.Name())).ToList(); } } public class LevelProperties { public int levelID; public MEvent.Scale minScrapAmount; public MEvent.Scale maxScrapAmount; public MEvent.Scale minScrapValue; public MEvent.Scale maxScrapValue; public LevelProperties(int levelID, MEvent.Scale minScrapAmount, MEvent.Scale maxScrapAmount, MEvent.Scale minScrapValue, MEvent.Scale maxScrapValue) { this.levelID = levelID; this.minScrapAmount = minScrapAmount; this.maxScrapAmount = maxScrapAmount; this.minScrapValue = minScrapValue; this.maxScrapValue = maxScrapValue; } public float GetScrapAmountMultiplier() { return Random.Range(minScrapAmount.Computef(MEvent.EventType.Neutral), maxScrapAmount.Computef(MEvent.EventType.Neutral)); } public float GetScrapValueMultiplier() { return Random.Range(minScrapValue.Computef(MEvent.EventType.Neutral), maxScrapValue.Computef(MEvent.EventType.Neutral)); } } [HarmonyPatch] public class Manager { public static class Spawn { internal static int randomSeedValue = 0; private static List spawnDenialPoints = new List(); private static int seed = 0; public static void OutsideObjects(GameObject obj, Vector3 offset, float density, float radius = -1f, int objectCap = 1000) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) BatchOutsideObjects(obj, offset, density, radius, objectCap); } public static void OutsideObjects(Assets.ObjectName objName, Vector3 offset, float density, float radius = -1f, int objectCap = 1000) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) BatchOutsideObjects(Assets.GetObject(objName), offset, density, radius, objectCap); } private static void BatchOutsideObjects(GameObject obj, Vector3 offset, float density, float radius, int objectCap) { //IL_008b: 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) if (!((Object)(object)obj == (Object)null)) { spawnDenialPoints = Helper.GetSpawnDenialNodes(); int num = (int)Mathf.Clamp(density * terrainArea, 0f, (float)objectCap); Log.LogInfo($"Spawning: {((Object)obj).name}, Count:{num}"); int num2 = 8; int num3 = num / num2; int item = num % num2; for (int i = 0; i < num3; i++) { Net.Instance.objectsToSpawn.Add(obj); Net.Instance.objectsToSpawnRadius.Add(radius); Net.Instance.objectsToSpawnOffsets.Add(offset); Net.Instance.objectsToSpawnAmount.Add(num2); } Net.Instance.objectsToSpawn.Add(obj); Net.Instance.objectsToSpawnRadius.Add(radius); Net.Instance.objectsToSpawnOffsets.Add(offset); Net.Instance.objectsToSpawnAmount.Add(item); } } public static void DoSpawnOutsideObjects(int count, float radius, Vector3 offset, GameObject obj) { //IL_00b8: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: 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_008c: 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_0094: 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_00d9: 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_00e2: 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_015a: Unknown result type (might be due to invalid IL or missing references) //IL_015f: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: 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_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01be: Unknown result type (might be due to invalid IL or missing references) //IL_01c3: Unknown result type (might be due to invalid IL or missing references) //IL_01c7: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01f4: Unknown result type (might be due to invalid IL or missing references) Vector3 val = default(Vector3); RaycastHit val2 = default(RaycastHit); for (int i = 0; i < count; i++) { randomSeedValue++; Random.InitState(randomSeedValue++); ((Vector3)(ref val))..ctor(0f, 0f, 0f); val = ((radius == -1f && outsideObjectSpawnNodes.Count != 0) ? RoundManager.Instance.GetRandomNavMeshPositionInRadius(outsideObjectSpawnNodes[Random.Range(0, outsideObjectSpawnNodes.Count)], outsideObjectSpawnRadius, default(NavMeshHit)) : RoundManager.Instance.GetRandomNavMeshPositionInRadius(RoundManager.Instance.outsideAINodes[Random.Range(0, RoundManager.Instance.outsideAINodes.Length)].transform.position, radius, default(NavMeshHit))); Quaternion rotation = obj.transform.rotation; bool flag = false; if (Physics.Raycast(new Ray(val, Vector3.down), ref val2)) { if (((Component)((RaycastHit)(ref val2)).collider).gameObject.tag != terrainTag && ((Object)((Component)((RaycastHit)(ref val2)).collider).gameObject).name != terrainName) { flag = true; } } else { flag = true; } foreach (Vector3 spawnDenialPoint in spawnDenialPoints) { if (Vector3.Distance(val, spawnDenialPoint) <= 10f) { flag = true; } } if (!flag) { val.y = ((RaycastHit)(ref val2)).point.y; val += offset; ((Quaternion)(ref rotation)).eulerAngles = ((Quaternion)(ref rotation)).eulerAngles + new Vector3(0f, (float)Random.Range(0, 360), 0f); GameObject val3 = Object.Instantiate(obj, val, rotation); NetworkObject component = val3.GetComponent(); if ((Object)(object)component != (Object)null) { val3.GetComponent().Spawn(true); } objectsToClear.Add(val3); } } } public static void OutsideEnemies(GameObject enemy, int count) { enemiesToSpawnOutside.Add(new ObjectInfo(enemy, count)); } public static void OutsideEnemies(EnemyType enemy, int count) { enemiesToSpawnOutside.Add(new ObjectInfo(enemy.enemyPrefab, count)); } public static void OutsideEnemies(Assets.EnemyName enemyName, int count) { enemiesToSpawnOutside.Add(new ObjectInfo(Assets.GetEnemy(enemyName).enemyPrefab, count)); } public static void InsideEnemies(GameObject enemy, int count, float radius = 0f) { enemiesToSpawnInside.Add(new ObjectInfo(enemy, count, 0f, radius)); } public static void InsideEnemies(EnemyType enemy, int count, float radius = 0f) { enemiesToSpawnInside.Add(new ObjectInfo(enemy.enemyPrefab, count, 0f, radius)); } public static void InsideEnemies(Assets.EnemyName enemyName, int count, float radius = 0f) { enemiesToSpawnInside.Add(new ObjectInfo(Assets.GetEnemy(enemyName).enemyPrefab, count, 0f, radius)); } public static void OutsideScrap(int Amount) { randomItemsToSpawnOutsideCount += Amount; } public static List DoSpawnOutsideEnemies() { //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) if (BrutalCompanyMinus.Minus.Events.SafeOutside.Active) { Log.LogInfo("Outside spawning prevented by OutsideSafe"); return new List(); } List list = new List(); List outsideNodes = Helper.GetOutsideNodes(); List spawnDenialNodes = Helper.GetSpawnDenialNodes(); for (int i = 0; i < enemiesToSpawnOutside.Count; i++) { for (int j = 0; j < enemiesToSpawnOutside[i].count; j++) { if ((Object)(object)enemiesToSpawnOutside[i].obj == (Object)null) { Log.LogError("Enemy prefab on DoSpawnOutsideEnemies() is null, continuing."); continue; } GameObject val = Object.Instantiate(enemiesToSpawnOutside[i].obj, Helper.GetSafePosition(outsideNodes, spawnDenialNodes, 20f, seed++), Quaternion.Euler(Vector3.zero)); EnemyAI component = val.GetComponent(); list.Add(component); RoundManager.Instance.SpawnedEnemies.Add(component); val.gameObject.GetComponentInChildren().Spawn(true); } } enemiesToSpawnOutside.Clear(); return list; } public static List DoSpawnInsideEnemies() { //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_0074: 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_0090: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) List list = new List(); for (int i = 0; i < enemiesToSpawnInside.Count; i++) { for (int j = 0; j < enemiesToSpawnInside[i].count; j++) { if ((Object)(object)enemiesToSpawnInside[i].obj == (Object)null) { Log.LogError("Enemy prefab on DoSpawnInsideEnemies() is null, continuing."); continue; } int num = Random.Range(0, RoundManager.Instance.allEnemyVents.Length); Vector3 position = RoundManager.Instance.allEnemyVents[num].floorNode.position; position = RoundManager.Instance.GetRandomNavMeshPositionInRadius(position, enemiesToSpawnInside[i].radius, RoundManager.Instance.navHit); Quaternion val = Quaternion.Euler(0f, RoundManager.Instance.allEnemyVents[num].floorNode.eulerAngles.y, 0f); GameObject val2 = Object.Instantiate(enemiesToSpawnInside[i].obj, position, val); val2.GetComponentInChildren().Spawn(true); EnemyAI component = val2.GetComponent(); list.Add(component); RoundManager.Instance.SpawnedEnemies.Add(component); } } enemiesToSpawnInside.Clear(); return list; } public static ScrapSpawnInfo DoSpawnScrapOutside(int Amount) { //IL_00b5: 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_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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_0110: Unknown result type (might be due to invalid IL or missing references) //IL_01bb: Unknown result type (might be due to invalid IL or missing references) if (Amount <= 0) { return new ScrapSpawnInfo((NetworkObjectReference[])(object)new NetworkObjectReference[0], new int[0]); } RoundManager instance = RoundManager.Instance; Random random = new Random(); List scrapToSpawn = GetScrapToSpawn((int)((float)Amount * instance.scrapAmountMultiplier * scrapAmountMultiplier)); List list = new List(); List list2 = new List(); List outsideNodes = Helper.GetOutsideNodes(); Log.LogInfo($"Spawning {scrapToSpawn.Count} outside"); for (int i = 0; i < scrapToSpawn.Count; i++) { if ((Object)(object)scrapToSpawn[i] == (Object)null) { Log.LogError("Found null element in list ScrapToSpawn. Skipping it."); continue; } Vector3 randomNavMeshPositionInBoxPredictable = instance.GetRandomNavMeshPositionInBoxPredictable(outsideNodes[Random.Range(0, outsideNodes.Count)], 10f, instance.navHit, random, -1, 1f); GameObject val = Object.Instantiate(scrapToSpawn[i].spawnPrefab, randomNavMeshPositionInBoxPredictable, Quaternion.identity, instance.spawnedScrapContainer); GrabbableObject component = val.GetComponent(); ((Component)component).transform.rotation = Quaternion.Euler(component.itemProperties.restingRotation); component.fallTime = 0f; component.itemProperties.weight = scrapToSpawn[i].weight; component.itemProperties.isConductiveMetal = scrapToSpawn[i].isConductiveMetal; list.Add((int)((float)Random.Range(scrapToSpawn[i].minValue, scrapToSpawn[i].maxValue + 1) * instance.scrapValueMultiplier * scrapValueMultiplier)); component.scrapValue = list[list.Count - 1]; NetworkObject component2 = val.GetComponent(); component2.Spawn(false); list2.Add(NetworkObjectReference.op_Implicit(component2)); } return new ScrapSpawnInfo(list2.ToArray(), list.ToArray()); } public static ScrapSpawnInfo DoSpawnScrapInside(int Amount) { //IL_027b: Unknown result type (might be due to invalid IL or missing references) //IL_0287: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_0298: Unknown result type (might be due to invalid IL or missing references) //IL_02ba: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c4: Unknown result type (might be due to invalid IL or missing references) //IL_0269: Unknown result type (might be due to invalid IL or missing references) //IL_026e: Unknown result type (might be due to invalid IL or missing references) //IL_0323: Unknown result type (might be due to invalid IL or missing references) //IL_0325: Unknown result type (might be due to invalid IL or missing references) //IL_034e: Unknown result type (might be due to invalid IL or missing references) //IL_0353: Unknown result type (might be due to invalid IL or missing references) //IL_040e: Unknown result type (might be due to invalid IL or missing references) if (Amount <= 0) { return new ScrapSpawnInfo((NetworkObjectReference[])(object)new NetworkObjectReference[0], new int[0]); } RoundManager instance = RoundManager.Instance; Random random = new Random(); RandomScrapSpawn val = null; RandomScrapSpawn[] source = Object.FindObjectsOfType(); List usedSpawns = new List(); List ScrapToSpawn = GetScrapToSpawn(Amount); List list = new List(); List list2 = new List(); Log.LogInfo($"Spawning {ScrapToSpawn.Count} inside"); int i; for (i = 0; i < ScrapToSpawn.Count; i++) { if ((Object)(object)ScrapToSpawn[i] == (Object)null) { Log.LogError("Null entry in scrapToSpawn, skipping entry"); continue; } List list3 = ((ScrapToSpawn[i].spawnPositionTypes != null && ScrapToSpawn[i].spawnPositionTypes.Count != 0) ? source.Where((RandomScrapSpawn x) => ScrapToSpawn[i].spawnPositionTypes.Contains(x.spawnableItems) && !x.spawnUsed).ToList() : source.ToList()); if (list3.Count <= 0) { Log.LogError("No positions to spawn scrap: " + ScrapToSpawn[i].itemName); continue; } if (usedSpawns.Count > 0 && list3.Contains(val)) { list3.RemoveAll((RandomScrapSpawn x) => usedSpawns.Contains(x)); if (list3.Count <= 0) { usedSpawns.Clear(); i--; continue; } } val = list3[random.Next(0, list3.Count)]; usedSpawns.Add(val); Vector3 val2; if (val.spawnedItemsCopyPosition) { val.spawnUsed = true; val2 = ((Component)val).transform.position; } else { val2 = instance.GetRandomNavMeshPositionInBoxPredictable(((Component)val).transform.position, val.itemSpawnRange, instance.navHit, random, -1, 1f) + Vector3.up * ScrapToSpawn[i].verticalOffset; } if ((Object)(object)ScrapToSpawn[i].spawnPrefab.GetComponent() == (Object)null) { Log.LogError("GrabbableObject is null in scrapToSpawn, skipping entry."); continue; } GameObject val3 = Object.Instantiate(ScrapToSpawn[i].spawnPrefab, val2, Quaternion.identity, instance.spawnedScrapContainer); GrabbableObject component = val3.GetComponent(); ((Component)component).transform.rotation = Quaternion.Euler(component.itemProperties.restingRotation); component.fallTime = 0f; int num = (int)((float)Random.Range(ScrapToSpawn[i].minValue, ScrapToSpawn[i].maxValue + 1) * instance.scrapValueMultiplier * scrapValueMultiplier); list.Add(num); component.scrapValue = num; component.itemProperties.weight = ScrapToSpawn[i].weight; NetworkObject component2 = val3.GetComponent(); component2.Spawn(false); list2.Add(NetworkObjectReference.op_Implicit(component2)); } return new ScrapSpawnInfo(list2.ToArray(), list.ToArray()); } private static List GetScrapToSpawn(int Amount) { RoundManager instance = RoundManager.Instance; Random random = new Random(StartOfRound.Instance.randomMapSeed + seed); seed++; List list = new List(); List list2 = new List(); for (int i = 0; i < instance.currentLevel.spawnableScrap.Count; i++) { if (i == instance.increasedScrapSpawnRateIndex) { list2.Add(i); } else { list2.Add(instance.currentLevel.spawnableScrap[i].rarity); } } int[] array = list2.ToArray(); for (int j = 0; j < Amount; j++) { Item spawnableItem = instance.currentLevel.spawnableScrap[instance.GetRandomWeightedIndex(array, random)].spawnableItem; list.Add(Assets.GetItem(((Object)spawnableItem).name)); } return list; } } internal struct ObjectInfo { public int count; public float radius; public float density; public GameObject obj; public ObjectInfo(GameObject obj, int count) { this.obj = obj; this.count = count; radius = 0f; density = 0f; } public ObjectInfo(GameObject obj, float density) { this.obj = obj; this.density = density; radius = 0f; count = 0; } public ObjectInfo(GameObject obj, float density, float radius) { this.obj = obj; this.density = density; this.radius = radius; count = 0; } public ObjectInfo(GameObject obj, int count, float density, float radius) { this.obj = obj; this.density = density; this.radius = radius; this.count = count; } } public struct ScrapSpawnInfo { public NetworkObjectReference[] netObjects; public int[] scrapPrices; public ScrapSpawnInfo(NetworkObjectReference[] netObjects, int[] scrapPrices) { this.netObjects = netObjects; this.scrapPrices = scrapPrices; } } [CompilerGenerated] private sealed class d__87 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; private IEnumerator <>s__1; private Net.OutsideObjectsToSpawnMethod 5__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__87(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>s__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown //IL_0089: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(5f); <>1__state = 1; return true; case 1: <>1__state = -1; <>s__1 = Net.Instance.outsideObjectsToSpawn.GetEnumerator(); try { while (<>s__1.MoveNext()) { 5__2 = <>s__1.Current; Spawn.OutsideObjects(Assets.GetObject((Assets.ObjectName)5__2.objectEnumID), new Vector3(0f, -1f, 0f), 5__2.density); } } finally { if (<>s__1 != null) { <>s__1.Dispose(); } } <>s__1 = null; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } internal static float difficulty = 0f; internal static float daysDifficulty = 0f; internal static float scrapInShipDifficulty = 0f; internal static float moonGradeDifficulty = 0f; internal static float weatherDifficulty = 0f; internal static float quotaDifficulty = 0f; public static Dictionary heatDifficulty = new Dictionary(); public static int levelNameOnLeave = -1; public static int levelNameOnLand = 0; public static SelectableLevel currentLevel; public static Terminal currentTerminal; internal static float terrainArea = 0f; internal static string terrainTag = ""; internal static string terrainName = ""; private static GameObject _terrainObject; internal static List outsideObjectSpawnNodes = new List(); internal static float outsideObjectSpawnRadius = 0f; internal static List objectsToClear = new List(); internal static Dictionary networkedObjects = new Dictionary(); internal static List enemiesToSpawnInside = new List(); internal static List enemiesToSpawnOutside = new List(); internal static List insideObjectsToSpawnOutside = new List(); internal static float factorySizeMultiplier = 1f; internal static float scrapValueMultiplier = 1f; public static float scrapAmountMultiplier = 1f; internal static int randomItemsToSpawnOutsideCount = 0; internal static int bonusEnemyHp = 0; internal static int bonusMaxInsidePowerCount = 0; internal static int bonusMaxOutsidePowerCount = 0; internal static int minEnemiesToSpawnInside = 0; internal static int minEnemiestoSpawnOutside = 0; internal static float spawnChanceMultiplier = 1f; internal static float spawncapMultipler = 1f; public static bool transmuteScrap = false; internal static List scrapTransmuteAmount = new List(); internal static List ScrapToTransmuteTo = new List(); internal static bool moveTime = false; internal static float moveTimeAmount = 0f; internal static float timeSpeedMultiplier = 1f; internal static float inverseTimeSpeedMultiplier = 1f; internal static FixedString4096Bytes textUI; internal static int seed; public static Dictionary originalMoonMoldData = new Dictionary(); private static bool isApplicationQuitting = false; internal static int daysPassed { get { if ((Object)(object)StartOfRound.Instance != (Object)null) { return StartOfRound.Instance.gameStats.daysSpent; } return 0; } } internal static GameObject terrainObject { get { if ((Object)(object)_terrainObject == (Object)null) { SampleMap(); } return _terrainObject; } private set { _terrainObject = value; } } public static void TransmuteScrap(float amount, params SpawnableItemWithRarity[] Items) { transmuteScrap = true; scrapTransmuteAmount.Add(Mathf.Clamp(amount, 0f, 1f)); ScrapToTransmuteTo.AddRange(Items); if (Configuration.ExtraLogging.Value) { List list = new List(); foreach (SpawnableItemWithRarity val in Items) { list.Add($"{((Object)val.spawnableItem).name} (Rarity: {val.rarity})"); } Log.LogInfo(string.Format("TransmuteScrap called with amount: {0}, Items: {1}", amount, string.Join(", ", list))); } } public static void DeliverRandomItems(int Amount, int MinPrice, int MaxPrice) { if (!((NetworkBehaviour)RoundManager.Instance).IsServer) { return; } Terminal val = Object.FindObjectOfType(); List list = new List(); for (int i = 0; i < val.buyableItemsList.Length; i++) { if (val.buyableItemsList[i].creditsWorth >= MinPrice && val.buyableItemsList[i].creditsWorth <= MaxPrice) { list.Add(i); } } for (int j = 0; j < Amount; j++) { int item = list[Random.Range(0, list.Count)]; val.orderedItemsFromTerminal.Add(item); } } internal static int GetLevelIndex() { for (int i = 0; i < StartOfRound.Instance.levels.Length; i++) { if (((Object)StartOfRound.Instance.levels[i]).name == ((Object)RoundManager.Instance.currentLevel).name) { return i; } } return 0; } public static void AddEnemyHp(int amount) { bonusEnemyHp += amount; } public static void AddInsidePower(int amount) { bonusMaxInsidePowerCount += amount; } public static void AddOutsidePower(int amount) { bonusMaxOutsidePowerCount += amount; } public static void MultiplySpawnCap(float multiplier) { spawncapMultipler *= multiplier; } internal static void ComputeDifficultyValues() { //IL_017c: Unknown result type (might be due to invalid IL or missing references) difficulty = 0f; if (Configuration.scaleByDaysPassed.Value) { daysDifficulty = Mathf.Clamp((float)daysPassed * Configuration.daysPassedDifficultyMultiplier.Value, 0f, Configuration.daysPassedDifficultyCap.Value); difficulty += daysDifficulty; } if (Configuration.scaleByScrapInShip.Value) { scrapInShipDifficulty = Mathf.Clamp(GetScrapInShip() * Configuration.scrapInShipDifficultyMultiplier.Value, 0f, Configuration.scrapInShipDifficultyCap.Value); difficulty += scrapInShipDifficulty; } if (Configuration.scaleByMoonGrade.Value) { if (Configuration.gradeAdditives.TryGetValue(StartOfRound.Instance.currentLevel.riskLevel, out var value)) { moonGradeDifficulty = value; difficulty += value; } else { moonGradeDifficulty = Configuration.gradeAdditives["Other"]; difficulty += moonGradeDifficulty; } } if (Configuration.scaleByQuota.Value) { quotaDifficulty = Mathf.Clamp((float)TimeOfDay.Instance.profitQuota * Configuration.quotaDifficultyMultiplier.Value, 0f, Configuration.quotaDifficultyCap.Value); difficulty += quotaDifficulty; } if (Configuration.scaleByWeather.Value) { weatherDifficulty = Configuration.weatherAdditives.GetValueOrDefault(StartOfRound.Instance.currentLevel.currentWeather, 0f); difficulty += weatherDifficulty; } if (Configuration.enablePlayerScaling.Value) { float value2 = Configuration.playerScalingMultiplier.Value; int value3 = Configuration.basePlayerAmount.Value; int num = StartOfRound.Instance.allPlayerScripts.Where((PlayerControllerB x) => x.isPlayerDead || x.isPlayerControlled).Count(); int num2 = num - value3; if (Configuration.playerScalingType.Value.ToLower() == "linear") { difficulty *= 1f + (float)num2 * (value2 - 1f); } else if (Configuration.playerScalingType.Value.ToLower() == "exponential") { difficulty *= Mathf.Pow(value2, (float)num2); } else if (Configuration.playerScalingType.Value.ToLower() == "logarithmic") { difficulty *= 1f + Mathf.Log((float)Mathf.Max(num2, 1)) * value2; } else if (Configuration.playerScalingType.Value.ToLower() == "cubic") { difficulty *= 1f + Mathf.Pow((float)num2, 3f) * value2; } else { difficulty *= 1f + (float)num2 * (value2 - 1f); } } if (Configuration.scaleHeat.Value && (Configuration.heatSettingsToAffect.Value.HasFlag(Configuration.HeatSettingsFlags.Difficulty) || Configuration.heatSettingsToAffect.Value.HasFlag(Configuration.HeatSettingsFlags.All))) { float num3 = EventManager.currentHeatDifficulty(); if (num3 > 0f) { difficulty *= (float)((double)(Configuration.heatMultiplierDifficulty.Value * difficulty / Configuration.heatDampening.Value) * Math.Pow(1f + Configuration.heatDampening.Value, num3) + 1.0); } } if (Configuration.ignoreMaxCap.Value) { difficulty = Mathf.Clamp(difficulty, 0f, float.MaxValue); } else { difficulty = Mathf.Clamp(difficulty, 0f, Configuration.difficultyMaxCap.Value); } } internal static float GetScrapInShip() { GameObject hangarShip = Assets.hangarShip; if ((Object)(object)hangarShip == (Object)null) { return 0f; } GrabbableObject[] componentsInChildren = hangarShip.GetComponentsInChildren(); int num = 0; GrabbableObject[] array = componentsInChildren; foreach (GrabbableObject val in array) { if ((Object)(object)val != (Object)null) { num += val.scrapValue; } if (Configuration.ExtraLogging.Value) { Log.LogInfo($"Found item in ship with scrap value: {val.scrapValue}"); } } GameObject cruiser = Assets.cruiser; if ((Object)(object)cruiser != (Object)null) { GrabbableObject[] componentsInChildren2 = cruiser.GetComponentsInChildren(); GrabbableObject[] array2 = componentsInChildren2; foreach (GrabbableObject val2 in array2) { if ((Object)(object)val2 != (Object)null) { num += val2.scrapValue; } if (Configuration.ExtraLogging.Value) { Log.LogInfo($"Found item in cruiser with scrap value: {val2.scrapValue}"); } } } GameObject microwave = Assets.Microwave; if ((Object)(object)microwave != (Object)null) { GrabbableObject[] componentsInChildren3 = microwave.GetComponentsInChildren(); GrabbableObject[] array3 = componentsInChildren3; foreach (GrabbableObject val3 in array3) { if ((Object)(object)val3 != (Object)null) { num += val3.scrapValue; } if (Configuration.ExtraLogging.Value) { Log.LogInfo($"Found item in Microwave with scrap value: {val3.scrapValue}"); } } } if (Compatibility.ShipInventoryPresent) { num += ShipInventoryCompat.GetShipInventoryScrapValue(); } return num; } internal static void SampleMap() { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003a: 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_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0191: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: 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_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result type (might be due to invalid IL or missing references) //IL_0217: Unknown result type (might be due to invalid IL or missing references) //IL_021c: 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_0228: Unknown result type (might be due to invalid IL or missing references) //IL_022d: Unknown result type (might be due to invalid IL or missing references) //IL_022f: Unknown result type (might be due to invalid IL or missing references) //IL_0231: Unknown result type (might be due to invalid IL or missing references) //IL_023d: 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_0249: Unknown result type (might be due to invalid IL or missing references) //IL_024e: Unknown result type (might be due to invalid IL or missing references) //IL_0253: Unknown result type (might be due to invalid IL or missing references) //IL_0267: 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_0104: 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_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_012a: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Unknown result type (might be due to invalid IL or missing references) //IL_0157: Unknown result type (might be due to invalid IL or missing references) //IL_015b: Unknown result type (might be due to invalid IL or missing references) List list = new List(); GameObject[] outsideAINodes = RoundManager.Instance.outsideAINodes; foreach (GameObject val in outsideAINodes) { list.Add(new Vector2(val.transform.position.x, val.transform.position.z)); } list = Helper.ComputeConvexHull(list).ToList(); if (list.Count > 0) { float num = 0f; float num2 = 0f; foreach (Vector2 item2 in list) { num += item2.x; num2 += item2.y; } Vector2 val2 = default(Vector2); ((Vector2)(ref val2))..ctor(num / (float)list.Count, num2 / (float)list.Count); foreach (Vector2 item3 in list) { Vector2 val3 = (item3 + val2) * 0.5f; outsideObjectSpawnNodes.Add(new Vector3(val3.x, 100f, val3.y)); } outsideObjectSpawnRadius = Vector2.Distance(val2, list[0]) + 75f; } float num3 = 0f; for (int j = 0; j != list.Count - 1; j++) { Vector2 val4 = list[j]; Vector2 val5 = list[j + 1]; float num4 = (val4.y + val5.y) * 0.5f; float num5 = val4.x - val5.x; num3 += num4 * num5; } if (num3 < 0f) { num3 *= -1f; } terrainArea = num3; List outsideNodes = Helper.GetOutsideNodes(); List list2 = new List(); RaycastHit item = default(RaycastHit); for (int k = 0; k != outsideNodes.Count * 10; k++) { Vector3 val6 = outsideNodes[k % outsideNodes.Count]; Vector2 val7 = Random.insideUnitCircle * 3f; if (Physics.Raycast(new Ray(val6 + new Vector3(val7.x, 10f, val7.y), Vector3.down), ref item)) { list2.Add(item); } } terrainTag = Helper.MostCommon(list2.Select((RaycastHit x) => ((Component)((RaycastHit)(ref x)).collider).gameObject.tag).ToList()); terrainName = Helper.MostCommon(list2.Select((RaycastHit x) => ((Object)((Component)((RaycastHit)(ref x)).collider).gameObject).name).ToList()); GameObject val8 = GameObject.FindGameObjectWithTag(terrainTag); GameObject[] array = GameObject.FindGameObjectsWithTag(terrainTag); GameObject[] array2 = array; foreach (GameObject val9 in array2) { if (((Object)val9).name == terrainName) { val8 = val9; } } terrainObject = val8; } public static void AddEnemyToPoolWithRarity(ref List list, EnemyType enemy, int rarity) { DoAddEnemyToPoolWithRarity(ref list, enemy, rarity); } public static void AddEnemyToPoolWithRarity(ref List list, Assets.EnemyName enemy, int rarity) { DoAddEnemyToPoolWithRarity(ref list, Assets.GetEnemy(enemy), rarity); } public static void AddEnemyToPoolWithRarity(ref List list, string enemy, int rarity) { DoAddEnemyToPoolWithRarity(ref list, Assets.GetEnemy(enemy), rarity); } private static void DoAddEnemyToPoolWithRarity(ref List list, EnemyType enemy, int rarity) { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown if ((Object)(object)enemy.enemyPrefab == (Object)null) { Log.LogError("Enemy prefab is null on AddEnemyToPoolWithRarity(), returning."); return; } SpawnableEnemyWithRarity item = new SpawnableEnemyWithRarity(enemy, rarity); list.Add(item); } public static void SetAtmosphere(string name, bool state) { //IL_000b: Unknown result type (might be due to invalid IL or missing references) Net.Instance.currentWeatherEffects.Add(new Net.CurrentWeatherEffect(FixedString128Bytes.op_Implicit(name), state)); } public static void SetAtmosphere(Assets.AtmosphereName name, bool state) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) Net.Instance.currentWeatherEffects.Add(new Net.CurrentWeatherEffect(FixedString128Bytes.op_Implicit(Assets.AtmosphereNameList[name]), state)); } public static void RemoveSpawn(string name) { DoRemoveSpawn(name); } public static void RemoveSpawn(Assets.EnemyName name) { DoRemoveSpawn(Assets.EnemyNameList[name]); } private static void DoRemoveSpawn(string Name) { string Name2 = Name; int num = 0; try { num += RoundManager.Instance.currentLevel.Enemies.RemoveAll((SpawnableEnemyWithRarity x) => ((Object)x.enemyType).name.ToUpper() == Name2.ToUpper()); } catch { Log.LogError("RemoveAll() on insideEnemies failed"); } try { num += RoundManager.Instance.currentLevel.OutsideEnemies.RemoveAll((SpawnableEnemyWithRarity x) => ((Object)x.enemyType).name.ToUpper() == Name2.ToUpper()); } catch { Log.LogError("RemoveAll() on outsideEnemies failed"); } try { num += RoundManager.Instance.currentLevel.DaytimeEnemies.RemoveAll((SpawnableEnemyWithRarity x) => ((Object)x.enemyType).name.ToUpper() == Name2.ToUpper()); } catch { Log.LogError("RemoveAll() on daytimeEnemies failed"); } if (num == 0) { Log.LogInfo($"Failed to remove '{Name2}' from enemy pool, either it dosen't exist on the map or wrong string used."); } } public static bool SpawnExists(string name) { return DoSpawnExists(name); } public static bool SpawnExists(Assets.EnemyName name) { return DoSpawnExists(Assets.EnemyNameList[name]); } private static bool DoSpawnExists(string name) { string name2 = name; try { if (RoundManager.Instance.currentLevel.Enemies.Exists((SpawnableEnemyWithRarity x) => ((Object)x.enemyType).name == name2)) { return true; } } catch { Log.LogError("Exists() on insideEnemies failed"); } try { if (RoundManager.Instance.currentLevel.OutsideEnemies.Exists((SpawnableEnemyWithRarity x) => ((Object)x.enemyType).name == name2)) { return true; } } catch { Log.LogError("Exists() on outsideEnemies failed"); } try { if (RoundManager.Instance.currentLevel.DaytimeEnemies.Exists((SpawnableEnemyWithRarity x) => ((Object)x.enemyType).name == name2)) { return true; } } catch { Log.LogError("Exists() on daytimeEnemies failed"); } return false; } public static void MultiplySpawnChance(SelectableLevel currentLevel, float by) { //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Expected O, but got Unknown //IL_0086: 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_0165: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Expected O, but got Unknown //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013d: 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_0224: Expected O, but got Unknown //IL_01ed: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Unknown result type (might be due to invalid IL or missing references) spawnChanceMultiplier *= by; Keyframe[] array = (Keyframe[])(object)new Keyframe[currentLevel.enemySpawnChanceThroughoutDay.keys.Length]; for (int i = 0; i < currentLevel.enemySpawnChanceThroughoutDay.keys.Length; i++) { float num = by; if (((Keyframe)(ref currentLevel.enemySpawnChanceThroughoutDay.keys[i])).value <= 0f) { num = 1f; } array[i] = new Keyframe(((Keyframe)(ref currentLevel.enemySpawnChanceThroughoutDay.keys[i])).time, ((Keyframe)(ref currentLevel.enemySpawnChanceThroughoutDay.keys[i])).value * num); } currentLevel.enemySpawnChanceThroughoutDay = new AnimationCurve(array); Keyframe[] array2 = (Keyframe[])(object)new Keyframe[currentLevel.outsideEnemySpawnChanceThroughDay.keys.Length]; for (int j = 0; j < currentLevel.outsideEnemySpawnChanceThroughDay.keys.Length; j++) { float num2 = by; if (((Keyframe)(ref currentLevel.outsideEnemySpawnChanceThroughDay.keys[j])).value <= 0f) { num2 = 1f; } array2[j] = new Keyframe(((Keyframe)(ref currentLevel.outsideEnemySpawnChanceThroughDay.keys[j])).time, ((Keyframe)(ref currentLevel.outsideEnemySpawnChanceThroughDay.keys[j])).value * num2); } currentLevel.outsideEnemySpawnChanceThroughDay = new AnimationCurve(array2); Keyframe[] array3 = (Keyframe[])(object)new Keyframe[currentLevel.daytimeEnemySpawnChanceThroughDay.keys.Length]; for (int k = 0; k < currentLevel.daytimeEnemySpawnChanceThroughDay.keys.Length; k++) { float num3 = by; if (((Keyframe)(ref currentLevel.daytimeEnemySpawnChanceThroughDay.keys[k])).value <= 0f) { num3 = 1f; } array3[k] = new Keyframe(((Keyframe)(ref currentLevel.daytimeEnemySpawnChanceThroughDay.keys[k])).time, ((Keyframe)(ref currentLevel.daytimeEnemySpawnChanceThroughDay.keys[k])).value * num3); } currentLevel.daytimeEnemySpawnChanceThroughDay = new AnimationCurve(array3); } internal static void AddInsideSpawnChance(SelectableLevel currentLevel, float value) { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Expected O, but got Unknown Keyframe[] array = (Keyframe[])(object)new Keyframe[currentLevel.enemySpawnChanceThroughoutDay.keys.Length]; for (int i = 0; i < currentLevel.enemySpawnChanceThroughoutDay.keys.Length; i++) { array[i] = new Keyframe(((Keyframe)(ref currentLevel.enemySpawnChanceThroughoutDay.keys[i])).time, ((Keyframe)(ref currentLevel.enemySpawnChanceThroughoutDay.keys[i])).value + value); } currentLevel.enemySpawnChanceThroughoutDay = new AnimationCurve(array); } internal static void AddOutsideSpawnChance(SelectableLevel currentLevel, float value) { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0078: Expected O, but got Unknown Keyframe[] array = (Keyframe[])(object)new Keyframe[currentLevel.outsideEnemySpawnChanceThroughDay.keys.Length]; for (int i = 0; i < currentLevel.outsideEnemySpawnChanceThroughDay.keys.Length; i++) { array[i] = new Keyframe(((Keyframe)(ref currentLevel.outsideEnemySpawnChanceThroughDay.keys[i])).time, ((Keyframe)(ref currentLevel.outsideEnemySpawnChanceThroughDay.keys[i])).value + value); } currentLevel.outsideEnemySpawnChanceThroughDay = new AnimationCurve(array); } public static void PayCredits(int amount) { Log.LogDebug("BCMER Cred Amt: " + amount); if (amount != 0) { Log.LogDebug("BCMER Cred Before: " + currentTerminal.groupCredits); Terminal obj = currentTerminal; obj.groupCredits += amount; Log.LogDebug("BCMER Cred After: " + currentTerminal.groupCredits); currentTerminal.SyncGroupCreditsServerRpc(currentTerminal.groupCredits, currentTerminal.numberOfItemsInDropship); bool flag = amount >= 0; HUDManager.Instance.AddTextToChatOnServer(string.Format("{1}{2}■", flag ? "#008000" : "#FF0000", flag ? "+" : "", amount), -1); } } [HarmonyPostfix] [HarmonyPatch(typeof(TimeOfDay), "MoveGlobalTime")] private static void OnMoveGlobaTime(ref TimeOfDay __instance, ref float ___timeUntilDeadline, ref float ___globalTime) { if (moveTime) { ___timeUntilDeadline -= moveTimeAmount; ___globalTime += moveTimeAmount; TimeOfDay obj = __instance; obj.globalTimeSpeedMultiplier *= timeSpeedMultiplier; moveTimeAmount = 0f; inverseTimeSpeedMultiplier = 1f / timeSpeedMultiplier; timeSpeedMultiplier = 1f; moveTime = false; } } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "ShipLeave")] private static void OnShipLeave() { TimeOfDay instance = TimeOfDay.Instance; instance.globalTimeSpeedMultiplier *= inverseTimeSpeedMultiplier; inverseTimeSpeedMultiplier = 1f; if (Configuration.scaleHeat.Value) { levelNameOnLeave = RoundManager.Instance.currentLevel.levelID; if (heatDifficulty.ContainsKey(levelNameOnLeave)) { heatDifficulty[levelNameOnLeave] = Math.Min(heatDifficulty[levelNameOnLand] + Math.Abs(Configuration.heatIncrementAmount.Value), Configuration.heatMaxCap.Value); } } } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "OnLocalDisconnect")] private static void OnDisconnect() { if (((NetworkBehaviour)RoundManager.Instance).IsServer) { try { if (((NetworkBehaviour)RoundManager.Instance).IsServer && Configuration.scaleHeat.Value && (heatDifficulty == null || heatDifficulty.Count > 0)) { string currentSaveFileName = GameNetworkManager.Instance.currentSaveFileName; ES3.Save>("heatDifficulty", heatDifficulty, currentSaveFileName + "_Brutal"); } } catch { Log.LogError("Failed to get game save name on disconnect, skipping heat difficulty save."); return; } } if (!isApplicationQuitting) { heatDifficulty.Clear(); } } [HarmonyPrefix] [HarmonyPatch(typeof(GameNetworkManager), "OnApplicationQuit")] private static void OnAppQuit() { isApplicationQuitting = true; if (!((NetworkBehaviour)RoundManager.Instance).IsServer) { return; } try { if (heatDifficulty == null || heatDifficulty.Count > 0) { string currentSaveFileName = GameNetworkManager.Instance.currentSaveFileName; ES3.Save>("heatDifficulty", heatDifficulty, currentSaveFileName + "_Brutal"); } } catch { Log.LogError("Failed to get game save name on application quit, skipping heat difficulty save."); } } [HarmonyPostfix] [HarmonyPatch(typeof(StartOfRound), "FirePlayersAfterDeadlineClientRpc")] private static void OnFirePlayersAfterDeadline() { if (!Configuration.scaleHeat.Value) { return; } heatDifficulty.Clear(); if (((NetworkBehaviour)RoundManager.Instance).IsServer) { try { string currentSaveFileName = GameNetworkManager.Instance.currentSaveFileName; ES3.DeleteKey("heatDifficulty", currentSaveFileName + "_Brutal"); ES3.Save>("heatDifficulty", heatDifficulty, currentSaveFileName + "_Brutal"); } catch { Log.LogError("Failed to get game save name after deadline, skipping heat difficulty reset."); } } } [HarmonyPostfix] [HarmonyPatch(typeof(StartOfRound), "Start")] private static void OnStart() { if (((NetworkBehaviour)RoundManager.Instance).IsServer && Configuration.scaleHeat.Value) { heatDifficulty.Clear(); string currentSaveFileName = GameNetworkManager.Instance.currentSaveFileName; if (ES3.KeyExists("heatDifficulty", currentSaveFileName + "_Brutal")) { try { Log.LogInfo("Found a save called " + currentSaveFileName + "_Brutal, loading heat difficulty from it..."); Dictionary dictionary = ES3.Load>("heatDifficulty", currentSaveFileName + "_Brutal"); if (dictionary != null || dictionary.Count > 0) { heatDifficulty = dictionary; } Log.LogInfo("Manager.heatDifficulty successfully loaded."); if (!UI.canClearText) { return; } try { UI.ClearText(); } catch (Exception) { ((MonoBehaviour)StartOfRound.Instance).StartCoroutine(UI.ClearAfterDelay()); } } catch (Exception ex2) { Log.LogError("Failed to load Manager.heatDifficulty: " + ex2.Message); } } else { Log.LogInfo("No existing heat difficulty data found, starting fresh."); } } if (((NetworkBehaviour)RoundManager.Instance).IsServer) { return; } try { UI.ClearText(); } catch (Exception) { try { ((MonoBehaviour)StartOfRound.Instance).StartCoroutine(UI.ClearAfterDelay()); } catch (Exception ex3) { Log.LogError("Failed to clear UI text on client coroutine after fallback attempt: " + ex3.Message); } } } [HarmonyPostfix] [HarmonyPatch(typeof(PlayerControllerB), "ConnectClientToPlayerObject")] private static void OnPlayerConnect() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) if (!((NetworkBehaviour)RoundManager.Instance).IsServer) { Log.LogInfo("Requesting heat difficulty from server..."); Net.Instance.SyncHeatMapServerRpc(); } } [HarmonyPostfix] [HarmonyPatch(typeof(ES3), "DeleteFile", new Type[] { typeof(string) })] private static void OnDeleteSaveFile(string filePath) { if (string.IsNullOrEmpty(filePath)) { return; } Log.LogInfo(filePath + " is being deleted, checking for brutal file..."); string text = filePath + "_Brutal"; if (ES3.FileExists(text)) { try { ES3.DeleteFile(text); Log.LogInfo("Deleted " + text + " successfully."); } catch (Exception ex) { Log.LogError("Failed to delete " + text + ": " + ex.Message); } } } [HarmonyPostfix] [HarmonyPatch(typeof(StartOfRound), "AutoSaveShipData")] private static void OnSaveData() { if (!((NetworkBehaviour)RoundManager.Instance).IsServer) { return; } try { if (heatDifficulty != null && heatDifficulty.Count != 0) { string currentSaveFileName = GameNetworkManager.Instance.currentSaveFileName; Log.LogInfo("Attempting to save to " + currentSaveFileName + "_Brutal..."); ES3.Save>("heatDifficulty", heatDifficulty, currentSaveFileName + "_Brutal"); Log.LogInfo("Manager.heatDifficulty successfully saved"); } } catch (Exception ex) { Log.LogError("Failed to save Manager.heatDifficulty: " + ex.Message); } } [HarmonyPrefix] [HarmonyPatch(typeof(TimeOfDay), "Start")] private static void OnTimeOfDayStart() { inverseTimeSpeedMultiplier = 1f; } [HarmonyPostfix] [HarmonyPriority(800)] [HarmonyPatch(typeof(RoundManager), "FinishGeneratingLevel")] private static void ObjectSpawnHandling() { //IL_0059: Unknown result type (might be due to invalid IL or missing references) SampleMap(); Spawn.randomSeedValue = StartOfRound.Instance.randomMapSeed + 2 + seed; ((MonoBehaviour)RoundManager.Instance).StartCoroutine(DelayedExecution()); foreach (ObjectInfo item in insideObjectsToSpawnOutside) { Spawn.OutsideObjects(item.obj, new Vector3(0f, -0.05f, 0f), item.density, -1f, 250); } } [IteratorStateMachine(typeof(d__87))] private static IEnumerator DelayedExecution() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__87(0); } [HarmonyPrefix] [HarmonyPatch(typeof(RoundManager), "AdvanceHourAndSpawnNewBatchOfEnemies")] private static void OnAdvanceHourAndSpawnNewBatchOfEnemies(ref RoundManager __instance) { RoundManager obj = __instance; obj.minEnemiesToSpawn += minEnemiesToSpawnInside; RoundManager obj2 = __instance; obj2.minOutsideEnemiesToSpawn += minEnemiestoSpawnOutside; minEnemiesToSpawnInside = 0; minEnemiestoSpawnOutside = 0; } [HarmonyPostfix] [HarmonyPatch(typeof(RoundManager), "RefreshEnemyVents")] private static void OnRefreshEnemyVents() { if (RoundManager.Instance.allEnemyVents.Length != 0) { List list = new List(); list.AddRange(Spawn.DoSpawnInsideEnemies()); list.AddRange(Spawn.DoSpawnOutsideEnemies()); } } } public class MEvent { public enum EventType { Insane, VeryBad, Bad, Neutral, Good, VeryGood, Rare, Remove } public enum ScaleType { InsideEnemyRarity, OutsideEnemyRarity, DaytimeEnemyRarity, MinOutsideEnemy, MinInsideEnemy, MaxOutsideEnemy, MaxInsideEnemy, ScrapValue, ScrapAmount, FactorySize, MinDensity, MaxDensity, MinCash, MaxCash, MinItemAmount, MaxItemAmount, MinValue, MaxValue, Rarity, MinRarity, MaxRarity, MinCut, MaxCut, MinHp, MaxHp, SpawnMultiplier, MaxInsideEnemyCount, MaxOutsideEnemyCount, SpawnCapMultiplier, MinPercentageCut, MaxPercentageCut, MinAmount, MaxAmount, Percentage, TimeSettings, TimeMin, TimeMax, MinPercentSelected, MaxPercentSelected, ObjectWidth, minMold, maxMold } public struct Scale { public float Base; public float Increment; public float MinCap; public float MaxCap; public Scale(float Base, float Increment, float MinCap, float MaxCap) { this.Base = Base; this.Increment = Increment; this.MinCap = MinCap; this.MaxCap = MaxCap; } public static float Compute(Scale scale, EventType Type = EventType.Neutral) { float increment = scale.Increment; return Mathf.Clamp(scale.Base + increment * Manager.difficulty, scale.MinCap, Configuration.ignoreMaxCap.Value ? 2.1474836E+09f : scale.MaxCap); } public float Computef(EventType type) { return Compute(this, type); } public int Compute(EventType type) { return (int)Compute(this, type); } } public class MonsterEvent { public EnemyType enemy; public Scale insideSpawnRarity; public Scale outsideSpawnRarity; public Scale minInside; public Scale maxInside; public Scale minOutside; public Scale maxOutside; public EventType eventType; public MonsterEvent(EnemyType enemy, Scale insideSpawnRarity, Scale outsideSpawnRarity, Scale minInside, Scale maxInside, Scale minOutside, Scale maxOutside) { this.enemy = enemy; assignRarities(insideSpawnRarity, outsideSpawnRarity, minInside, maxInside, minOutside, maxOutside); } public MonsterEvent(Assets.EnemyName enemyName, Scale insideSpawnRarity, Scale outsideSpawnRarity, Scale minInside, Scale maxInside, Scale minOutside, Scale maxOutside) { enemy = Assets.GetEnemy(enemyName); assignRarities(insideSpawnRarity, outsideSpawnRarity, minInside, maxInside, minOutside, maxOutside); } public MonsterEvent(string enemyName, Scale insideSpawnRarity, Scale outsideSpawnRarity, Scale minInside, Scale maxInside, Scale minOutside, Scale maxOutside) { enemy = Assets.GetEnemy(enemyName); assignRarities(insideSpawnRarity, outsideSpawnRarity, minInside, maxInside, minOutside, maxOutside); } internal void assignRarities(Scale insideSpawnRarity, Scale outsideSpawnRarity, Scale minInside, Scale maxInside, Scale minOutside, Scale maxOutside) { this.insideSpawnRarity = insideSpawnRarity; this.outsideSpawnRarity = outsideSpawnRarity; this.minInside = minInside; this.maxInside = maxInside; this.minOutside = minOutside; this.maxOutside = maxOutside; } public void Execute() { Manager.AddEnemyToPoolWithRarity(ref RoundManager.Instance.currentLevel.Enemies, enemy, insideSpawnRarity.Compute(eventType)); Manager.AddEnemyToPoolWithRarity(ref RoundManager.Instance.currentLevel.OutsideEnemies, enemy, outsideSpawnRarity.Compute(eventType)); Manager.Spawn.InsideEnemies(enemy, Random.Range(minInside.Compute(eventType), maxInside.Compute(eventType) + 1)); Manager.Spawn.OutsideEnemies(enemy, Random.Range(minOutside.Compute(eventType), maxOutside.Compute(eventType) + 1)); } } public class ScrapTransmutationEvent { public Scale amount; public SpawnableItemWithRarity[] items; public ScrapTransmutationEvent(Scale amount, params SpawnableItemWithRarity[] items) { this.items = items; this.amount = amount; } public void Execute() { Manager.TransmuteScrap(amount.Computef(EventType.Neutral), items); } } public List Descriptions = new List { "" }; public string ColorHex = "#FFFFFF"; public int Weight = 1; public EventType Type = EventType.Neutral; public bool Enabled = true; public bool isSpecialEvent = false; public bool isBetaEvent = false; public bool showTip = false; public List TipMessages = new List { "" }; public List TipTitle = new List { "" }; public bool isWarning = true; public Dictionary ScaleList = new Dictionary(); public List EventsToRemove = new List(); public bool MoonMode = false; public List Blacklist = new List(); public List Whitelist = new List(); public List EventsToSpawnWith = new List(); public bool Executed = false; public bool Active = false; public bool SpeedRunSafe = true; public List Aliases = new List(); public List monstersToSpawn = new List(); public ScrapTransmutationEvent scrapTransmutationEvent = new ScrapTransmutationEvent(new Scale(0f, 0f, 0f, 0f)); internal static Dictionary ScaleInfoList = new Dictionary { { ScaleType.InsideEnemyRarity, "시설 내부 적 목록에 희귀도와 함께 추가됩니다." }, { ScaleType.OutsideEnemyRarity, "시설 외부 적 목록에 희귀도와 함께 추가됩니다." }, { ScaleType.DaytimeEnemyRarity, "낮 시간 적 목록에 희귀도와 함께 추가됩니다." }, { ScaleType.MinOutsideEnemy, "외부에 최소한 이만큼은 스폰됩니다." }, { ScaleType.MaxOutsideEnemy, "외부에 최대 이만큼까지 스폰됩니다." }, { ScaleType.MinInsideEnemy, "내부에 최소한 이만큼은 스폰됩니다." }, { ScaleType.MaxInsideEnemy, "내부에 최대 이만큼까지 스폰됩니다." }, { ScaleType.ScrapValue, "스크랩 가치에 곱해지는 배율입니다." }, { ScaleType.ScrapAmount, "스크랩 수량에 곱해지는 배율입니다." }, { ScaleType.FactorySize, "공장(시설) 크기에 곱해지는 배율입니다." }, { ScaleType.MinDensity, "선택되는 최소 밀도 값입니다." }, { ScaleType.MaxDensity, "선택되는 최대 밀도 값입니다." }, { ScaleType.MinCash, "지급되는 최소 현금입니다." }, { ScaleType.MaxCash, "지급되는 최대 현금입니다." }, { ScaleType.MinItemAmount, "스폰되는 최소 아이템 수입니다." }, { ScaleType.MaxItemAmount, "스폰되는 최대 아이템 수입니다." }, { ScaleType.MinValue, "선택되는 최솟값입니다." }, { ScaleType.MaxValue, "선택되는 최댓값입니다." }, { ScaleType.Rarity, "일반적인 발생 확률입니다." }, { ScaleType.MinRarity, "최소 발생 확률입니다." }, { ScaleType.MaxRarity, "최대 발생 확률입니다." }, { ScaleType.MinCut, "최소 차감 비율입니다." }, { ScaleType.MaxCut, "최대 차감 비율입니다." }, { ScaleType.MinHp, "선택될 수 있는 최소 체력입니다." }, { ScaleType.MaxHp, "선택될 수 있는 최대 체력입니다." }, { ScaleType.SpawnMultiplier, "스폰 확률에 곱해집니다." }, { ScaleType.SpawnCapMultiplier, "스폰 상한에 곱해집니다." }, { ScaleType.MaxInsideEnemyCount, "내부에 스폰 가능한 적 최대 수를 변경합니다." }, { ScaleType.MaxOutsideEnemyCount, "외부에 스폰 가능한 적 최대 수를 변경합니다." }, { ScaleType.MinPercentageCut, "최소 비율(%) 차감입니다." }, { ScaleType.MaxPercentageCut, "최대 비율(%) 차감입니다." }, { ScaleType.MinAmount, "선택되는 최소 수량입니다." }, { ScaleType.MaxAmount, "선택되는 최대 수량입니다." }, { ScaleType.Percentage, "0.0~1.0 사이 값입니다." }, { ScaleType.TimeSettings, "시간 스케일 배율입니다." }, { ScaleType.TimeMin, "선택되는 최소 시간입니다." }, { ScaleType.TimeMax, "선택되는 최대 시간입니다." }, { ScaleType.MinPercentSelected, "선택되는 최소 비율(%)입니다." }, { ScaleType.MaxPercentSelected, "선택되는 최대 비율(%)입니다." }, { ScaleType.ObjectWidth, "내비메시 가장자리에서 얼마나 가까이 오브젝트가 스폰될 수 있는지입니다." }, { ScaleType.minMold, "선택되는 최소 곰팡이(몰드) 양입니다." }, { ScaleType.maxMold, "선택되는 최대 곰팡이(몰드) 양입니다." } }; public virtual string Name() { return ""; } public virtual void Initalize() { } public virtual bool AddEventIfOnly() { return true; } public virtual void Execute() { } public virtual void OnShipLeave() { } public virtual void OnGameStart() { } public virtual void OnLocalDisconnect() { } public virtual float Getf(ScaleType scaleType) { try { return Scale.Compute(ScaleList[scaleType], Type); } catch { Log.LogError($"Scalar '{scaleType.ToString()}' for '{Name()}' not found, returning 0."); } return 0f; } public int Get(ScaleType scaleType) { return (int)Getf(scaleType); } public void ExecuteAllMonsterEvents() { foreach (MonsterEvent item in monstersToSpawn) { item.Execute(); } } public static MEvent GetEvent(string name) { string name2 = name; int num = EventManager.events.FindIndex((MEvent x) => x.Name() == name2); if (num != -1) { return EventManager.events[num]; } Log.LogError($"Event '{name2}' dosen't exist, returning nothing event"); return new Nothing(); } } [Serializable] public struct Weather : INetworkSerializable, IEquatable { public LevelWeatherType weatherType; public float scrapValueMultiplier; public float scrapAmountMultiplier; public Weather(LevelWeatherType weatherType, float scrapValueMultiplier, float scrapAmountMultiplier) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0003: Unknown result type (might be due to invalid IL or missing references) this.weatherType = weatherType; this.scrapValueMultiplier = scrapValueMultiplier; this.scrapAmountMultiplier = scrapAmountMultiplier; } public static Weather operator *(Weather left, Weather right) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) return new Weather(left.weatherType, left.scrapValueMultiplier * right.scrapValueMultiplier, left.scrapAmountMultiplier * right.scrapAmountMultiplier); } public void NetworkSerialize(BufferSerializer serializer) where T : IReaderWriter { //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: 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_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_009f: 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_000f: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) if (serializer.IsReader) { FastBufferReader fastBufferReader = serializer.GetFastBufferReader(); ((FastBufferReader)(ref fastBufferReader)).ReadValueSafe(ref weatherType, default(ForEnums)); ((FastBufferReader)(ref fastBufferReader)).ReadValueSafe(ref scrapValueMultiplier, default(ForPrimitives)); ((FastBufferReader)(ref fastBufferReader)).ReadValueSafe(ref scrapAmountMultiplier, default(ForPrimitives)); } else { FastBufferWriter fastBufferWriter = serializer.GetFastBufferWriter(); ((FastBufferWriter)(ref fastBufferWriter)).WriteValueSafe(ref weatherType, default(ForEnums)); ((FastBufferWriter)(ref fastBufferWriter)).WriteValueSafe(ref scrapValueMultiplier, default(ForPrimitives)); ((FastBufferWriter)(ref fastBufferWriter)).WriteValueSafe(ref scrapAmountMultiplier, default(ForPrimitives)); } } public bool Equals(Weather other) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Unknown result type (might be due to invalid IL or missing references) return weatherType == other.weatherType; } public static NetworkList InitalizeWeatherMultipliers(ref NetworkList currentWeatherMultipliers) { currentWeatherMultipliers.Add(Configuration.noneMultiplier); Log.LogInfo("Added None Multiplier: " + Configuration.noneMultiplier); currentWeatherMultipliers.Add(Configuration.dustCloudMultiplier); Log.LogInfo("Added DustCloud Multiplier: " + Configuration.dustCloudMultiplier); currentWeatherMultipliers.Add(Configuration.rainyMultiplier); Log.LogInfo("Added Rainy Multiplier: " + Configuration.rainyMultiplier); currentWeatherMultipliers.Add(Configuration.stormyMultiplier); Log.LogInfo("Added Stormy Multiplier: " + Configuration.stormyMultiplier); currentWeatherMultipliers.Add(Configuration.foggyMultiplier); Log.LogInfo("Added Foggy Multiplier: " + Configuration.foggyMultiplier); currentWeatherMultipliers.Add(Configuration.floodedMultiplier); Log.LogInfo("Added Flooded Multiplier: " + Configuration.floodedMultiplier); currentWeatherMultipliers.Add(Configuration.eclipsedMultiplier); Log.LogInfo("Added Eclipsed Multiplier: " + Configuration.eclipsedMultiplier); return currentWeatherMultipliers; } public static NetworkList RandomizeWeatherMultipliers(NetworkList currentWeatherMultipliers) { //IL_0041: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_006b: 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_0070: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Expected I4, but got Unknown if (!Configuration.randomizeWeatherMultipliers.Value) { return currentWeatherMultipliers; } for (int i = 0; i < currentWeatherMultipliers.Count; i++) { float value = Configuration.weatherRandomRandomMinInclusive.Value; float value2 = Configuration.weatherRandomRandomMaxInclusive.Value; Weather weather = new Weather(currentWeatherMultipliers[i].weatherType, Random.Range(value, value2), Random.Range(value, value2)); LevelWeatherType val = currentWeatherMultipliers[i].weatherType; LevelWeatherType val2 = val; switch (val2 - -1) { case 0: currentWeatherMultipliers[i] = weather * Configuration.noneMultiplier; break; case 1: currentWeatherMultipliers[i] = weather * Configuration.dustCloudMultiplier; break; case 2: currentWeatherMultipliers[i] = weather * Configuration.rainyMultiplier; break; case 3: currentWeatherMultipliers[i] = weather * Configuration.stormyMultiplier; break; case 4: currentWeatherMultipliers[i] = weather * Configuration.foggyMultiplier; break; case 5: currentWeatherMultipliers[i] = weather * Configuration.floodedMultiplier; break; case 6: currentWeatherMultipliers[i] = weather * Configuration.eclipsedMultiplier; break; } } return currentWeatherMultipliers; } } [HarmonyPatch] [HarmonyPatch(typeof(Terminal))] internal class WeatherTerminal { [HarmonyPrefix] [HarmonyPatch("TextPostProcess")] [HarmonyPriority(800)] public static void OnLoadNewNode(ref string modifiedDisplayText) { if (Configuration.useWeatherMultipliers.Value && Configuration.enableTerminalText.Value && modifiedDisplayText.Contains("Welcome to the exomoons catalogue")) { if (modifiedDisplayText.Contains("[planetTime]")) { Log.LogInfo("Text contains '[planetTime]' modifying terminal text using ModifyTextVanilla()"); ModifyTextVanilla(ref modifiedDisplayText); } else { Log.LogInfo("Text dosen't contain '[planetTime]' modifying terminal text using ModifyTextNonVanilla()"); ModifyTextNonVanilla(ref modifiedDisplayText); } } } private static void ModifyTextNonVanilla(ref string modifiedDisplayText) { //IL_0189: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) int num = modifiedDisplayText.IndexOf("INFO."); if (num > 0) { modifiedDisplayText = modifiedDisplayText.Insert(num + 5, "\nFormat: (xScrapValue, xScrapAmount)"); } List list = new List(); num = modifiedDisplayText.IndexOf("*") + 1; while (num > 0) { num = modifiedDisplayText.IndexOf("*", num + 1); list.Add(num); } list.Remove(-1); List list2 = new List(); for (int i = 0; i < list.Count - 1; i++) { list2.Add(modifiedDisplayText.Substring(list[i], list[i + 1] - list[i] - 1)); } list2.Add(modifiedDisplayText.Substring(list[list.Count - 1], modifiedDisplayText.Length - list[list.Count - 1] - 1)); string[] array = list2.ToArray(); for (int j = 0; j < list2.Count; j++) { bool flag = false; list2[j] = Regex.Replace(list2[j], "\\r|\\n", ""); if (list2[j] != array[j]) { flag = true; } num = list2[j].IndexOf("("); if (num > 0) { foreach (Weather currentWeatherMultiplier in Net.Instance.currentWeatherMultipliers) { string text = list2[j]; LevelWeatherType weatherType = currentWeatherMultiplier.weatherType; if (text.Contains(((object)(LevelWeatherType)(ref weatherType)).ToString())) { string value = " (x" + currentWeatherMultiplier.scrapValueMultiplier.ToString("F2", Configuration.en) + ", x" + currentWeatherMultiplier.scrapAmountMultiplier.ToString("F2", Configuration.en) + ")"; list2[j] = list2[j].Insert(list2[j].Length, value); } } } else { string text2 = "x" + Net.Instance.currentWeatherMultipliers[0].scrapValueMultiplier.ToString("F2", Configuration.en) + ", x" + Net.Instance.currentWeatherMultipliers[0].scrapAmountMultiplier.ToString("F2", Configuration.en); list2[j] = list2[j].Insert(list2[j].Length - 1, "( " + text2 + ")"); } if (flag) { list2[j] += "\r\n"; } } for (int k = 0; k < array.Length; k++) { modifiedDisplayText = modifiedDisplayText.Replace(array[k], list2[k]); } } private static void ModifyTextVanilla(ref string modifiedDisplayText) { //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0064: 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_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Invalid comparison between Unknown and I4 int num = modifiedDisplayText.IndexOf("INFO."); if (num > 0) { modifiedDisplayText = modifiedDisplayText.Insert(num + 5, "\nFormat: (xScrapValue, xScrapAmount)"); } int num2 = modifiedDisplayText.Split("[planetTime]").Length - 1; Regex regex = new Regex(Regex.Escape("[planetTime]")); for (int i = 0; i < num2 && i < Manager.currentTerminal.moonsCatalogueList.Length; i++) { LevelWeatherType currentWeather = Manager.currentTerminal.moonsCatalogueList[i].currentWeather; num = modifiedDisplayText.IndexOf("[planetTime]", num + 1); foreach (Weather currentWeatherMultiplier in Net.Instance.currentWeatherMultipliers) { if (currentWeatherMultiplier.weatherType == currentWeather) { string text = (((int)currentWeatherMultiplier.weatherType == -1) ? "" : " "); string replacement = "[planetTime]" + text + "(x" + currentWeatherMultiplier.scrapValueMultiplier.ToString("F2", Configuration.en) + ", x" + currentWeatherMultiplier.scrapAmountMultiplier.ToString("F2", Configuration.en) + ")"; modifiedDisplayText = regex.Replace(modifiedDisplayText, replacement, 1, num); } } } } } } namespace BrutalCompanyMinus.Minus.MonoBehaviours { [HarmonyPatch] internal class BerserkTurretsNet : NetworkBehaviour { public static BerserkTurretsNet instance; public void Awake() { if ((Object)(object)instance != (Object)null) { DestroyInstance(); } instance = this; Net.Instance.SetEventActiveServerRPC("BerserkTurrets", state: true); } public static void DestroyInstance() { BrutalCompanyMinus.Minus.Events.BerserkTurrets.Instance.Active = false; GameObject val = GameObject.Find("BerserkTurretsEvent"); if ((Object)(object)val != (Object)null) { Object.Destroy((Object)(object)val); } } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "ShipLeave")] public static void OnShipLeave() { DestroyInstance(); } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "EndGameServerRpc")] public static void DestroyForGodsSake() { DestroyInstance(); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "BerserkTurretsNet"; } } [HarmonyPatch] internal class DoorCircuitFailureNet : NetworkBehaviour { public static DoorCircuitFailureNet instance; public void Awake() { if ((Object)(object)instance != (Object)null) { DestroyInstance(); } instance = this; Net.Instance.SetEventActiveServerRPC("DoorCircuitFailure", state: true); } public static void DestroyInstance() { DoorCircuitFailure.Instance.Active = false; GameObject val = GameObject.Find("DoorCircuitFailureEvent"); if ((Object)(object)val != (Object)null) { Object.Destroy((Object)(object)val); } } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "ShipLeave")] public static void OnShipLeave() { DestroyInstance(); } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "EndGameServerRpc")] public static void DestroyForGodsSake() { DestroyInstance(); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "DoorCircuitFailureNet"; } } [HarmonyPatch] internal class DoorFailureFailureNet : NetworkBehaviour { public static DoorFailureFailureNet instance; public void Awake() { if ((Object)(object)instance != (Object)null) { DestroyInstance(); } instance = this; Net.Instance.SetEventActiveServerRPC("DoorFailure", state: true); } public static void DestroyInstance() { DoorFailure.Instance.Active = false; TimeOfDay.Instance.globalTimeSpeedMultiplier = 1f; GameObject val = GameObject.Find("DoorFailureEvent"); if ((Object)(object)val != (Object)null) { Object.Destroy((Object)(object)val); } } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "ShipLeave")] public static void OnShipLeave() { DestroyInstance(); } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "EndGameServerRpc")] public static void DestroyForGodsSake() { DestroyInstance(); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "DoorFailureFailureNet"; } } [HarmonyPatch] internal class DoorOverDriveNet : NetworkBehaviour { public static DoorOverDriveNet instance; public void Awake() { if ((Object)(object)instance != (Object)null) { DestroyInstance(); } instance = this; Net.Instance.SetEventActiveServerRPC("DoorOverdriveEv", state: true); } public static void DestroyInstance() { DoorOverdriveEv.Instance.Active = false; GameObject val = GameObject.Find("DoorOverdriveEvEvent"); if ((Object)(object)val != (Object)null) { Object.Destroy((Object)(object)val); } } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "ShipLeave")] public static void OnShipLeave() { DestroyInstance(); } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "EndGameServerRpc")] public static void DestroyForGodsSake() { DestroyInstance(); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "DoorOverDriveNet"; } } [HarmonyPatch] internal class ItemChargerFailureNet : NetworkBehaviour { public static ItemChargerFailureNet instance; public void Awake() { if ((Object)(object)instance != (Object)null) { DestroyInstance(); } instance = this; Net.Instance.SetEventActiveServerRPC("ItemChargerFailure", state: true); } public static void DestroyInstance() { ItemChargerFailure.Instance.Active = false; GameObject val = GameObject.Find("ItemChargerFailureEvent"); if ((Object)(object)val != (Object)null) { Object.Destroy((Object)(object)val); } } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "ShipLeave")] public static void OnShipLeave() { DestroyInstance(); } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "EndGameServerRpc")] public static void DestroyForGodsSake() { DestroyInstance(); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "ItemChargerFailureNet"; } } [HarmonyPatch] internal class JetpackFailureNet : NetworkBehaviour { public static JetpackFailureNet instance; public void Awake() { if ((Object)(object)instance != (Object)null) { DestroyInstance(); } instance = this; Net.Instance.SetEventActiveServerRPC("JetpackFailure", state: true); } public static void DestroyInstance() { JetpackFailure.Instance.Active = false; GameObject val = GameObject.Find("JetPackFailureEvent"); if ((Object)(object)val != (Object)null) { Object.Destroy((Object)(object)val); } } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "ShipLeave")] public static void OnShipLeave() { DestroyInstance(); } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "EndGameServerRpc")] public static void DestroyForGodsSake() { DestroyInstance(); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "JetpackFailureNet"; } } [HarmonyPatch] internal class LeverNet : NetworkBehaviour { public static LeverNet instance; public void Awake() { if ((Object)(object)instance != (Object)null) { DestroyInstance(); } instance = this; Net.Instance.SetEventActiveServerRPC("LeverFailure", state: true); } public static void DestroyInstance() { LeverFailure.Instance.Active = false; GameObject val = GameObject.Find("LeverEvent"); if ((Object)(object)val != (Object)null) { Object.Destroy((Object)(object)val); } } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "ShipLeave")] public static void OnShipLeave() { DestroyInstance(); } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "EndGameServerRpc")] public static void DestroyForGodsSake() { DestroyInstance(); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "LeverNet"; } } [HarmonyPatch] internal class ManualCameraFailureNet : NetworkBehaviour { public static ManualCameraFailureNet instance; public void Awake() { if ((Object)(object)instance != (Object)null) { DestroyInstance(); } instance = this; Net.Instance.SetEventActiveServerRPC("ManualCameraFailure", state: true); } public static void DestroyInstance() { ManualCameraFailure.Active = false; GameObject val = GameObject.Find("ManualCameraFailureEvent"); if ((Object)(object)val != (Object)null) { Object.Destroy((Object)(object)val); } } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "ShipLeave")] public static void OnShipLeave() { DestroyInstance(); } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "EndGameServerRpc")] public static void DestroyForGodsSake() { DestroyInstance(); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "ManualCameraFailureNet"; } } [HarmonyPatch] internal class ShipLightsFailureNet : NetworkBehaviour { public static ShipLightsFailureNet instance; public void Awake() { if ((Object)(object)instance != (Object)null) { DestroyInstance(); } instance = this; Net.Instance.SetEventActiveServerRPC("ShipLightsFailure", state: true); } public static void DestroyInstance() { ShipLightsFailure.Instance.Active = false; GameObject val = GameObject.Find("ShipLightsFailureEvent"); if ((Object)(object)val != (Object)null) { Object.Destroy((Object)(object)val); } } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "ShipLeave")] public static void OnShipLeave() { DestroyInstance(); } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "EndGameServerRpc")] public static void DestroyForGodsSake() { DestroyInstance(); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "ShipLightsFailureNet"; } } [HarmonyPatch] internal class TargetingFailureNet : NetworkBehaviour { public static TargetingFailureNet instance; public void Awake() { if ((Object)(object)instance != (Object)null) { DestroyInstance(); } instance = this; Net.Instance.SetEventActiveServerRPC("TargetingFailureEvent", state: true); } public static void DestroyInstance() { TargetingFailureEvent.Instance.Active = false; GameObject val = GameObject.Find("TargetingFailureEvent"); if ((Object)(object)val != (Object)null) { Object.Destroy((Object)(object)val); } } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "ShipLeave")] public static void OnShipLeave() { DestroyInstance(); } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "EndGameServerRpc")] public static void DestroyForGodsSake() { DestroyInstance(); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "TargetingFailureNet"; } } [HarmonyPatch] internal class TeleporterFailureNet : NetworkBehaviour { public static TeleporterFailureNet instance; public void Awake() { if ((Object)(object)instance != (Object)null) { DestroyInstance(); } instance = this; Net.Instance.SetEventActiveServerRPC("TeleporterFailure", state: true); } public static void DestroyInstance() { TeleporterFailure.Instance.Active = false; GameObject val = GameObject.Find("TeleporterFailureEvent"); if ((Object)(object)val != (Object)null) { Object.Destroy((Object)(object)val); } } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "ShipLeave")] public static void OnShipLeave() { DestroyInstance(); } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "EndGameServerRpc")] public static void DestroyForGodsSake() { DestroyInstance(); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "TeleporterFailureNet"; } } [HarmonyPatch] internal class TerminalFailureNet : NetworkBehaviour { public static TerminalFailureNet instance; public void Awake() { if ((Object)(object)instance != (Object)null) { DestroyInstance(); } instance = this; Net.Instance.SetEventActiveServerRPC("TerminalFailure", state: true); } public static void DestroyInstance() { TerminalFailure.Instance.Active = false; TimeOfDay.Instance.globalTimeSpeedMultiplier = 1f; GameObject val = GameObject.Find("TerminalFailureEvent"); if ((Object)(object)val != (Object)null) { Object.Destroy((Object)(object)val); } } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "ShipLeave")] public static void OnShipLeave() { DestroyInstance(); } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "EndGameServerRpc")] public static void DestroyForGodsSake() { DestroyInstance(); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "TerminalFailureNet"; } } [HarmonyPatch] internal class TrapsFailureNet : NetworkBehaviour { public static TrapsFailureNet instance; public void Awake() { if ((Object)(object)instance != (Object)null) { DestroyInstance(); } instance = this; Net.Instance.SetEventActiveServerRPC("TrapsFailure", state: true); } public static void DestroyInstance() { TrapsFailure.Instance.Active = false; GameObject val = GameObject.Find("TrapsFailureEvent"); if ((Object)(object)val != (Object)null) { Object.Destroy((Object)(object)val); } } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "ShipLeave")] public static void OnShipLeave() { DestroyInstance(); } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "EndGameServerRpc")] public static void DestroyForGodsSake() { DestroyInstance(); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "TrapsFailureNet"; } } [HarmonyPatch] internal class WalkieFailureNet : NetworkBehaviour { public static WalkieFailureNet instance; public void Awake() { if ((Object)(object)instance != (Object)null) { DestroyInstance(); } instance = this; Net.Instance.SetEventActiveServerRPC("WalkieFailure", state: true); } public static void DestroyInstance() { WalkieFailure.Instance.Active = false; GameObject val = GameObject.Find("WalkieFailureEvent"); if ((Object)(object)val != (Object)null) { Object.Destroy((Object)(object)val); } } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "ShipLeave")] public static void OnShipLeave() { DestroyInstance(); } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "EndGameServerRpc")] public static void DestroyForGodsSake() { DestroyInstance(); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "WalkieFailureNet"; } } public class AntiCoilHeadAI : EnemyAI { public AISearchRoutine searchForPlayers; private float checkLineOfSightInterval; private bool hasEnteredChaseMode; private bool stoppingMovement; private bool hasStopped; public AnimationStopPoints animStopPoints; private float currentChaseSpeed = 14.5f; private float currentAnimSpeed = 1f; private PlayerControllerB? previousTarget; private bool wasOwnerLastFrame; private float stopAndGoMinimumInterval; private float timeSinceHittingPlayer; public AudioClip[] springNoises; public Collider mainCollider; public override void DoAIInterval() { //IL_0094: 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_00a3: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_0168: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).DoAIInterval(); if (StartOfRound.Instance.allPlayersDead || base.isEnemyDead) { return; } switch (base.currentBehaviourStateIndex) { case 0: { if (!((NetworkBehaviour)this).IsServer) { ((EnemyAI)this).ChangeOwnershipOfEnemy(StartOfRound.Instance.allPlayerScripts[0].actualClientId); break; } for (int i = 0; i < 4; i++) { if (((EnemyAI)this).PlayerIsTargetable(StartOfRound.Instance.allPlayerScripts[i], false, false, true) && !Physics.Linecast(((Component)this).transform.position + Vector3.up * 0.5f, ((Component)StartOfRound.Instance.allPlayerScripts[i].gameplayCamera).transform.position, StartOfRound.Instance.collidersAndRoomMaskAndDefault) && Vector3.Distance(((Component)this).transform.position, ((Component)StartOfRound.Instance.allPlayerScripts[i]).transform.position) < 30f) { ((EnemyAI)this).SwitchToBehaviourState(1); return; } } base.agent.speed = 6f; if (!searchForPlayers.inProgress) { base.movingTowardsTargetPlayer = false; ((EnemyAI)this).StartSearch(((Component)this).transform.position, searchForPlayers); } break; } case 1: if (searchForPlayers.inProgress) { ((EnemyAI)this).StopSearch(searchForPlayers, true); } if (((EnemyAI)this).TargetClosestPlayer(1.5f, false, 70f, false, false, true)) { if ((Object)(object)previousTarget != (Object)(object)base.targetPlayer) { previousTarget = base.targetPlayer; ((EnemyAI)this).ChangeOwnershipOfEnemy(base.targetPlayer.actualClientId); } base.movingTowardsTargetPlayer = true; } else { ((EnemyAI)this).SwitchToBehaviourState(0); ((EnemyAI)this).ChangeOwnershipOfEnemy(StartOfRound.Instance.allPlayerScripts[0].actualClientId); } break; } } public override void Update() { //IL_026f: Unknown result type (might be due to invalid IL or missing references) //IL_0390: Unknown result type (might be due to invalid IL or missing references) //IL_039b: Unknown result type (might be due to invalid IL or missing references) //IL_0293: Unknown result type (might be due to invalid IL or missing references) //IL_02a7: 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_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Update(); if (base.isEnemyDead) { return; } if (timeSinceHittingPlayer >= 0f) { timeSinceHittingPlayer -= Time.deltaTime; } int currentBehaviourStateIndex = base.currentBehaviourStateIndex; if (currentBehaviourStateIndex == 0 || currentBehaviourStateIndex != 1) { return; } if (((NetworkBehaviour)this).IsOwner) { if (stopAndGoMinimumInterval > 0f) { stopAndGoMinimumInterval -= Time.deltaTime; } if (!wasOwnerLastFrame) { wasOwnerLastFrame = true; if (!stoppingMovement && timeSinceHittingPlayer < 0.12f) { base.agent.speed = currentChaseSpeed; } else { base.agent.speed = 0f; } } bool flag = true; for (int i = 0; i < 4; i++) { if (((EnemyAI)this).PlayerIsTargetable(StartOfRound.Instance.allPlayerScripts[i], false, false, true) && StartOfRound.Instance.allPlayerScripts[i].HasLineOfSightToPosition(((Component)this).transform.position + Vector3.up * 1.6f, 68f, 60, -1f, -1) && Vector3.Distance(((Component)StartOfRound.Instance.allPlayerScripts[i].gameplayCamera).transform.position, base.eye.position) > 0.3f) { flag = false; } } if (base.stunNormalizedTimer > 0f) { flag = true; } if (flag != stoppingMovement && stopAndGoMinimumInterval <= 0f) { stopAndGoMinimumInterval = 0.15f; if (flag) { SetAnimationStopServerRpc(); } else { SetAnimationGoServerRpc(); } stoppingMovement = flag; } } if (stoppingMovement) { if (!animStopPoints.canAnimationStop) { return; } if (!hasStopped) { hasStopped = true; if (GameNetworkManager.Instance.localPlayerController.HasLineOfSightToPosition(((Component)this).transform.position, 70f, 25, -1f, -1)) { float num = Vector3.Distance(((Component)this).transform.position, ((Component)GameNetworkManager.Instance.localPlayerController).transform.position); if (num < 4f) { GameNetworkManager.Instance.localPlayerController.JumpToFearLevel(0.9f, true); } else if (num < 9f) { GameNetworkManager.Instance.localPlayerController.JumpToFearLevel(0.4f, true); } } if (currentAnimSpeed > 2f) { RoundManager.PlayRandomClip(base.creatureVoice, springNoises, false, 1f, 0, 1000); if (animStopPoints.animationPosition == 1) { base.creatureAnimator.SetTrigger("springBoing"); } else { base.creatureAnimator.SetTrigger("springBoingPosition2"); } } } if (mainCollider.isTrigger && Vector3.Distance(((Component)GameNetworkManager.Instance.localPlayerController).transform.position, ((Component)this).transform.position) > 0.25f) { mainCollider.isTrigger = false; } base.creatureAnimator.SetFloat("walkSpeed", 0f); currentAnimSpeed = 0f; if (((NetworkBehaviour)this).IsOwner) { base.agent.speed = 0f; } } else { if (hasStopped) { hasStopped = false; mainCollider.isTrigger = true; } currentAnimSpeed = Mathf.Lerp(currentAnimSpeed, 6f, 5f * Time.deltaTime); base.creatureAnimator.SetFloat("walkSpeed", currentAnimSpeed); if (((NetworkBehaviour)this).IsOwner) { base.agent.speed = Mathf.Lerp(base.agent.speed, currentChaseSpeed, 4.5f * Time.deltaTime); } } } [ServerRpc] public void SetAnimationStopServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: 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_00c2: 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)((NetworkBehaviour)this).__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(2817700276u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2817700276u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetAnimationStopClientRpc(); } } [ClientRpc] public void SetAnimationStopClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2307802674u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2307802674u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; stoppingMovement = true; } } } [ServerRpc] public void SetAnimationGoServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: 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_00c2: 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)((NetworkBehaviour)this).__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(1927665513u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1927665513u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetAnimationGoClientRpc(); } } [ClientRpc] public void SetAnimationGoClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2701346570u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2701346570u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; stoppingMovement = false; } } } public override void OnCollideWithPlayer(Collider other) { //IL_005c: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).OnCollideWithPlayer(other); if (!stoppingMovement && base.currentBehaviourStateIndex == 1 && !(timeSinceHittingPlayer >= 0f)) { PlayerControllerB component = ((Component)other).gameObject.GetComponent(); if ((Object)(object)component != (Object)null) { timeSinceHittingPlayer = 0.2f; component.DamagePlayer(90, true, true, (CauseOfDeath)6, 2, false, default(Vector3)); component.JumpToFearLevel(1f, true); } } } protected override void __initializeVariables() { ((EnemyAI)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2817700276u, new RpcReceiveHandler(__rpc_handler_2817700276), "SetAnimationStopServerRpc"); ((NetworkBehaviour)this).__registerRpc(2307802674u, new RpcReceiveHandler(__rpc_handler_2307802674), "SetAnimationStopClientRpc"); ((NetworkBehaviour)this).__registerRpc(1927665513u, new RpcReceiveHandler(__rpc_handler_1927665513), "SetAnimationGoServerRpc"); ((NetworkBehaviour)this).__registerRpc(2701346570u, new RpcReceiveHandler(__rpc_handler_2701346570), "SetAnimationGoClientRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_2817700276(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((AntiCoilHeadAI)(object)target).SetAnimationStopServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2307802674(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((AntiCoilHeadAI)(object)target).SetAnimationStopClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1927665513(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((AntiCoilHeadAI)(object)target).SetAnimationGoServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2701346570(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((AntiCoilHeadAI)(object)target).SetAnimationGoClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "AntiCoilHeadAI"; } } [HarmonyPatch] internal class ArtilleryShell : MonoBehaviour { public Transform transform; public static float speed = 100f; private float timeTillExplode = 1f; public Vector3 target = Vector3.zero; private void Start() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) transform.LookAt(target); timeTillExplode = Vector3.Distance(transform.position, target) / speed; } private void Update() { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0027: 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) //IL_0066: Unknown result type (might be due to invalid IL or missing references) Transform obj = transform; obj.position += transform.forward * Time.deltaTime * speed; if (timeTillExplode > 0f) { timeTillExplode -= Time.deltaTime; return; } try { Landmine.SpawnExplosion(transform.position, true, 5f, 6f, 50, 0f, (GameObject)null, false); } catch { } Object.Destroy((Object)(object)((Component)transform).gameObject); } public static void FireAt(Vector3 at, Vector3 from) { //IL_0005: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) Net.Instance.FireAtServerRpc(at, from); } } internal class BunkerLadderPassage : Passage { internal BunkerLid bunkerLid; public override void TeleportPlayer() { base.TeleportPlayer(); PlayAudioAtTeleportPositionsServerRpc(); bunkerLid.ToggleLidServerRpc(_state: true); } protected override void __initializeVariables() { base.__initializeVariables(); } protected override void __initializeRpcs() { base.__initializeRpcs(); } protected internal override string __getTypeName() { return "BunkerLadderPassage"; } } internal class BunkerLid : NetworkBehaviour { public Animator animator; public AudioSource bunkerAudio; public GameObject passageInteractTrigger; public InteractTrigger bunkerInteractTrigger; public bool state = false; public void Start() { passageInteractTrigger.SetActive(false); } [ServerRpc(RequireOwnership = false)] public void ToggleLidServerRpc(bool _state) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2641716483u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref _state, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2641716483u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ToggleLidClientRpc(_state); } } } [ServerRpc(RequireOwnership = false)] public void ToggleLidServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2841680999u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2841680999u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; ToggleLidClientRpc(!state); } } } [ClientRpc] private void ToggleLidClientRpc(bool newState) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3863517122u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref newState, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3863517122u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; if (newState != state) { state = newState; bunkerAudio.Play(); animator.SetBool("Open", newState); passageInteractTrigger.SetActive(newState); bunkerInteractTrigger.hoverTip = (newState ? "Close [LMB]" : "Open [LMB]"); } } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2641716483u, new RpcReceiveHandler(__rpc_handler_2641716483), "ToggleLidServerRpc"); ((NetworkBehaviour)this).__registerRpc(2841680999u, new RpcReceiveHandler(__rpc_handler_2841680999), "ToggleLidServerRpc"); ((NetworkBehaviour)this).__registerRpc(3863517122u, new RpcReceiveHandler(__rpc_handler_3863517122), "ToggleLidClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_2641716483(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool flag = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref flag, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((BunkerLid)(object)target).ToggleLidServerRpc(flag); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2841680999(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((BunkerLid)(object)target).ToggleLidServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3863517122(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool newState = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref newState, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((BunkerLid)(object)target).ToggleLidClientRpc(newState); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "BunkerLid"; } } internal class BunkerLidPassage : Passage { internal BunkerLid bunkerLid; public override void TeleportPlayer() { base.TeleportPlayer(); PlayAudioAtTeleportPositionsServerRpc(); bunkerLid.ToggleLidServerRpc(_state: false); } protected override void __initializeVariables() { base.__initializeVariables(); } protected override void __initializeRpcs() { base.__initializeRpcs(); } protected internal override string __getTypeName() { return "BunkerLidPassage"; } } [HarmonyPatch] internal class DDay : NetworkBehaviour { public static float currentTime = 0f; public static float bombardmentCurrentTime = 0f; public static float fireCurrentTime = 0f; public static float bombardmentInterval = 100f; public static float bombardmentTime = 15f; public static float fireInterval = 1f; public static int fireAmount = 8; public static bool displayedBombardmentWarning = false; public static bool displayWarning = true; private static float fireAmountMultiplier = 1f; private static int seed = 2352; public static DDay instance; public AudioSource sirensClose; public AudioSource sirensFar; public Transform transform; public static float volume = 0.3f; private List spawnDenialNodes = new List(); private LayerMask triggerLayerMask = LayerMask.op_Implicit(8192); public void Start() { //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) if ((Object)(object)instance != (Object)null) { DestroyInstance(); } instance = this; spawnDenialNodes = Helper.GetSpawnDenialNodes(); currentTime = 15f; sirensClose.volume = volume; sirensFar.volume = volume; triggerLayerMask = LayerMask.op_Implicit(LayerMask.GetMask(new string[1] { "Triggers" })); } public void Update() { //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_017a: Unknown result type (might be due to invalid IL or missing references) //IL_0199: 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) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01d1: Unknown result type (might be due to invalid IL or missing references) //IL_01d6: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01eb: 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_01f4: Unknown result type (might be due to invalid IL or missing references) //IL_01f9: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Unknown result type (might be due to invalid IL or missing references) //IL_0225: 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_0223: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) if (!Warzone.Active || !((NetworkBehaviour)RoundManager.Instance).IsHost) { return; } if (currentTime > 0f) { currentTime -= Time.deltaTime; } else { float num = Mathf.Clamp(Manager.terrainArea / 9700f, 1f, 3f); currentTime = bombardmentInterval; bombardmentCurrentTime = bombardmentTime; displayedBombardmentWarning = false; } if (currentTime <= 15f && !displayedBombardmentWarning) { instance.PlayServerRpc(); if (displayWarning) { Net.Instance.DisplayTipServerRpc("BOMBARDMENT IN 15 SECONDS", "TAKE COVER!!!", isWarning: true); } displayedBombardmentWarning = true; } if (bombardmentCurrentTime > 0f) { bombardmentCurrentTime -= Time.deltaTime; fireCurrentTime -= Time.deltaTime; } if (!(fireCurrentTime < 0f)) { return; } fireCurrentTime = fireInterval; seed++; Random random = new Random(seed); for (int i = 0; (float)i < (float)fireAmount * fireAmountMultiplier; i++) { int num2 = 0; if (num2 < 4) { random = new Random(seed++); Vector3 val = Manager.outsideObjectSpawnNodes[random.Next(Manager.outsideObjectSpawnNodes.Count)]; val += new Vector3((float)random.Next(-75, 75), 0f, (float)random.Next(-75, 75)); Vector3 val2 = val + new Vector3((float)random.Next(-100, 100), (float)random.Next(500, 800), (float)random.Next(-100, 100)); RaycastHit val3 = default(RaycastHit); Vector3 val4 = val - val2; if (Physics.Raycast(new Ray(val2, ((Vector3)(ref val4)).normalized), ref val3, 1000f, ~LayerMask.op_Implicit(triggerLayerMask))) { val = ((RaycastHit)(ref val3)).point; } if (Helper.IsSafe(val, spawnDenialNodes, 15f)) { ArtilleryShell.FireAt(val, val2); } } } } [ServerRpc(RequireOwnership = false)] public void PlayServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(4234545785u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 4234545785u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PlayClientRpc(); } } } [ClientRpc] public void PlayClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3677798468u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3677798468u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; sirensClose.Play(); sirensFar.Play(); } } } [ServerRpc(RequireOwnership = false)] public void StopServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3325677646u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3325677646u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; StopClientRpc(); } } } [ClientRpc] public void StopClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(4008721163u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 4008721163u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; sirensClose.Stop(); sirensFar.Stop(); } } } public static void SpawnInstance() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_002e: 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_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) Vector3 val = Vector3.zero; GameObject val2 = GameObject.Find("HangarShip"); if ((Object)(object)val2 != (Object)null) { val = val2.transform.position; } GameObject val3 = Object.Instantiate(Assets.artillerySirens, val, Quaternion.identity); val3.GetComponent().Spawn(true); Manager.objectsToClear.Add(val3); } public static void DestroyInstance() { Warzone.Active = false; try { NetworkObject component = ((Component)instance.transform).GetComponent(); component.Despawn(true); } catch { } } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "EndGameServerRpc")] public static void DestroyForGodsSake() { Warzone.Active = false; DestroyInstance(); } [HarmonyPostfix] [HarmonyPatch(typeof(StartOfRound), "OnShipLandedMiscEvents")] public static void OnShipLanded() { if (((NetworkBehaviour)RoundManager.Instance).IsHost && Warzone.Active) { SpawnInstance(); } } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(4234545785u, new RpcReceiveHandler(__rpc_handler_4234545785), "PlayServerRpc"); ((NetworkBehaviour)this).__registerRpc(3677798468u, new RpcReceiveHandler(__rpc_handler_3677798468), "PlayClientRpc"); ((NetworkBehaviour)this).__registerRpc(3325677646u, new RpcReceiveHandler(__rpc_handler_3325677646), "StopServerRpc"); ((NetworkBehaviour)this).__registerRpc(4008721163u, new RpcReceiveHandler(__rpc_handler_4008721163), "StopClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_4234545785(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((DDay)(object)target).PlayServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3677798468(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((DDay)(object)target).PlayClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3325677646(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((DDay)(object)target).StopServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4008721163(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((DDay)(object)target).StopClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "DDay"; } } [HarmonyPatch] public class EnemySpawnCycle : NetworkBehaviour { public enum SpawnLocation { Inside, Outside } public class SpawnCycle { public List enemies; public float spawnCycleDuration; public float spawnAttemptInterval; public float nothingWeight; public bool multiplyBySpawnCurve = true; private float currentSpawnAttemptIntervalTime; public bool Ellapse(float deltaTime) { spawnCycleDuration -= deltaTime; if (currentSpawnAttemptIntervalTime > 0f) { currentSpawnAttemptIntervalTime -= deltaTime; return false; } currentSpawnAttemptIntervalTime = spawnAttemptInterval; return true; } public bool EllapseOnlyInterval(float deltaTime) { if (currentSpawnAttemptIntervalTime > 0f) { currentSpawnAttemptIntervalTime -= deltaTime; return false; } currentSpawnAttemptIntervalTime = spawnAttemptInterval; return true; } public void Reset() { currentSpawnAttemptIntervalTime = spawnAttemptInterval * 0.33f; foreach (EnemySpawnInfo enemy in enemies) { enemy.Reset(); } } public void AttemptSpawnAll() { float num = (multiplyBySpawnCurve ? Instance.GetChanceMultiplier() : 1f); Log.LogInfo($"--- Attempting to spawn with a nothingWeight of {nothingWeight} and chanceMultiplier of {num}"); foreach (EnemySpawnInfo enemy in enemies) { enemy.AttemptSpawn(allEnemiesCycle.nothingWeight, num); } } } public class EnemySpawnInfo { public GameObject enemy; public float enemyWeight; public int spawnCap; public SpawnLocation spawnLocation; private int currentSpawned; public void AttemptSpawn(float nothingWeight, float chanceMultiplier) { rng = new Random(Net.Instance._seed++); switch (spawnLocation) { case SpawnLocation.Inside: AttemptSpawnInside(nothingWeight, chanceMultiplier); break; case SpawnLocation.Outside: AttemptSpawnOutside(nothingWeight, chanceMultiplier); break; } } private void AttemptSpawnInside(float nothingWeight, float chanceMultiplier) { float num = enemyWeight * chanceMultiplier; Log.LogInfo($"### Attempting to spawn {((Object)enemy).name} at {num:F2} weight;"); if ((float)(rng.NextDouble() * (double)nothingWeight) <= num) { if (currentSpawned < spawnCap) { currentSpawned++; Manager.Spawn.InsideEnemies(enemy, 1); Manager.Spawn.DoSpawnInsideEnemies(); Log.LogInfo("!!! Succeeded spawning " + ((Object)enemy).name + " inside."); } } else { Log.LogInfo("Failed to spawn " + ((Object)enemy).name + " inside."); } } private void AttemptSpawnOutside(float nothingWeight, float chanceMultiplier) { float num = enemyWeight * chanceMultiplier; Log.LogInfo($"### Attempting to spawn {((Object)enemy).name} at {num:F2} weight;"); if ((float)(rng.NextDouble() * (double)nothingWeight) <= num) { if (currentSpawned < spawnCap) { currentSpawned++; Manager.Spawn.OutsideEnemies(enemy, 1); Manager.Spawn.DoSpawnOutsideEnemies(); Log.LogInfo("!!! Succeeded spawning " + ((Object)enemy).name + " outside."); } } else { Log.LogInfo("Failed to spawn " + ((Object)enemy).name + " outside."); } } public void Reset() { currentSpawned = 0; } } public static EnemySpawnCycle Instance; public static bool Active = false; public List spawnCycles; public static SpawnCycle allEnemiesCycle = new SpawnCycle(); public static SpawnCycle allAllEnemiesCycle = new SpawnCycle(); public static Random rng; private void Awake() { rng = new Random(Environment.TickCount); Instance = this; spawnCycles = new List(); } private void Update() { if (!Active) { return; } foreach (SpawnCycle spawnCycle in spawnCycles) { if (!(spawnCycle.spawnCycleDuration <= 0f) && spawnCycle.Ellapse(Time.deltaTime)) { spawnCycle.AttemptSpawnAll(); } } if (Configuration.enableAllEnemies.Value && allEnemiesCycle.EllapseOnlyInterval(Time.deltaTime)) { allEnemiesCycle.AttemptSpawnAll(); } if (Configuration.enableAllAllEnemies.Value && allAllEnemiesCycle.EllapseOnlyInterval(Time.deltaTime)) { allAllEnemiesCycle.AttemptSpawnAll(); } } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "ShipLeave")] private static void OnShipLeave() { Active = false; Instance.spawnCycles.Clear(); foreach (SpawnCycle spawnCycle in Instance.spawnCycles) { spawnCycle.Reset(); } allEnemiesCycle.Reset(); allAllEnemiesCycle.Reset(); allEnemiesCycle.enemies.Clear(); allAllEnemiesCycle.enemies.Clear(); } [HarmonyPostfix] [HarmonyPatch(typeof(StartOfRound), "openingDoorsSequence")] private static void OnGameStart() { if (EventManager.IsIgnoredMoon(StartOfRound.Instance.currentLevel.PlanetName)) { Active = false; } else { Active = true; } Log.LogInfo("Active State: " + Active); Instance.spawnCycles.Clear(); foreach (SpawnCycle spawnCycle in Instance.spawnCycles) { spawnCycle.Reset(); } allEnemiesCycle.Reset(); allAllEnemiesCycle.Reset(); } [HarmonyPrefix] [HarmonyPatch(typeof(RoundManager), "LoadNewLevel")] private static void OnLoadNewLevel() { if (EventManager.IsIgnoredMoon(StartOfRound.Instance.currentLevel.PlanetName)) { Active = false; } else { Active = true; } } private float GetChanceMultiplier() { float num = RoundManager.Instance.currentLevel.enemySpawnChanceThroughoutDay.Evaluate(RoundManager.Instance.timeScript.currentDayTime / RoundManager.Instance.timeScript.totalTime); if (num <= 0f) { return Mathf.Clamp(Mathf.Exp(num), 0.01f, 1f); } return Mathf.Clamp(Mathf.Log(num + MathF.E), 1f, 5f); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "EnemySpawnCycle"; } } [HarmonyPatch] [HarmonyPatch(typeof(Landmine))] public class GrabbableLandmine : GrabbableObject, IHittable { [CompilerGenerated] private sealed class d__53 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public GrabbableLandmine <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__53(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(5f); <>1__state = 1; return true; case 1: <>1__state = -1; ((Component)<>4__this).gameObject.GetComponent().Despawn(true); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__42 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public GrabbableLandmine <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__42(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Expected O, but got Unknown int num = <>1__state; if (num != 0) { if (num != 1) { return false; } <>1__state = -1; } else { <>1__state = -1; <>4__this.roundManager = Object.FindObjectOfType(); if ((Object)(object)<>4__this.roundManager == (Object)null) { goto IL_00d3; } if (<>4__this.roundManager.BreakerBoxRandom != null) { <>2__current = (object)new WaitForSeconds((float)<>4__this.roundManager.BreakerBoxRandom.NextDouble() + 0.5f); <>1__state = 1; return true; } } <>4__this.mineAnimator.SetTrigger("startIdle"); <>4__this.mineAudio.pitch = Random.Range(0.9f, 1.1f); goto IL_00d3; IL_00d3: return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__51 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public GrabbableLandmine mine; public GrabbableLandmine <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__51(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0065: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; if (!mine.hasExploded) { mine.mineAudio.pitch = Random.Range(0.75f, 1.07f); mine.hasExploded = true; <>2__current = (object)new WaitForSeconds(0.2f); <>1__state = 1; return true; } break; case 1: <>1__state = -1; mine.SetOffMineAnimation(); break; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__23 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Landmine __instance; private MEvent <_event>5__1; private float 5__2; private Random 5__3; private GameObject 5__4; private NetworkObject 5__5; private int 5__6; private int 5__7; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__23(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <_event>5__1 = null; 5__3 = null; 5__4 = null; 5__5 = null; <>1__state = -2; } private bool MoveNext() { //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: 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_0150: 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_0171: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <_event>5__1 = GrabbableLandmines.Instance; 5__2 = <_event>5__1.Getf(MEvent.ScaleType.Rarity); seed++; 5__3 = new Random(StartOfRound.Instance.randomMapSeed + seed); if (5__3.NextDouble() <= (double)5__2) { 5__4 = Object.Instantiate(Assets.grabbableLandmine.spawnPrefab, ((Component)__instance).transform.position, Quaternion.identity); 5__5 = 5__4.GetComponent(); 5__5.Spawn(false); Net.Instance.GenerateAndSyncTerminalCodeServerRpc(NetworkObjectReference.op_Implicit(((NetworkBehaviour)__instance).NetworkObject), 5__3.Next(RoundManager.Instance.possibleCodesForBigDoors.Length)); 5__6 = Random.Range(Assets.grabbableLandmine.minValue, Assets.grabbableLandmine.maxValue + 1); 5__7 = Mathf.RoundToInt((float)5__6 * RoundManager.Instance.scrapValueMultiplier * Manager.scrapValueMultiplier); Net.Instance.SyncScrapValueServerRpc(NetworkObjectReference.op_Implicit(5__5), 5__7); <>2__current = (object)new WaitForSeconds(5f); <>1__state = 1; return true; } break; case 1: <>1__state = -1; try { ((Component)((Component)__instance).transform.parent).gameObject.GetComponent().Despawn(true); } catch { } 5__4 = null; 5__5 = null; break; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private bool mineActivated = true; public bool hasExploded; public ParticleSystem explosionParticle; public Animator mineAnimator; public AudioSource mineAudio; public AudioSource mineFarAudio; public AudioSource mineTickSource; public AudioClip mineDetonate; public AudioClip mineTrigger; public AudioClip mineDetonateFar; public AudioClip mineDeactivate; public AudioClip minePress; private bool sendingExplosionRPC; private RaycastHit hit; private RoundManager roundManager; private float pressMineDebounceTimer; public bool localPlayerOnMine; public bool mineGrabbed = false; public bool onBlowUpSchedule = false; public float countDown = 0f; public float dropSafetyTime = 0f; private static int seed; [HarmonyPrefix] [HarmonyPatch("Start")] private static void onLandmineStart(ref Landmine __instance) { //IL_0054: Unknown result type (might be due to invalid IL or missing references) if (((NetworkBehaviour)RoundManager.Instance).IsHost) { if (GrabbableLandmines.Active) { ((MonoBehaviour)__instance).StartCoroutine(destroySelfAndReplace(__instance)); return; } seed++; Random random = new Random(seed); Net.Instance.GenerateAndSyncTerminalCodeServerRpc(NetworkObjectReference.op_Implicit(((NetworkBehaviour)__instance).NetworkObject), random.Next(RoundManager.Instance.possibleCodesForBigDoors.Length)); } } [IteratorStateMachine(typeof(d__23))] private static IEnumerator destroySelfAndReplace(Landmine __instance) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__23(0) { __instance = __instance }; } public override void Start() { ((MonoBehaviour)this).StartCoroutine(StartIdleAnimation()); ((GrabbableObject)this).Start(); dropSafetyTime = 2f; mineGrabbed = true; } public override void Update() { if (countDown > 0f) { countDown -= Time.deltaTime; } if (dropSafetyTime > 0f) { dropSafetyTime -= Time.deltaTime; } else { mineGrabbed = false; } if (countDown <= 0f && onBlowUpSchedule) { onBlowUpSchedule = false; dropSafetyTime = -1f; mineGrabbed = false; playMineTickSourceServerRpc(toggle: false); ExplodeMineServerRpc(); } if (pressMineDebounceTimer > 0f) { pressMineDebounceTimer -= Time.deltaTime; } if (localPlayerOnMine && GameNetworkManager.Instance.localPlayerController.teleportedLastFrame) { localPlayerOnMine = false; TriggerMineOnLocalClientByExiting(); } ((GrabbableObject)this).Update(); } private void OnGrab() { mineGrabbed = true; onBlowUpSchedule = true; dropSafetyTime = 6f; countDown = 6f; playMineTickSourceServerRpc(toggle: true); } [ServerRpc(RequireOwnership = false)] private void OnGrabServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2093032180u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2093032180u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; OnGrabClientRpc(); } } } [ClientRpc] private void OnGrabClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1876802964u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1876802964u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; OnGrab(); } } } private void OnDisacrd() { mineGrabbed = true; onBlowUpSchedule = false; dropSafetyTime = 1.5f; countDown = 0f; playMineTickSourceServerRpc(toggle: false); } [ServerRpc(RequireOwnership = false)] private void OnDiscardServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3834327495u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3834327495u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; OnDiscardClientRpc(); } } } [ClientRpc] private void OnDiscardClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2155830483u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2155830483u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; OnDisacrd(); } } } public override void GrabItem() { ((GrabbableObject)this).GrabItem(); OnGrab(); OnGrabServerRpc(); } public override void DiscardItem() { ((GrabbableObject)this).DiscardItem(); OnDisacrd(); OnDiscardServerRpc(); } public override void GrabItemFromEnemy(EnemyAI enemy) { ((GrabbableObject)this).GrabItemFromEnemy(enemy); OnGrab(); OnGrabServerRpc(); } public override void DiscardItemFromEnemy() { ((GrabbableObject)this).DiscardItemFromEnemy(); OnDisacrd(); OnDiscardServerRpc(); } [ServerRpc(RequireOwnership = false)] private void playMineTickSourceServerRpc(bool toggle) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1401067709u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref toggle, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1401067709u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; playMineTickSourceClientRpc(toggle); } } } [ClientRpc] private void playMineTickSourceClientRpc(bool toggle) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(506371000u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref toggle, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 506371000u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (toggle) { mineTickSource.Play(); } else { mineTickSource.Stop(); } } } public void ToggleMine(bool enabled) { if (mineActivated != enabled) { mineActivated = enabled; if (!enabled) { mineAudio.PlayOneShot(mineDeactivate); WalkieTalkie.TransmitOneShotAudio(mineAudio, mineDeactivate, 1f); } ToggleMineServerRpc(enabled); } } [ServerRpc(RequireOwnership = false)] public void ToggleMineServerRpc(bool enable) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1230610249u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref enable, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1230610249u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ToggleMineClientRpc(enable); } } } [ClientRpc] public void ToggleMineClientRpc(bool enable) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(67361316u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref enable, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 67361316u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ToggleMineEnabledLocalClient(enable); } } } public void ToggleMineEnabledLocalClient(bool enabled) { if (mineActivated != enabled) { mineActivated = enabled; if (!enabled) { mineAudio.PlayOneShot(mineDeactivate); WalkieTalkie.TransmitOneShotAudio(mineAudio, mineDeactivate, 1f); } } } [IteratorStateMachine(typeof(d__42))] private IEnumerator StartIdleAnimation() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__42(0) { <>4__this = this }; } private void OnTriggerEnter(Collider other) { if (hasExploded || pressMineDebounceTimer > 0f || mineGrabbed || GrabbableLandmines.LandmineDisabled || dropSafetyTime > 0f) { return; } Debug.Log((object)string.Format("Trigger entered mine: {0}; {1}; {2}", ((Component)other).tag, ((Component)other).CompareTag("Player") || ((Component)other).CompareTag("PlayerBody"), ((Component)other).CompareTag("PhysicsProp") || ((Component)other).tag.StartsWith("PlayerRagdoll"))); if (((Component)other).CompareTag("Player") || ((Component)other).CompareTag("PlayerBody")) { localPlayerOnMine = true; pressMineDebounceTimer = 0.5f; PressMineServerRpc(); } else { if (!((Component)other).CompareTag("PhysicsProp") && !((Component)other).tag.StartsWith("PlayerRagdoll")) { return; } if (Object.op_Implicit((Object)(object)((Component)other).GetComponent())) { if ((Object)(object)((Component)other).GetComponent().playerScript != (Object)(object)GameNetworkManager.Instance.localPlayerController) { return; } } else if (Object.op_Implicit((Object)(object)((Component)other).GetComponent()) && !((NetworkBehaviour)((Component)other).GetComponent()).NetworkObject.IsOwner) { return; } pressMineDebounceTimer = 0.5f; PressMineServerRpc(); } } [ServerRpc(RequireOwnership = false)] public void PressMineServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1995327364u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1995327364u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; PressMineClientRpc(); } } } [ClientRpc] public void PressMineClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(173368889u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 173368889u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; pressMineDebounceTimer = 0.5f; mineAudio.PlayOneShot(minePress); WalkieTalkie.TransmitOneShotAudio(mineAudio, minePress, 1f); } } } private void OnTriggerExit(Collider other) { if (hasExploded || !mineActivated || mineGrabbed || GrabbableLandmines.LandmineDisabled || dropSafetyTime > 0f) { return; } Debug.Log((object)("Object leaving mine trigger, gameobject name: " + ((Object)((Component)other).gameObject).name)); Debug.Log((object)string.Format("Trigger exited mine: {0}; ({1} / {2}) {3}; {4}", ((Component)other).tag, ((Object)((Component)other).gameObject).name, ((Object)((Component)other).transform).name, ((Component)other).CompareTag("Player") || ((Component)other).CompareTag("PlayerBody"), ((Component)other).CompareTag("PhysicsProp") || ((Component)other).tag.StartsWith("PlayerRagdoll"))); if (((Component)other).CompareTag("Player") || ((Component)other).CompareTag("PlayerBody")) { localPlayerOnMine = false; TriggerMineOnLocalClientByExiting(); } else { if (!((Component)other).tag.StartsWith("PlayerRagdoll") && !((Component)other).CompareTag("PhysicsProp")) { return; } if (Object.op_Implicit((Object)(object)((Component)other).GetComponent())) { if ((Object)(object)((Component)other).GetComponent().playerScript != (Object)(object)GameNetworkManager.Instance.localPlayerController) { return; } } else if (Object.op_Implicit((Object)(object)((Component)other).GetComponent()) && !((NetworkBehaviour)((Component)other).GetComponent()).NetworkObject.IsOwner) { return; } TriggerMineOnLocalClientByExiting(); } } private void TriggerMineOnLocalClientByExiting() { if (!hasExploded || !mineGrabbed || dropSafetyTime <= 0f) { SetOffMineAnimation(); sendingExplosionRPC = true; ExplodeMineServerRpc(); } } [ServerRpc(RequireOwnership = false)] public void ExplodeMineServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1510907801u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1510907801u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ExplodeMineClientRpc(); } } } [ClientRpc] public void ExplodeMineClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3821524699u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3821524699u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (sendingExplosionRPC) { sendingExplosionRPC = false; } else { SetOffMineAnimation(); } } } public void SetOffMineAnimation() { if (!(dropSafetyTime > 0f) && !mineGrabbed) { hasExploded = true; mineAnimator.SetTrigger("detonate"); mineAudio.PlayOneShot(mineTrigger, 1f); } } [IteratorStateMachine(typeof(d__51))] private IEnumerator TriggerOtherMineDelayed(GrabbableLandmine mine) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__51(0) { <>4__this = this, mine = mine }; } public void Detonate() { //IL_0055: Unknown result type (might be due to invalid IL or missing references) //IL_005a: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) if (!(dropSafetyTime > 0f) && !mineGrabbed) { mineAudio.pitch = Random.Range(0.93f, 1.07f); mineAudio.PlayOneShot(mineDetonate, 1f); SpawnExplosion(((Component)this).transform.position + Vector3.up, spawnExplosionEffect: false, 5.7f, 6.4f); if (NetworkManager.Singleton.IsServer) { ((MonoBehaviour)this).StartCoroutine(DestroyObject()); } } } [IteratorStateMachine(typeof(d__53))] private IEnumerator DestroyObject() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__53(0) { <>4__this = this }; } public static void SpawnExplosion(Vector3 explosionPosition, bool spawnExplosionEffect = false, float killRange = 1f, float damageRange = 1f) { //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_002e: 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_00c1: 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_0313: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f9: 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_0347: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Unknown result type (might be due to invalid IL or missing references) //IL_019a: 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) //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) //IL_01b4: Unknown result type (might be due to invalid IL or missing references) //IL_01ba: Unknown result type (might be due to invalid IL or missing references) //IL_02bf: Unknown result type (might be due to invalid IL or missing references) //IL_02c5: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Unknown result type (might be due to invalid IL or missing references) Debug.Log((object)"Spawning explosion at pos: {explosionPosition}"); if (spawnExplosionEffect) { Object.Instantiate(StartOfRound.Instance.explosionPrefab, explosionPosition, Quaternion.Euler(-90f, 0f, 0f), RoundManager.Instance.mapPropsContainer.transform).SetActive(true); } float num = Vector3.Distance(((Component)GameNetworkManager.Instance.localPlayerController).transform.position, explosionPosition); if (num < 14f) { HUDManager.Instance.ShakeCamera((ScreenShakeType)1); } else if (num < 25f) { HUDManager.Instance.ShakeCamera((ScreenShakeType)0); } Collider[] array = Physics.OverlapSphere(explosionPosition, 6f, 2621448, (QueryTriggerInteraction)2); PlayerControllerB val = null; for (int i = 0; i < array.Length; i++) { float num2 = Vector3.Distance(explosionPosition, ((Component)array[i]).transform.position); if (num2 > 4f && Physics.Linecast(explosionPosition, ((Component)array[i]).transform.position + Vector3.up * 0.3f, 256, (QueryTriggerInteraction)1)) { continue; } if (((Component)array[i]).gameObject.layer == 3) { val = ((Component)array[i]).gameObject.GetComponent(); if ((Object)(object)val != (Object)null && ((NetworkBehaviour)val).IsOwner) { if (num2 < killRange) { Vector3 val2 = (((Component)val.gameplayCamera).transform.position - explosionPosition) * 80f / Vector3.Distance(((Component)val.gameplayCamera).transform.position, explosionPosition); val.KillPlayer(val2, true, (CauseOfDeath)3, 0, default(Vector3), false); } else if (num2 < damageRange) { val.DamagePlayer(50, true, true, (CauseOfDeath)0, 0, false, default(Vector3)); } } } else if (((Component)array[i]).gameObject.layer == 21) { GrabbableLandmine componentInChildren = ((Component)array[i]).gameObject.GetComponentInChildren(); if ((Object)(object)componentInChildren != (Object)null && !componentInChildren.hasExploded && num2 < 6f) { Debug.Log((object)"Setting off other mine"); ((MonoBehaviour)componentInChildren).StartCoroutine(componentInChildren.TriggerOtherMineDelayed(componentInChildren)); } } else if (((Component)array[i]).gameObject.layer == 19) { EnemyAICollisionDetect componentInChildren2 = ((Component)array[i]).gameObject.GetComponentInChildren(); if ((Object)(object)componentInChildren2 != (Object)null && ((NetworkBehaviour)componentInChildren2.mainScript).IsOwner && num2 < 4.5f) { componentInChildren2.mainScript.HitEnemyOnLocalClient(6, default(Vector3), (PlayerControllerB)null, false, -1); } } } int num3 = ~LayerMask.GetMask(new string[1] { "Room" }); num3 = ~LayerMask.GetMask(new string[1] { "Colliders" }); array = Physics.OverlapSphere(explosionPosition, 10f, num3); for (int j = 0; j < array.Length; j++) { Rigidbody component = ((Component)array[j]).GetComponent(); if ((Object)(object)component != (Object)null) { component.AddExplosionForce(70f, explosionPosition, 10f); } } } public bool MineHasLineOfSight(Vector3 pos) { //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) return !Physics.Linecast(((Component)this).transform.position, pos, ref hit, 256); } bool IHittable.Hit(int force, Vector3 hitDirection, PlayerControllerB playerWhoHit = null, bool playHitSFX = false, int hitID = -1) { if (mineGrabbed) { return false; } SetOffMineAnimation(); sendingExplosionRPC = true; ExplodeMineServerRpc(); return true; } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(2093032180u, new RpcReceiveHandler(__rpc_handler_2093032180), "OnGrabServerRpc"); ((NetworkBehaviour)this).__registerRpc(1876802964u, new RpcReceiveHandler(__rpc_handler_1876802964), "OnGrabClientRpc"); ((NetworkBehaviour)this).__registerRpc(3834327495u, new RpcReceiveHandler(__rpc_handler_3834327495), "OnDiscardServerRpc"); ((NetworkBehaviour)this).__registerRpc(2155830483u, new RpcReceiveHandler(__rpc_handler_2155830483), "OnDiscardClientRpc"); ((NetworkBehaviour)this).__registerRpc(1401067709u, new RpcReceiveHandler(__rpc_handler_1401067709), "playMineTickSourceServerRpc"); ((NetworkBehaviour)this).__registerRpc(506371000u, new RpcReceiveHandler(__rpc_handler_506371000), "playMineTickSourceClientRpc"); ((NetworkBehaviour)this).__registerRpc(1230610249u, new RpcReceiveHandler(__rpc_handler_1230610249), "ToggleMineServerRpc"); ((NetworkBehaviour)this).__registerRpc(67361316u, new RpcReceiveHandler(__rpc_handler_67361316), "ToggleMineClientRpc"); ((NetworkBehaviour)this).__registerRpc(1995327364u, new RpcReceiveHandler(__rpc_handler_1995327364), "PressMineServerRpc"); ((NetworkBehaviour)this).__registerRpc(173368889u, new RpcReceiveHandler(__rpc_handler_173368889), "PressMineClientRpc"); ((NetworkBehaviour)this).__registerRpc(1510907801u, new RpcReceiveHandler(__rpc_handler_1510907801), "ExplodeMineServerRpc"); ((NetworkBehaviour)this).__registerRpc(3821524699u, new RpcReceiveHandler(__rpc_handler_3821524699), "ExplodeMineClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_2093032180(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((GrabbableLandmine)(object)target).OnGrabServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1876802964(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((GrabbableLandmine)(object)target).OnGrabClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3834327495(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((GrabbableLandmine)(object)target).OnDiscardServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2155830483(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((GrabbableLandmine)(object)target).OnDiscardClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1401067709(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool toggle = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref toggle, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((GrabbableLandmine)(object)target).playMineTickSourceServerRpc(toggle); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_506371000(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool toggle = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref toggle, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((GrabbableLandmine)(object)target).playMineTickSourceClientRpc(toggle); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1230610249(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool enable = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref enable, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((GrabbableLandmine)(object)target).ToggleMineServerRpc(enable); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_67361316(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool enable = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref enable, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((GrabbableLandmine)(object)target).ToggleMineClientRpc(enable); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1995327364(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((GrabbableLandmine)(object)target).PressMineServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_173368889(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((GrabbableLandmine)(object)target).PressMineClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1510907801(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((GrabbableLandmine)(object)target).ExplodeMineServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3821524699(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((GrabbableLandmine)(object)target).ExplodeMineClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "GrabbableLandmine"; } } [HarmonyPatch] [HarmonyPatch(typeof(Turret))] public class GrabbableTurret : GrabbableObject { [CompilerGenerated] private sealed class d__5 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public float time; public Vector3 rotation; public GrabbableTurret <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__5(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown //IL_0056: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(time); <>1__state = 1; return true; case 1: <>1__state = -1; if (((NetworkBehaviour)RoundManager.Instance).IsHost) { <>4__this.syncRotationServerRpc(rotation); } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__3 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Turret __instance; private MEvent <_event>5__1; private float 5__2; private Random 5__3; private GameObject 5__4; private NetworkObject 5__5; private int 5__6; private int 5__7; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__3(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <_event>5__1 = null; 5__3 = null; 5__4 = null; 5__5 = null; <>1__state = -2; } private bool MoveNext() { //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: 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_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Unknown result type (might be due to invalid IL or missing references) //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_0197: Unknown result type (might be due to invalid IL or missing references) //IL_01a1: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <_event>5__1 = GrabbableTurrets.Instance; 5__2 = <_event>5__1.Getf(MEvent.ScaleType.Rarity); seed++; 5__3 = new Random(StartOfRound.Instance.randomMapSeed + seed); if (5__3.NextDouble() <= (double)5__2) { 5__4 = Object.Instantiate(Assets.grabbableTurret.spawnPrefab, RoundManager.Instance.GetRandomNavMeshPositionInBoxPredictable(((Component)__instance).transform.position, 30f, RoundManager.Instance.navHit, 5__3, -1, 1f), ((Component)__instance).transform.rotation); 5__5 = 5__4.GetComponent(); 5__5.Spawn(false); Net.Instance.GenerateAndSyncTerminalCodeServerRpc(NetworkObjectReference.op_Implicit(((NetworkBehaviour)__instance).NetworkObject), 5__3.Next(RoundManager.Instance.possibleCodesForBigDoors.Length)); 5__6 = Random.Range(Assets.grabbableTurret.minValue, Assets.grabbableTurret.maxValue + 1); 5__7 = Mathf.RoundToInt((float)5__6 * RoundManager.Instance.scrapValueMultiplier * Manager.scrapValueMultiplier); Net.Instance.SyncScrapValueServerRpc(NetworkObjectReference.op_Implicit(5__5), 5__7); <>2__current = (object)new WaitForSeconds(5f); <>1__state = 1; return true; } break; case 1: <>1__state = -1; try { ((Component)((Component)__instance).transform.parent).gameObject.GetComponent().Despawn(true); } catch { } 5__4 = null; 5__5 = null; break; } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public Transform turretTransform; private static int seed; [HarmonyPrefix] [HarmonyPatch("Start")] private static void onTurretStart(ref Turret __instance) { //IL_0054: Unknown result type (might be due to invalid IL or missing references) if (((NetworkBehaviour)RoundManager.Instance).IsHost) { if (GrabbableTurrets.Active) { ((MonoBehaviour)__instance).StartCoroutine(destroySelfAndReplace(__instance)); return; } seed++; Random random = new Random(seed); Net.Instance.GenerateAndSyncTerminalCodeServerRpc(NetworkObjectReference.op_Implicit(((NetworkBehaviour)__instance).NetworkObject), random.Next(RoundManager.Instance.possibleCodesForBigDoors.Length)); } } [IteratorStateMachine(typeof(d__3))] private static IEnumerator destroySelfAndReplace(Turret __instance) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__3(0) { __instance = __instance }; } public override void Start() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).Start(); ((MonoBehaviour)this).StartCoroutine(UpdateTransform(11f, new Vector3(0f, (float)Random.Range(0, 360), 0f))); } [IteratorStateMachine(typeof(d__5))] public IEnumerator UpdateTransform(float time, Vector3 rotation) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__5(0) { <>4__this = this, time = time, rotation = rotation }; } [ServerRpc(RequireOwnership = false)] private void syncRotationServerRpc(Vector3 eulerAngle) { //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_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3881441083u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref eulerAngle); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3881441083u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; syncRotationClientRpc(eulerAngle); } } } [ClientRpc] private void syncRotationClientRpc(Vector3 eulerAngle) { //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_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00da: 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)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2773635139u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref eulerAngle); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2773635139u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; Transform obj = turretTransform; obj.eulerAngles += eulerAngle; } } } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3881441083u, new RpcReceiveHandler(__rpc_handler_3881441083), "syncRotationServerRpc"); ((NetworkBehaviour)this).__registerRpc(2773635139u, new RpcReceiveHandler(__rpc_handler_2773635139), "syncRotationClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_3881441083(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: 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_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 eulerAngle = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref eulerAngle); target.__rpc_exec_stage = (__RpcExecStage)1; ((GrabbableTurret)(object)target).syncRotationServerRpc(eulerAngle); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2773635139(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: 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_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 eulerAngle = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref eulerAngle); target.__rpc_exec_stage = (__RpcExecStage)1; ((GrabbableTurret)(object)target).syncRotationClientRpc(eulerAngle); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "GrabbableTurret"; } } internal class KamikazieBugAI : EnemyAI { [CompilerGenerated] private sealed class d__82 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public float timeStamp; public KamikazieBugAI <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__82(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown //IL_0075: 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_007f: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(timeStamp); <>1__state = 1; return true; case 1: <>1__state = -1; ((Component)<>4__this.bugLight).gameObject.SetActive(false); if (!((EnemyAI)<>4__this).isEnemyDead) { Landmine.SpawnExplosion(<>4__this.mainTransform.position + Vector3.up, true, 3f, 6f, 50, 0f, (GameObject)null, false); } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__81 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public float timeStamp; public float flickerLightTime; public KamikazieBugAI <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__81(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Expected O, but got Unknown //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_0074: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(timeStamp); <>1__state = 1; return true; case 1: <>1__state = -1; ((Component)<>4__this.bugLight).gameObject.SetActive(true); <>2__current = (object)new WaitForSeconds(flickerLightTime); <>1__state = 2; return true; case 2: <>1__state = -1; ((Component)<>4__this.bugLight).gameObject.SetActive(false); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public AISearchRoutine searchForItems; public AISearchRoutine searchForPlayer; [Header("Tracking/Memory")] [Space(3f)] public Vector3 nestPosition; private bool choseNestPosition; [Space(3f)] public static List HoarderBugItems = new List(); public static List grabbableObjectsInMap = new List(); public float angryTimer; public GrabbableObject targetItem; public HoarderBugItem heldItem; [Header("Animations")] [Space(5f)] private Vector3 agentLocalVelocity; private Vector3 previousPosition; private float velX; private float velZ; public Transform turnCompass; private float armsHoldLayerWeight; [Space(5f)] public Transform animationContainer; public Transform grabTarget; public MultiAimConstraint headLookRig; public Transform headLookTarget; [Header("Special behaviour states")] private float annoyanceMeter; public bool watchingPlayerNearPosition; public PlayerControllerB watchingPlayer; public Transform lookTarget; public bool lookingAtPositionOfInterest; private Vector3 positionOfInterest; private bool isAngry; [Header("Misc logic")] private bool sendingGrabOrDropRPC; private float waitingAtNestTimer; private bool waitingAtNest; private float timeSinceSeeingAPlayer; [Header("Chase logic")] private bool lostPlayerInChase; private float noticePlayerTimer; public PlayerControllerB angryAtPlayer; private bool inChase; [Header("Audios")] public AudioClip[] chitterSFX; [Header("Audios")] public AudioClip[] angryScreechSFX; public AudioClip angryVoiceSFX; public AudioClip bugFlySFX; public AudioClip hitPlayerSFX; private float timeSinceHittingPlayer; private float timeSinceLookingTowardsNoise; private float detectPlayersInterval; private bool inReturnToNestMode; public AudioSource explosionAudio; public AudioSource tickingAudio; public Light bugLight; public Transform mainTransform; private bool onBlowUpSequence = false; public override void Start() { ((EnemyAI)this).Start(); heldItem = null; RefreshGrabbableObjectsInMapList(); if (Compatibility.yippeeModCompatibilityMode && Compatibility.yippeeNewSFX != null) { chitterSFX = Compatibility.yippeeNewSFX; } } public static void RefreshGrabbableObjectsInMapList() { grabbableObjectsInMap.Clear(); GrabbableObject[] array = Object.FindObjectsOfType(); Debug.Log((object)$"gobjectsin scnee!! : {array.Length}"); for (int i = 0; i < array.Length; i++) { if (array[i].grabbableToEnemies) { grabbableObjectsInMap.Add(((Component)array[i]).gameObject); } } } private bool GrabTargetItemIfClose() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006f: 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_007b: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)targetItem != (Object)null && heldItem == null && Vector3.Distance(((Component)this).transform.position, ((Component)targetItem).transform.position) < 0.75f) { if (!((EnemyAI)this).SetDestinationToPosition(nestPosition, true)) { nestPosition = ((EnemyAI)this).ChooseClosestNodeToPosition(((Component)this).transform.position, false, 0).position; ((EnemyAI)this).SetDestinationToPosition(nestPosition, false); } NetworkObject component = ((Component)targetItem).GetComponent(); ((EnemyAI)this).SwitchToBehaviourStateOnLocalClient(1); GrabItem(component); sendingGrabOrDropRPC = true; GrabItemServerRpc(NetworkObjectReference.op_Implicit(component)); return true; } return false; } private void ChooseNestPosition() { //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0078: 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_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) HoarderBugAI[] array = Object.FindObjectsOfType(); for (int i = 0; i < array.Length; i++) { if ((Object)(object)array[i] != (Object)(object)this && !((EnemyAI)this).PathIsIntersectedByLineOfSight(array[i].nestPosition, false, false, false)) { nestPosition = array[i].nestPosition; SyncNestPositionServerRpc(nestPosition); return; } } nestPosition = ((EnemyAI)this).ChooseClosestNodeToPosition(((Component)this).transform.position, false, 0).position; SyncNestPositionServerRpc(nestPosition); } [ServerRpc] private void SyncNestPositionServerRpc(Vector3 newNestPosition) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Invalid comparison between Unknown and I4 //IL_0114: 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_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_00cf: 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)((NetworkBehaviour)this).__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(3108316121u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref newNestPosition); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3108316121u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SyncNestPositionClientRpc(newNestPosition); } } [ClientRpc] private void SyncNestPositionClientRpc(Vector3 newNestPosition) { //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_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1265518284u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref newNestPosition); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1265518284u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; nestPosition = newNestPosition; } } } public override void DoAIInterval() { //IL_004a: 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_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_03bb: Unknown result type (might be due to invalid IL or missing references) //IL_03c1: Unknown result type (might be due to invalid IL or missing references) //IL_045f: Unknown result type (might be due to invalid IL or missing references) //IL_01af: Unknown result type (might be due to invalid IL or missing references) //IL_0312: Unknown result type (might be due to invalid IL or missing references) //IL_031e: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).DoAIInterval(); if (base.isEnemyDead || StartOfRound.Instance.allPlayersDead) { return; } if (!choseNestPosition) { choseNestPosition = true; ChooseNestPosition(); return; } if (HasLineOfSightToPositionCopy(nestPosition, 60f, 40, 0.5f)) { for (int i = 0; i < HoarderBugItems.Count; i++) { if (HoarderBugItems[i].itemGrabbableObject.isHeld && HoarderBugItems[i].itemNestPosition == nestPosition) { HoarderBugItems[i].status = (HoarderBugItemStatus)1; } } } HoarderBugItem val = CheckLineOfSightForItem((HoarderBugItemStatus)1, 60f, 30, 3f); if (val != null && !val.itemGrabbableObject.isHeld) { val.status = (HoarderBugItemStatus)2; if (!grabbableObjectsInMap.Contains(((Component)val.itemGrabbableObject).gameObject)) { grabbableObjectsInMap.Add(((Component)val.itemGrabbableObject).gameObject); } } switch (base.currentBehaviourStateIndex) { case 0: { inReturnToNestMode = false; if (GrabTargetItemIfClose()) { break; } if ((Object)(object)targetItem == (Object)null && !searchForItems.inProgress) { ((EnemyAI)this).StartSearch(nestPosition, searchForItems); break; } if ((Object)(object)targetItem != (Object)null) { SetGoTowardsTargetObject(((Component)targetItem).gameObject); break; } GameObject val3 = ((EnemyAI)this).CheckLineOfSight(grabbableObjectsInMap, 60f, 40, 5f, (Transform)null, (int[])null); if (Object.op_Implicit((Object)(object)val3)) { GrabbableObject component = val3.GetComponent(); if (Object.op_Implicit((Object)(object)component) && (!component.isHeld || (Random.Range(0, 100) < 4 && !component.isPocketed))) { SetGoTowardsTargetObject(val3); } } break; } case 1: if (!inReturnToNestMode) { inReturnToNestMode = true; SetReturningToNest(); Debug.Log((object)(((Object)((Component)this).gameObject).name + ": Abandoned current search and returning to nest empty-handed")); } GrabTargetItemIfClose(); if (waitingAtNest) { if (heldItem != null) { DropItemAndCallDropRPC(((Component)heldItem.itemGrabbableObject).GetComponent()); } else { GameObject val2 = ((EnemyAI)this).CheckLineOfSight(grabbableObjectsInMap, 60f, 40, 5f, (Transform)null, (int[])null); if (Object.op_Implicit((Object)(object)val2) && Vector3.Distance(base.eye.position, val2.transform.position) < 6f) { targetItem = val2.GetComponent(); if ((Object)(object)targetItem != (Object)null && !targetItem.isHeld) { waitingAtNest = false; ((EnemyAI)this).SwitchToBehaviourState(0); break; } } } if (waitingAtNestTimer <= 0f && !watchingPlayerNearPosition) { waitingAtNest = false; ((EnemyAI)this).SwitchToBehaviourStateOnLocalClient(0); } } else if (Vector3.Distance(((Component)this).transform.position, nestPosition) < 0.75f) { waitingAtNest = true; waitingAtNestTimer = 15f; } break; case 2: inReturnToNestMode = false; if (heldItem != null) { DropItemAndCallDropRPC(((Component)heldItem.itemGrabbableObject).GetComponent(), droppedInNest: false); } if (lostPlayerInChase) { if (!searchForPlayer.inProgress) { searchForPlayer.searchWidth = 30f; ((EnemyAI)this).StartSearch(((Component)base.targetPlayer).transform.position, searchForPlayer); Debug.Log((object)(((Object)((Component)this).gameObject).name + ": Lost player in chase; beginning search where the player was last seen")); } break; } if ((Object)(object)base.targetPlayer == (Object)null) { Debug.LogError((object)"TargetPlayer is null even though bug is in chase; setting targetPlayer to watchingPlayer"); if ((Object)(object)watchingPlayer != (Object)null) { base.targetPlayer = watchingPlayer; } } if (searchForPlayer.inProgress) { ((EnemyAI)this).StopSearch(searchForPlayer, true); Debug.Log((object)(((Object)((Component)this).gameObject).name + ": Found player during chase; stopping search coroutine and moving after target player")); } base.movingTowardsTargetPlayer = true; break; case 3: break; } } private void SetGoTowardsTargetObject(GameObject foundObject) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) if (((EnemyAI)this).SetDestinationToPosition(foundObject.transform.position, true) && grabbableObjectsInMap.Contains(foundObject)) { Debug.Log((object)(((Object)((Component)this).gameObject).name + ": Setting target object and going towards it.")); targetItem = foundObject.GetComponent(); ((EnemyAI)this).StopSearch(searchForItems, false); } else { targetItem = null; Debug.Log((object)(((Object)((Component)this).gameObject).name + ": i found an object but cannot reach it (or it has been taken by another bug): " + ((Object)foundObject).name)); } } private void SetReturningToNest() { //IL_0003: Unknown result type (might be due to invalid IL or missing references) if (((EnemyAI)this).SetDestinationToPosition(nestPosition, true)) { targetItem = null; ((EnemyAI)this).StopSearch(searchForItems, false); } else { Debug.Log((object)(((Object)((Component)this).gameObject).name + ": Return to nest was called, but nest is not accessible! Abandoning and choosing a new nest position.")); ChooseNestPosition(); } } private void LateUpdate() { if (!base.inSpecialAnimation && !base.isEnemyDead && !StartOfRound.Instance.allPlayersDead) { if (detectPlayersInterval <= 0f) { detectPlayersInterval = 0.2f; DetectAndLookAtPlayers(); } else { detectPlayersInterval -= Time.deltaTime; } AnimateLooking(); CalculateAnimationDirection(); SetArmLayerWeight(); } } private void SetArmLayerWeight() { if (heldItem != null) { armsHoldLayerWeight = Mathf.Lerp(armsHoldLayerWeight, 0.85f, 8f * Time.deltaTime); } else { armsHoldLayerWeight = Mathf.Lerp(armsHoldLayerWeight, 0f, 8f * Time.deltaTime); } base.creatureAnimator.SetLayerWeight(1, armsHoldLayerWeight); } private void CalculateAnimationDirection(float maxSpeed = 1f) { //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0038: 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_00df: 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) agentLocalVelocity = animationContainer.InverseTransformDirection(Vector3.ClampMagnitude(((Component)this).transform.position - previousPosition, 1f) / (Time.deltaTime * 2f)); velX = Mathf.Lerp(velX, agentLocalVelocity.x, 10f * Time.deltaTime); base.creatureAnimator.SetFloat("VelocityX", Mathf.Clamp(velX, 0f - maxSpeed, maxSpeed)); velZ = Mathf.Lerp(velZ, agentLocalVelocity.z, 10f * Time.deltaTime); base.creatureAnimator.SetFloat("VelocityZ", Mathf.Clamp(velZ, 0f - maxSpeed, maxSpeed)); previousPosition = ((Component)this).transform.position; } private void AnimateLooking() { //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_0129: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: 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_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Unknown result type (might be due to invalid IL or missing references) //IL_0117: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Unknown result type (might be due to invalid IL or missing references) //IL_01e9: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)watchingPlayer != (Object)null) { lookTarget.position = ((Component)watchingPlayer.gameplayCamera).transform.position; } else { if (!lookingAtPositionOfInterest) { base.agent.angularSpeed = 220f; ((RigConstraint>)(object)headLookRig).weight = Mathf.Lerp(((RigConstraint>)(object)headLookRig).weight, 0f, 10f); return; } lookTarget.position = positionOfInterest; } if (((NetworkBehaviour)this).IsOwner) { base.agent.angularSpeed = 0f; turnCompass.LookAt(lookTarget); ((Component)this).transform.rotation = Quaternion.Lerp(((Component)this).transform.rotation, turnCompass.rotation, 6f * Time.deltaTime); ((Component)this).transform.localEulerAngles = new Vector3(0f, ((Component)this).transform.localEulerAngles.y, 0f); } float num = Vector3.Angle(((Component)this).transform.forward, lookTarget.position - ((Component)this).transform.position); if (num > 22f) { ((RigConstraint>)(object)headLookRig).weight = Mathf.Lerp(((RigConstraint>)(object)headLookRig).weight, 1f * (Mathf.Abs(num - 180f) / 180f), 7f); } else { ((RigConstraint>)(object)headLookRig).weight = Mathf.Lerp(((RigConstraint>)(object)headLookRig).weight, 1f, 7f); } headLookTarget.position = Vector3.Lerp(headLookTarget.position, lookTarget.position, 8f * Time.deltaTime); } private void DetectAndLookAtPlayers() { //IL_0018: 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_001d: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_0150: 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_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_0273: Unknown result type (might be due to invalid IL or missing references) //IL_0281: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) Vector3 val = ((base.currentBehaviourStateIndex != 1) ? ((Component)this).transform.position : nestPosition); PlayerControllerB[] allPlayersInLineOfSight = ((EnemyAI)this).GetAllPlayersInLineOfSight(70f, 30, base.eye, 1.2f, -1); if (allPlayersInLineOfSight != null) { PlayerControllerB val2 = watchingPlayer; timeSinceSeeingAPlayer = 0f; float num = 500f; bool flag = false; if ((Object)(object)base.stunnedByPlayer != (Object)null) { flag = true; angryAtPlayer = base.stunnedByPlayer; } for (int i = 0; i < allPlayersInLineOfSight.Length; i++) { if (!flag && (Object)(object)allPlayersInLineOfSight[i].currentlyHeldObjectServer != (Object)null) { for (int j = 0; j < HoarderBugItems.Count; j++) { if ((Object)(object)HoarderBugItems[j].itemGrabbableObject == (Object)(object)allPlayersInLineOfSight[i].currentlyHeldObjectServer) { HoarderBugItems[j].status = (HoarderBugItemStatus)1; angryAtPlayer = allPlayersInLineOfSight[i]; flag = true; } } } if (IsHoarderBugAngry() && (Object)(object)allPlayersInLineOfSight[i] == (Object)(object)angryAtPlayer) { watchingPlayer = angryAtPlayer; } else { float num2 = Vector3.Distance(((Component)allPlayersInLineOfSight[i]).transform.position, val); if (num2 < num) { num = num2; watchingPlayer = allPlayersInLineOfSight[i]; } } float num3 = Vector3.Distance(((Component)allPlayersInLineOfSight[i]).transform.position, nestPosition); if (HoarderBugItems.Count > 0) { if ((num3 < 4f || (inChase && num3 < 8f)) && angryTimer < 3.25f) { angryAtPlayer = allPlayersInLineOfSight[i]; watchingPlayer = allPlayersInLineOfSight[i]; angryTimer = 3.25f; break; } if (!isAngry && base.currentBehaviourStateIndex == 0 && num3 < 8f && ((Object)(object)targetItem == (Object)null || Vector3.Distance(((Component)targetItem).transform.position, ((Component)this).transform.position) > 7.5f) && ((NetworkBehaviour)this).IsOwner) { ((EnemyAI)this).SwitchToBehaviourState(1); } } if (base.currentBehaviourStateIndex != 2 && Vector3.Distance(((Component)this).transform.position, ((Component)allPlayersInLineOfSight[i]).transform.position) < 2.5f) { annoyanceMeter += 0.2f; if (annoyanceMeter > 2.5f) { angryAtPlayer = allPlayersInLineOfSight[i]; watchingPlayer = allPlayersInLineOfSight[i]; angryTimer = 3.25f; } } } watchingPlayerNearPosition = num < 6f; if ((Object)(object)watchingPlayer != (Object)(object)val2) { RoundManager.PlayRandomClip(base.creatureVoice, chitterSFX, true, 1f, 0, 1000); } if (!((NetworkBehaviour)this).IsOwner) { return; } if (base.currentBehaviourStateIndex != 2) { if (IsHoarderBugAngry()) { lostPlayerInChase = false; base.targetPlayer = watchingPlayer; doBlowupServerRpc(); ((EnemyAI)this).SwitchToBehaviourState(2); } } else { base.targetPlayer = watchingPlayer; if (lostPlayerInChase) { lostPlayerInChase = false; } } return; } timeSinceSeeingAPlayer += 0.2f; watchingPlayerNearPosition = false; if (base.currentBehaviourStateIndex != 2) { if (timeSinceSeeingAPlayer > 1.5f) { watchingPlayer = null; } return; } if (timeSinceSeeingAPlayer > 1.25f) { watchingPlayer = null; } if (((NetworkBehaviour)this).IsOwner && !(timeSinceSeeingAPlayer > 15f) && timeSinceSeeingAPlayer > 2.5f) { lostPlayerInChase = true; } } private bool IsHoarderBugAngry() { //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Invalid comparison between Unknown and I4 //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Invalid comparison between Unknown and I4 if (base.stunNormalizedTimer > 0f) { angryTimer = 4f; if (Object.op_Implicit((Object)(object)base.stunnedByPlayer)) { angryAtPlayer = base.stunnedByPlayer; } return true; } int num = 0; int num2 = 0; for (int i = 0; i < HoarderBugItems.Count; i++) { if ((int)HoarderBugItems[i].status == 1) { num2++; } else if ((int)HoarderBugItems[i].status == 2) { num++; } } if (!(angryTimer > 0f)) { return num2 > 0; } return true; } public override void Update() { //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_03d3: Unknown result type (might be due to invalid IL or missing references) //IL_03d8: Unknown result type (might be due to invalid IL or missing references) //IL_03e2: Unknown result type (might be due to invalid IL or missing references) //IL_03e7: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Update(); timeSinceHittingPlayer += Time.deltaTime; timeSinceLookingTowardsNoise += Time.deltaTime; if (timeSinceLookingTowardsNoise > 0.6f) { lookingAtPositionOfInterest = false; } if (base.inSpecialAnimation || base.isEnemyDead || StartOfRound.Instance.allPlayersDead) { return; } if (angryTimer >= 0f) { angryTimer -= Time.deltaTime; } if (base.currentBehaviourStateIndex == 2) { doBlowupServerRpc(); } base.creatureAnimator.SetBool("stunned", base.stunNormalizedTimer > 0f); bool flag = IsHoarderBugAngry(); if (!isAngry && flag) { isAngry = true; base.creatureVoice.clip = angryVoiceSFX; base.creatureVoice.Play(); } else if (isAngry && !flag) { isAngry = false; angryAtPlayer = null; base.creatureVoice.Stop(); } switch (base.currentBehaviourStateIndex) { case 0: base.addPlayerVelocityToDestination = 0f; if (base.stunNormalizedTimer > 0f) { base.agent.speed = 0f; } else { base.agent.speed = 6f; } waitingAtNest = false; break; case 1: base.addPlayerVelocityToDestination = 0f; if (base.stunNormalizedTimer > 0f) { base.agent.speed = 0f; } else { base.agent.speed = 6f; } base.agent.acceleration = 30f; if (waitingAtNest && waitingAtNestTimer > 0f) { waitingAtNestTimer -= Time.deltaTime; } break; case 2: if (!inChase) { inChase = true; base.creatureSFX.clip = bugFlySFX; base.creatureSFX.Play(); RoundManager.PlayRandomClip(base.creatureVoice, angryScreechSFX, true, 1f, 0, 1000); base.creatureAnimator.SetBool("Chase", true); waitingAtNest = false; if (Vector3.Distance(((Component)this).transform.position, ((Component)GameNetworkManager.Instance.localPlayerController).transform.position) < 10f) { GameNetworkManager.Instance.localPlayerController.JumpToFearLevel(0.5f, true); } } base.addPlayerVelocityToDestination = 2f; if (!((NetworkBehaviour)this).IsOwner) { break; } if (!IsHoarderBugAngry()) { HoarderBugItem val = CheckLineOfSightForItem((HoarderBugItemStatus)2, 60f, 12, 3f); if (val != null && !val.itemGrabbableObject.isHeld) { SetGoTowardsTargetObject(((Component)val.itemGrabbableObject).gameObject); } break; } if (base.stunNormalizedTimer > 0f) { base.agent.speed = 0f; } else { base.agent.speed = 18f; } base.agent.acceleration = 16f; if (GameNetworkManager.Instance.localPlayerController.HasLineOfSightToPosition(((Component)this).transform.position + Vector3.up * 0.75f, 60f, 15, -1f, -1)) { GameNetworkManager.Instance.localPlayerController.IncreaseFearLevelOverTime(0.4f, 1f); } break; } } public override void DetectNoise(Vector3 noisePosition, float noiseLoudness, int timesPlayedInOneSpot = 0, int noiseID = 0) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: 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_0096: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).DetectNoise(noisePosition, noiseLoudness, timesPlayedInOneSpot, noiseID); if (timesPlayedInOneSpot <= 10 && !(timeSinceLookingTowardsNoise < 0.6f)) { timeSinceLookingTowardsNoise = 0f; float num = Vector3.Distance(noisePosition, nestPosition); if (((NetworkBehaviour)this).IsOwner && HoarderBugItems.Count > 0 && !isAngry && base.currentBehaviourStateIndex == 0 && num < 15f && ((Object)(object)targetItem == (Object)null || Vector3.Distance(((Component)targetItem).transform.position, ((Component)this).transform.position) > 4.5f)) { ((EnemyAI)this).SwitchToBehaviourState(1); } positionOfInterest = noisePosition; lookingAtPositionOfInterest = true; } } private void DropItemAndCallDropRPC(NetworkObject dropItemNetworkObject, bool droppedInNest = true) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002e: 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_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Unknown result type (might be due to invalid IL or missing references) Vector3 targetFloorPosition = RoundManager.Instance.RandomlyOffsetPosition(heldItem.itemGrabbableObject.GetItemFloorPosition(default(Vector3)), 1.2f, 0.4f); DropItem(dropItemNetworkObject, targetFloorPosition); sendingGrabOrDropRPC = true; DropItemServerRpc(NetworkObjectReference.op_Implicit(dropItemNetworkObject), targetFloorPosition, droppedInNest); } [ServerRpc] public void DropItemServerRpc(NetworkObjectReference objectRef, Vector3 targetFloorPosition, bool droppedInNest) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0115: Unknown result type (might be due to invalid IL or missing references) //IL_011f: Invalid comparison between Unknown and I4 //IL_014a: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0152: 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_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_0105: 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)((NetworkBehaviour)this).__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(1137852752u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref objectRef, default(ForNetworkSerializable)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref targetFloorPosition); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref droppedInNest, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1137852752u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; DropItemClientRpc(objectRef, targetFloorPosition, droppedInNest); } } [ClientRpc] public void DropItemClientRpc(NetworkObjectReference objectRef, Vector3 targetFloorPosition, bool droppedInNest) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00cf: Unknown result type (might be due to invalid IL or missing references) //IL_00d9: 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_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_00bf: 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_011c: 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)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(589164110u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref objectRef, default(ForNetworkSerializable)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref targetFloorPosition); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref droppedInNest, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 589164110u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; NetworkObject item = default(NetworkObject); if (((NetworkObjectReference)(ref objectRef)).TryGet(ref item, (NetworkManager)null)) { try { DropItem(item, targetFloorPosition, droppedInNest); return; } catch (Exception ex) { Debug.LogError((object)(((Object)((Component)this).gameObject).name + ": Error while dropping item: " + ex.Message)); return; } } Debug.LogError((object)(((Object)((Component)this).gameObject).name + ": Failed to get network object from network object reference (Drop item RPC)")); } [ServerRpc] public void GrabItemServerRpc(NetworkObjectReference objectRef) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Invalid comparison between Unknown and I4 //IL_0122: 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_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_00dd: 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)((NetworkBehaviour)this).__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(3677165395u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref objectRef, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3677165395u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; GrabItemClientRpc(objectRef); } } [ClientRpc] public void GrabItemClientRpc(NetworkObjectReference objectRef) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1025828854u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref objectRef, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1025828854u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ((EnemyAI)this).SwitchToBehaviourStateOnLocalClient(1); NetworkObject item = default(NetworkObject); if (((NetworkObjectReference)(ref objectRef)).TryGet(ref item, (NetworkManager)null)) { GrabItem(item); } else { Debug.LogError((object)(((Object)((Component)this).gameObject).name + ": Failed to get network object from network object reference (Grab item RPC)")); } } } private void DropItem(NetworkObject item, Vector3 targetFloorPosition, bool droppingInNest = true) { //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: 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) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) if (sendingGrabOrDropRPC) { sendingGrabOrDropRPC = false; return; } if (heldItem == null) { Debug.LogError((object)"Hoarder bug: my held item is null when attempting to drop it!!"); return; } GrabbableObject itemGrabbableObject = heldItem.itemGrabbableObject; itemGrabbableObject.parentObject = null; ((Component)itemGrabbableObject).transform.SetParent(StartOfRound.Instance.propsContainer, true); itemGrabbableObject.EnablePhysics(true); itemGrabbableObject.fallTime = 0f; itemGrabbableObject.startFallingPosition = ((Component)itemGrabbableObject).transform.parent.InverseTransformPoint(((Component)itemGrabbableObject).transform.position); itemGrabbableObject.targetFloorPosition = ((Component)itemGrabbableObject).transform.parent.InverseTransformPoint(targetFloorPosition); itemGrabbableObject.floorYRot = -1; itemGrabbableObject.DiscardItemFromEnemy(); heldItem = null; if (!droppingInNest) { grabbableObjectsInMap.Add(((Component)itemGrabbableObject).gameObject); } } private void GrabItem(NetworkObject item) { //IL_00d3: Unknown result type (might be due to invalid IL or missing references) //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Expected O, but got Unknown //IL_00a4: 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_00ab: Unknown result type (might be due to invalid IL or missing references) if (sendingGrabOrDropRPC) { sendingGrabOrDropRPC = false; return; } if (heldItem != null) { Debug.Log((object)(((Object)((Component)this).gameObject).name + ": Trying to grab another item (" + ((Object)((Component)item).gameObject).name + ") while hands are already full with item (" + ((Object)((Component)heldItem.itemGrabbableObject).gameObject).name + "). Dropping the currently held one.")); DropItem(((Component)heldItem.itemGrabbableObject).GetComponent(), heldItem.itemGrabbableObject.GetItemFloorPosition(default(Vector3))); } targetItem = null; GrabbableObject component = ((Component)item).gameObject.GetComponent(); HoarderBugItems.Add(new HoarderBugItem(component, (HoarderBugItemStatus)0, nestPosition)); heldItem = HoarderBugItems[HoarderBugItems.Count - 1]; component.parentObject = grabTarget; component.hasHitGround = false; component.GrabItemFromEnemy((EnemyAI)(object)this); component.EnablePhysics(false); grabbableObjectsInMap.Remove(((Component)component).gameObject); } public override void OnCollideWithPlayer(Collider other) { //IL_0085: 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) ((EnemyAI)this).OnCollideWithPlayer(other); Debug.Log((object)"HA1"); if (!inChase) { return; } Debug.Log((object)"HA2"); if (!(timeSinceHittingPlayer < 0.5f)) { Debug.Log((object)"HA3"); PlayerControllerB val = ((EnemyAI)this).MeetsStandardPlayerCollisionConditions(other, false, false); if ((Object)(object)val != (Object)null) { Debug.Log((object)"HA4"); timeSinceHittingPlayer = 0f; val.DamagePlayer(30, true, true, (CauseOfDeath)6, 0, false, default(Vector3)); HitPlayerServerRpc(); } } } [ServerRpc(RequireOwnership = false)] public void HitPlayerServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(4268145293u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 4268145293u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; HitPlayerClientRpc(); } } } [ClientRpc] public void HitPlayerClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3201014421u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3201014421u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; base.creatureAnimator.SetTrigger("HitPlayer"); base.creatureSFX.PlayOneShot(hitPlayerSFX); WalkieTalkie.TransmitOneShotAudio(base.creatureSFX, hitPlayerSFX, 1f); } } } public override void HitEnemy(int force = 1, PlayerControllerB playerWhoHit = null, bool playHitSFX = false, int hitID = -1) { ((EnemyAI)this).HitEnemy(force, playerWhoHit, false, -1); Debug.Log((object)"HA"); if (!base.isEnemyDead) { Debug.Log((object)"HB"); base.creatureAnimator.SetTrigger("damage"); angryAtPlayer = playerWhoHit; angryTimer += 18f; Debug.Log((object)"HC"); base.enemyHP -= force; if (base.enemyHP <= 0 && ((NetworkBehaviour)this).IsOwner) { ((EnemyAI)this).KillEnemyOnOwnerClient(false); } } } public override void KillEnemy(bool destroy = false) { ((EnemyAI)this).KillEnemy(false); DisableBlowupServerRpc(); base.agent.speed = 0f; base.creatureVoice.Stop(); base.creatureSFX.Stop(); } public HoarderBugItem CheckLineOfSightForItem(HoarderBugItemStatus searchForItemsOfStatus = -1, float width = 45f, int range = 60, float proximityAwareness = -1f) { //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Invalid comparison between Unknown and I4 //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: 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_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_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_00f6: Unknown result type (might be due to invalid IL or missing references) //IL_00fb: 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_0110: Unknown result type (might be due to invalid IL or missing references) for (int i = 0; i < HoarderBugItems.Count; i++) { if (HoarderBugItems[i] == null || (Object)(object)HoarderBugItems[i].itemGrabbableObject == (Object)null) { HoarderBugItems.RemoveAt(i); i--; } if (!HoarderBugItems[i].itemGrabbableObject.grabbableToEnemies || HoarderBugItems[i].itemGrabbableObject.isHeld || ((int)searchForItemsOfStatus != -1 && HoarderBugItems[i].status != searchForItemsOfStatus)) { continue; } Vector3 position = ((Component)HoarderBugItems[i].itemGrabbableObject).transform.position; if (!Physics.Linecast(base.eye.position, position, StartOfRound.Instance.collidersAndRoomMaskAndDefault)) { Vector3 val = position - base.eye.position; if (Vector3.Angle(base.eye.forward, val) < width || Vector3.Distance(((Component)this).transform.position, position) < proximityAwareness) { Debug.Log((object)"SEEING PLAYER"); return HoarderBugItems[i]; } } } return null; } [ServerRpc(RequireOwnership = false)] public void doBlowupServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3967474852u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3967474852u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (((NetworkBehaviour)RoundManager.Instance).IsHost) { doBlowupClientRpc(); } } } [ClientRpc] public void doBlowupClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1792094030u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1792094030u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; blowupSequence(); } } } public void blowupSequence() { if (!onBlowUpSequence) { onBlowUpSequence = true; tickingAudio.Play(); ((MonoBehaviour)this).StartCoroutine(FlicketLights(0.2f, 0.15f)); ((MonoBehaviour)this).StartCoroutine(FlicketLights(1.2f, 0.15f)); ((MonoBehaviour)this).StartCoroutine(FlicketLights(2.2f, 0.15f)); ((MonoBehaviour)this).StartCoroutine(FlicketLights(3.2f, 0.15f)); ((MonoBehaviour)this).StartCoroutine(FlicketLights(4.2f, 0.15f)); ((MonoBehaviour)this).StartCoroutine(FlicketLights(4.36f, 0.5f)); ((MonoBehaviour)this).StartCoroutine(FlicketLights(4.46f, 0.5f)); ((MonoBehaviour)this).StartCoroutine(FlicketLights(4.59f, 0.5f)); ((MonoBehaviour)this).StartCoroutine(FlicketLights(4.71f, 0.5f)); ((MonoBehaviour)this).StartCoroutine(FlicketLights(4.84f, 0.5f)); ((MonoBehaviour)this).StartCoroutine(FlicketLights(4.96f, 0.5f)); ((MonoBehaviour)this).StartCoroutine(FlicketLights(5.09f, 0.5f)); ((MonoBehaviour)this).StartCoroutine(FlicketLights(5.21f, 0.5f)); ((MonoBehaviour)this).StartCoroutine(FlicketLights(5.34f, 0.5f)); ((MonoBehaviour)this).StartCoroutine(FlicketLights(5.45f, 0.5f)); ((MonoBehaviour)this).StartCoroutine(FlicketLights(5.56f, 0.5f)); ((MonoBehaviour)this).StartCoroutine(FlicketLights(5.7f, 0.5f)); ((MonoBehaviour)this).StartCoroutine(FlicketLights(5.81f, 0.5f)); ((MonoBehaviour)this).StartCoroutine(BlowUpAt(6f)); } } [IteratorStateMachine(typeof(d__81))] public IEnumerator FlicketLights(float timeStamp, float flickerLightTime) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__81(0) { <>4__this = this, timeStamp = timeStamp, flickerLightTime = flickerLightTime }; } [IteratorStateMachine(typeof(d__82))] public IEnumerator BlowUpAt(float timeStamp) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__82(0) { <>4__this = this, timeStamp = timeStamp }; } [ServerRpc(RequireOwnership = false)] public void DisableBlowupServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(4115349172u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 4115349172u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; DisableBlowupClientRpc(); } } } [ClientRpc] public void DisableBlowupClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(3999830196u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 3999830196u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; DisableBlowup(); } } } public void DisableBlowup() { ((Component)bugLight).gameObject.SetActive(false); tickingAudio.Stop(); ((MonoBehaviour)this).StopAllCoroutines(); } public bool HasLineOfSightToPositionCopy(Vector3 pos, float width = 45f, int range = 60, float proximityAwareness = -1f) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: 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_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //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_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0078: 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_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)base.eye == (Object)null) { _ = ((Component)this).transform; } else { _ = base.eye; } if (Vector3.Distance(base.eye.position, pos) < (float)range && !Physics.Linecast(base.eye.position, pos, StartOfRound.Instance.collidersAndRoomMaskAndDefault)) { Vector3 val = pos - base.eye.position; if (Vector3.Angle(base.eye.forward, val) < width || Vector3.Distance(((Component)this).transform.position, pos) < proximityAwareness) { return true; } } return false; } protected override void __initializeVariables() { ((EnemyAI)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(3108316121u, new RpcReceiveHandler(__rpc_handler_3108316121), "SyncNestPositionServerRpc"); ((NetworkBehaviour)this).__registerRpc(1265518284u, new RpcReceiveHandler(__rpc_handler_1265518284), "SyncNestPositionClientRpc"); ((NetworkBehaviour)this).__registerRpc(1137852752u, new RpcReceiveHandler(__rpc_handler_1137852752), "DropItemServerRpc"); ((NetworkBehaviour)this).__registerRpc(589164110u, new RpcReceiveHandler(__rpc_handler_589164110), "DropItemClientRpc"); ((NetworkBehaviour)this).__registerRpc(3677165395u, new RpcReceiveHandler(__rpc_handler_3677165395), "GrabItemServerRpc"); ((NetworkBehaviour)this).__registerRpc(1025828854u, new RpcReceiveHandler(__rpc_handler_1025828854), "GrabItemClientRpc"); ((NetworkBehaviour)this).__registerRpc(4268145293u, new RpcReceiveHandler(__rpc_handler_4268145293), "HitPlayerServerRpc"); ((NetworkBehaviour)this).__registerRpc(3201014421u, new RpcReceiveHandler(__rpc_handler_3201014421), "HitPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(3967474852u, new RpcReceiveHandler(__rpc_handler_3967474852), "doBlowupServerRpc"); ((NetworkBehaviour)this).__registerRpc(1792094030u, new RpcReceiveHandler(__rpc_handler_1792094030), "doBlowupClientRpc"); ((NetworkBehaviour)this).__registerRpc(4115349172u, new RpcReceiveHandler(__rpc_handler_4115349172), "DisableBlowupServerRpc"); ((NetworkBehaviour)this).__registerRpc(3999830196u, new RpcReceiveHandler(__rpc_handler_3999830196), "DisableBlowupClientRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_3108316121(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: 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_008e: 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_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { Vector3 newNestPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref newNestPosition); target.__rpc_exec_stage = (__RpcExecStage)1; ((KamikazieBugAI)(object)target).SyncNestPositionServerRpc(newNestPosition); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1265518284(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: 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_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 newNestPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref newNestPosition); target.__rpc_exec_stage = (__RpcExecStage)1; ((KamikazieBugAI)(object)target).SyncNestPositionClientRpc(newNestPosition); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1137852752(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: 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_00aa: 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_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00c8: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } return; } NetworkObjectReference objectRef = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref objectRef, default(ForNetworkSerializable)); Vector3 targetFloorPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref targetFloorPosition); bool droppedInNest = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref droppedInNest, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((KamikazieBugAI)(object)target).DropItemServerRpc(objectRef, targetFloorPosition, droppedInNest); target.__rpc_exec_stage = (__RpcExecStage)0; } private static void __rpc_handler_589164110(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0057: Unknown result type (might be due to invalid IL or missing references) //IL_005d: 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_0077: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkObjectReference objectRef = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref objectRef, default(ForNetworkSerializable)); Vector3 targetFloorPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref targetFloorPosition); bool droppedInNest = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref droppedInNest, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((KamikazieBugAI)(object)target).DropItemClientRpc(objectRef, targetFloorPosition, droppedInNest); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3677165395(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_009c: 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_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { NetworkObjectReference objectRef = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref objectRef, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((KamikazieBugAI)(object)target).GrabItemServerRpc(objectRef); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1025828854(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkObjectReference objectRef = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref objectRef, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((KamikazieBugAI)(object)target).GrabItemClientRpc(objectRef); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4268145293(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((KamikazieBugAI)(object)target).HitPlayerServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3201014421(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((KamikazieBugAI)(object)target).HitPlayerClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3967474852(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((KamikazieBugAI)(object)target).doBlowupServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1792094030(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((KamikazieBugAI)(object)target).doBlowupClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_4115349172(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((KamikazieBugAI)(object)target).DisableBlowupServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3999830196(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((KamikazieBugAI)(object)target).DisableBlowupClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "KamikazieBugAI"; } } public class NutSlayerAI : EnemyAI { [CompilerGenerated] private sealed class d__86 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Vector3 enemyPos; public NutSlayerAI <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__86(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01aa: Expected O, but got Unknown //IL_00ff: 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_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Expected O, but got Unknown //IL_0202: Unknown result type (might be due to invalid IL or missing references) //IL_020c: Expected O, but got Unknown //IL_0184: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Expected O, but got Unknown //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.aimingGun = true; if (<>4__this.lastPlayerSeenMoving == <>4__this.previousPlayerSeenWhenAiming) { <>4__this.timesSeeingSamePlayer++; } else { <>4__this.previousPlayerSeenWhenAiming = <>4__this.lastPlayerSeenMoving; <>4__this.timesSeeingSamePlayer = 0; } <>4__this.longRangeAudio.PlayOneShot(<>4__this.aimSFX); <>4__this.speedWhileAiming = <>4__this.speedWhileMoving * 0.35f; ((EnemyAI)<>4__this).inSpecialAnimation = true; ((EnemyAI)<>4__this).serverPosition = enemyPos; if (((EnemyAI)<>4__this).enemyHP <= 1) { <>2__current = (object)new WaitForSeconds(0.9f); <>1__state = 1; return true; } if (<>4__this.gun.shellsLoaded == 1) { <>2__current = (object)new WaitForSeconds(1.3f); <>1__state = 2; return true; } <>2__current = (object)new WaitForSeconds(0.9f); <>1__state = 3; return true; case 1: <>1__state = -1; goto IL_019f; case 2: <>1__state = -1; goto IL_019f; case 3: <>1__state = -1; goto IL_019f; case 4: <>1__state = -1; if (((NetworkBehaviour)<>4__this).IsOwner && !<>4__this.isFiring) { <>4__this.FireGunServerRpc(); } <>4__this.timeSinceFiringGun = 0f; <>2__current = (object)new WaitForSeconds(0.35f); <>1__state = 5; return true; case 5: { <>1__state = -1; <>4__this.aimingGun = false; ((EnemyAI)<>4__this).inSpecialAnimation = false; ((EnemyAI)<>4__this).creatureVoice.Play(); ((EnemyAI)<>4__this).creatureVoice.pitch = Random.Range(0.9f, 1.1f); return false; } IL_019f: <>2__current = (object)new WaitForEndOfFrame(); <>1__state = 4; return true; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__74 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public NutSlayerAI <>4__this; private int 5__1; private int 5__2; private int 5__3; private int 5__4; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__74(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Expected O, but got Unknown //IL_00d2: 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_0195: Unknown result type (might be due to invalid IL or missing references) //IL_019f: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(0.75f); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.isInspecting = true; <>4__this.NutcrackerRandom = new Random(<>4__this.randomSeedNumber + <>4__this.timesDoingInspection); 5__1 = 0; 5__2 = 1; 5__3 = 0; goto IL_01d7; case 2: { <>1__state = -1; if (5__1 >= 360) { break; } 5__3++; goto IL_01d7; } IL_01d7: if (5__3 < 8) { 5__1 = Mathf.Min(5__1 + <>4__this.NutcrackerRandom.Next(45, 95), 360); if (Physics.Raycast(((EnemyAI)<>4__this).eye.position, ((EnemyAI)<>4__this).eye.forward, 5f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { 5__2 = 1; } else { 5__4 = ((!((float)5__2 > 2f)) ? 4 : (5__2 / 3)); 5__2 = <>4__this.NutcrackerRandom.Next(1, Mathf.Max(5__4, 3)); } <>4__this.targetTorsoDegrees = 5__1; <>4__this.torsoTurnSpeed = <>4__this.NutcrackerRandom.Next(275, 855) / 5__2; <>2__current = (object)new WaitForSeconds((float)5__2); <>1__state = 2; return true; } break; } if (((NetworkBehaviour)<>4__this).IsOwner) { ((EnemyAI)<>4__this).SwitchToBehaviourState(0); } return false; } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__82 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public NutSlayerAI <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__82(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_008d: 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_0112: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.reloadingGun = true; ((EnemyAI)<>4__this).creatureSFX.PlayOneShot(((EnemyAI)<>4__this).enemyType.audioClips[2]); ((EnemyAI)<>4__this).creatureAnimator.SetBool("Reloading", true); <>2__current = (object)new WaitForSeconds(0.32f); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.gun.gunAnimator.SetBool("Reloading", true); <>2__current = (object)new WaitForSeconds(0.92f); <>1__state = 2; return true; case 2: <>1__state = -1; <>4__this.gun.gunAnimator.SetBool("Reloading", false); ((EnemyAI)<>4__this).creatureAnimator.SetBool("Reloading", false); <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 3; return true; case 3: <>1__state = -1; <>4__this.reloadingGun = false; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__92 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public float time; public Vector3 gunPosition; public Vector3 gunForward; public NutSlayerAI <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__92(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Expected O, but got Unknown //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(time); <>1__state = 1; return true; case 1: <>1__state = -1; ((GrabbableObject)<>4__this.gun).currentUseCooldown = -1f; <>4__this.fire(gunPosition, gunForward); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__107 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public NutSlayerAI <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__107(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(1.2f); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.SpawnShotgunShells(); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__89 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public NutSlayerAI <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__89(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitUntil((Func)(() => ((EnemyAI)<>4__this).stunNormalizedTimer <= 0f)); <>1__state = 1; return true; case 1: <>1__state = -1; <>2__current = (object)new WaitForSeconds(0.5f); <>1__state = 2; return true; case 2: <>1__state = -1; <>4__this.FireGunClientRpc(); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public int previousBehaviourState = -1; public int previousBehaviourStateAIInterval = -1; public static float timeAtNextInspection; public bool inspectingLocalPlayer; public float localPlayerTurnDistance; public bool isInspecting; public bool hasGun; public int randomSeedNumber; public GameObject gunPrefab; public SlayerShotgun gun; public Transform gunPoint; public NetworkObjectReference gunObjectRef; public AISearchRoutine patrol; public AISearchRoutine attackSearch; public Transform torsoContainer; public float currentTorsoRotation; public int targetTorsoDegrees; public float torsoTurnSpeed = 6f; public AudioSource torsoTurnAudio; public AudioSource longRangeAudio; public AudioClip[] torsoFinishTurningClips; public AudioClip aimSFX; public AudioClip kickSFX; public GameObject shotgunShellPrefab; public bool torsoTurning; public Random NutcrackerRandom; public int timesDoingInspection; public Coroutine inspectionCoroutine; public int lastPlayerSeenMoving = 0; public float timeSinceSeeingTarget; public float timeSinceInspecting; public float timeSinceFiringGun; public bool aimingGun; public bool reloadingGun; public Vector3 lastSeenPlayerPos; public RaycastHit rayHit; public Coroutine gunCoroutine; public bool isLeaderScript; public Vector3 positionLastCheck; public Vector3 strafePosition; public bool reachedStrafePosition; public bool lostPlayerInChase; public float timeSinceHittingPlayer; public Coroutine waitToFireGunCoroutine; public float walkCheckInterval; public int setShotgunScrapValue; public int timesSeeingSamePlayer; public int previousPlayerSeenWhenAiming; public float speedWhileAiming; public float speedWhileMoving = 9.5f; public float widthSearch = 45f; public int rangeSearch = 30; public Transform target; public List aiBlackList = new List(); public bool isFiring = false; public int setHp = 5; public int Lives = 4; public bool Immortal = false; public bool onlyPlayers = false; public override void Start() { //IL_0046: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Start(); lastPlayerSeenMoving = 0; if (((NetworkBehaviour)this).IsServer) { InitializeNutcrackerValuesServerRpc(); if (base.enemyType.numberSpawned <= 1) { isLeaderScript = true; } } rayHit = default(RaycastHit); setHp = Configuration.nutSlayerHp.Value; Lives = Configuration.nutSlayerLives.Value; Immortal = Configuration.nutSlayerImmortal.Value; onlyPlayers = Configuration.onlyPlayersAttackSlayer.Value; base.enemyType.canDie = !Immortal; base.enemyHP = setHp; } [ServerRpc] public void InitializeNutcrackerValuesServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Unknown result type (might be due to invalid IL or missing references) //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0132: 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_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_00c2: 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)((NetworkBehaviour)this).__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(1891166366u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1891166366u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; GameObject val3 = Object.Instantiate(gunPrefab, ((Component)this).transform.position + Vector3.up * 0.5f, Quaternion.identity, RoundManager.Instance.spawnedScrapContainer); val3.GetComponent().Spawn(false); setShotgunScrapValue = Random.Range(Configuration.slayerShotgunMinValue.Value, Configuration.slayerShotgunMaxValue.Value + 1); GrabGun(val3); randomSeedNumber = Random.Range(0, 10000); InitializeNutcrackerValuesClientRpc(randomSeedNumber, NetworkObjectReference.op_Implicit(val3.GetComponent()), setShotgunScrapValue); } } [ClientRpc] public void InitializeNutcrackerValuesClientRpc(int randomSeed, NetworkObjectReference gunObject, int setShotgunValue) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: 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_008a: 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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2026217664u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, randomSeed); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref gunObject, default(ForNetworkSerializable)); BytePacker.WriteValueBitPacked(val2, setShotgunValue); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2026217664u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; setShotgunScrapValue = setShotgunValue; randomSeedNumber = randomSeed; gunObjectRef = gunObject; } } } private void GrabGun(GameObject gunObject) { gun = gunObject.GetComponent(); if ((Object)(object)gun == (Object)null) { ((EnemyAI)this).LogEnemyError("Gun in GrabGun function did not contain ShotgunItem component."); return; } ((GrabbableObject)gun).SetScrapValue(setShotgunScrapValue); RoundManager instance = RoundManager.Instance; instance.totalScrapValueInLevel += (float)((GrabbableObject)gun).scrapValue; ((GrabbableObject)gun).parentObject = gunPoint; ((GrabbableObject)gun).isHeldByEnemy = true; ((GrabbableObject)gun).grabbableToEnemies = false; ((GrabbableObject)gun).grabbable = false; gun.shellsLoaded = 2; ((GrabbableObject)gun).GrabItemFromEnemy((EnemyAI)(object)this); } private void DropGun(Vector3 dropPosition) { if ((Object)(object)gun == (Object)null) { ((EnemyAI)this).LogEnemyError("Could not drop gun since no gun was held!"); return; } ((GrabbableObject)gun).DiscardItemFromEnemy(); ((GrabbableObject)gun).isHeldByEnemy = false; ((GrabbableObject)gun).grabbableToEnemies = true; ((GrabbableObject)gun).grabbable = true; } private void SpawnShotgunShells() { //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0022: 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) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_005b: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: 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_006d: Unknown result type (might be due to invalid IL or missing references) if (((NetworkBehaviour)this).IsOwner) { for (int i = 0; i < 2; i++) { Vector3 val = ((Component)this).transform.position + Vector3.up * 0.6f; val += new Vector3(Random.Range(-0.8f, 0.8f), 0f, Random.Range(-0.8f, 0.8f)); GameObject val2 = Object.Instantiate(shotgunShellPrefab, val, Quaternion.identity, RoundManager.Instance.spawnedScrapContainer); val2.GetComponent().fallTime = 0f; val2.GetComponent().Spawn(false); } } } [ServerRpc] public void DropGunServerRpc(Vector3 dropPosition) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e9: Invalid comparison between Unknown and I4 //IL_0114: 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_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_00cf: 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)((NetworkBehaviour)this).__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(414091688u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref dropPosition); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 414091688u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; DropGunClientRpc(dropPosition); } } [ClientRpc] public void DropGunClientRpc(Vector3 dropPosition) { //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_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1357508234u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref dropPosition); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1357508234u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; DropGun(dropPosition); } } } public override void DoAIInterval() { //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_0210: 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_0438: Unknown result type (might be due to invalid IL or missing references) //IL_03b8: Unknown result type (might be due to invalid IL or missing references) //IL_03bd: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Unknown result type (might be due to invalid IL or missing references) //IL_02ed: Unknown result type (might be due to invalid IL or missing references) //IL_030c: Unknown result type (might be due to invalid IL or missing references) //IL_0311: Unknown result type (might be due to invalid IL or missing references) //IL_031b: Unknown result type (might be due to invalid IL or missing references) //IL_03c5: 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_03dd: Unknown result type (might be due to invalid IL or missing references) //IL_0392: Unknown result type (might be due to invalid IL or missing references) //IL_0399: Unknown result type (might be due to invalid IL or missing references) //IL_039f: Unknown result type (might be due to invalid IL or missing references) //IL_03a7: Unknown result type (might be due to invalid IL or missing references) //IL_03ac: 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_0369: Unknown result type (might be due to invalid IL or missing references) //IL_036f: Unknown result type (might be due to invalid IL or missing references) //IL_0377: Unknown result type (might be due to invalid IL or missing references) //IL_037c: Unknown result type (might be due to invalid IL or missing references) //IL_0251: Unknown result type (might be due to invalid IL or missing references) //IL_0263: Unknown result type (might be due to invalid IL or missing references) //IL_0268: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).DoAIInterval(); if (base.isEnemyDead || base.stunNormalizedTimer > 0f || (Object)(object)gun == (Object)null) { return; } switch (base.currentBehaviourStateIndex) { case 0: if (previousBehaviourStateAIInterval != base.currentBehaviourStateIndex) { previousBehaviourStateAIInterval = base.currentBehaviourStateIndex; base.agent.stoppingDistance = 0.02f; } if (!patrol.inProgress) { ((EnemyAI)this).StartSearch(((Component)this).transform.position, patrol); } break; case 2: if (previousBehaviourStateAIInterval != base.currentBehaviourStateIndex) { previousBehaviourStateAIInterval = base.currentBehaviourStateIndex; if (patrol.inProgress) { ((EnemyAI)this).StopSearch(patrol, true); } } if (timeSinceSeeingTarget >= 3f) { ((EnemyAI)this).SwitchToBehaviourState(0); } if (timeSinceFiringGun >= 10f && !attackSearch.inProgress) { ((EnemyAI)this).SwitchToBehaviourState(0); timeSinceFiringGun = 0f; } if (!((NetworkBehaviour)this).IsOwner) { break; } if (timeSinceSeeingTarget < 0.5f) { if (attackSearch.inProgress) { ((EnemyAI)this).StopSearch(attackSearch, true); } reachedStrafePosition = false; ((EnemyAI)this).SetDestinationToPosition(lastSeenPlayerPos, false); base.agent.stoppingDistance = 1f; if (lostPlayerInChase) { lostPlayerInChase = false; SetLostPlayerInChaseServerRpc(lostPlayer: false); } break; } base.agent.stoppingDistance = 0.02f; if (!reachedStrafePosition) { if (!base.agent.CalculatePath(lastSeenPlayerPos, base.path1)) { break; } if (base.DebugEnemy) { for (int i = 1; i < base.path1.corners.Length; i++) { Debug.DrawLine(base.path1.corners[i - 1], base.path1.corners[i], Color.red, base.AIIntervalTime); } } if (base.path1.corners.Length > 1) { Ray val = default(Ray); ((Ray)(ref val))..ctor(base.path1.corners[base.path1.corners.Length - 1], base.path1.corners[base.path1.corners.Length - 1] - base.path1.corners[base.path1.corners.Length - 2]); if (Physics.Raycast(val, ref rayHit, 5f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { strafePosition = RoundManager.Instance.GetNavMeshPosition(((Ray)(ref val)).GetPoint(Mathf.Max(0f, ((RaycastHit)(ref rayHit)).distance - 2f)), default(NavMeshHit), 5f, -1); } else { strafePosition = RoundManager.Instance.GetNavMeshPosition(((Ray)(ref val)).GetPoint(6f), default(NavMeshHit), 5f, -1); } } else { strafePosition = lastSeenPlayerPos; } ((EnemyAI)this).SetDestinationToPosition(strafePosition, false); if (Vector3.Distance(((Component)this).transform.position, strafePosition) < 2f) { reachedStrafePosition = true; } } else { if (!lostPlayerInChase) { lostPlayerInChase = true; SetLostPlayerInChaseServerRpc(lostPlayer: true); } if (!attackSearch.inProgress) { ((EnemyAI)this).StartSearch(strafePosition, attackSearch); } } break; } } [ServerRpc(RequireOwnership = false)] public void SetLostPlayerInChaseServerRpc(bool lostPlayer) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3029536429u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref lostPlayer, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3029536429u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetLostPlayerInChaseClientRpc(lostPlayer); } } } [ClientRpc] public void SetLostPlayerInChaseClientRpc(bool lostPlayer) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1309004243u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref lostPlayer, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1309004243u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; lostPlayerInChase = lostPlayer; if (!lostPlayer) { timeSinceSeeingTarget = 0f; } } } private bool GrabGunIfNotHolding() { if ((Object)(object)gun != (Object)null) { return true; } NetworkObject val = default(NetworkObject); if (((NetworkObjectReference)(ref gunObjectRef)).TryGet(ref val, (NetworkManager)null)) { gun = ((Component)val).gameObject.GetComponent(); GrabGun(((Component)gun).gameObject); } return (Object)(object)gun != (Object)null; } public void TurnTorsoToTargetDegrees() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) currentTorsoRotation = Mathf.MoveTowardsAngle(currentTorsoRotation, (float)targetTorsoDegrees, Time.deltaTime * torsoTurnSpeed); torsoContainer.localEulerAngles = new Vector3(currentTorsoRotation + 90f, 90f, 90f); if (Mathf.Abs(currentTorsoRotation - (float)targetTorsoDegrees) > 5f) { if (!torsoTurning) { torsoTurning = true; torsoTurnAudio.Play(); } } else if (torsoTurning) { torsoTurning = false; torsoTurnAudio.Stop(); RoundManager.PlayRandomClip(torsoTurnAudio, torsoFinishTurningClips, true, 1f, 0, 1000); } torsoTurnAudio.volume = Mathf.Lerp(torsoTurnAudio.volume, 1f, Time.deltaTime * 2f); } private void SetTargetDegreesToPosition(Vector3 pos) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) pos.y = ((Component)this).transform.position.y; Vector3 val = pos - ((Component)this).transform.position; targetTorsoDegrees = (int)Vector3.Angle(val, ((Component)this).transform.forward); if (Vector3.Cross(((Component)this).transform.forward, val).y > 0f) { targetTorsoDegrees = 360 - targetTorsoDegrees; } torsoTurnSpeed = 1500f; } private void StartInspectionTurn() { if (!isInspecting && !base.isEnemyDead) { timesDoingInspection++; if (inspectionCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(inspectionCoroutine); } inspectionCoroutine = ((MonoBehaviour)this).StartCoroutine(InspectionTurn()); } } [IteratorStateMachine(typeof(d__74))] private IEnumerator InspectionTurn() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__74(0) { <>4__this = this }; } public void StopInspection() { if (isInspecting) { isInspecting = false; } if (inspectionCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(inspectionCoroutine); } } [ServerRpc(RequireOwnership = false)] public void SeeMovingThreatServerRpc(Vector3 position, bool enterAttackFromPatrolMode = false, int playerId = -1) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: 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_008a: 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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2375979427u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref position); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref enterAttackFromPatrolMode, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2375979427u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SeeMovingThreatClientRpc(position, enterAttackFromPatrolMode, playerId); } } } [ClientRpc] public void SeeMovingThreatClientRpc(Vector3 position, bool enterAttackFromPatrolMode = false, int playerId = -1) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cb: 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_008a: 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_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1812034362u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref position); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref enterAttackFromPatrolMode, default(ForPrimitives)); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1812034362u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SwitchTargetTo(position, playerId); ((EnemyAI)this).SwitchToBehaviourStateOnLocalClient(2); } } } private void GlobalNutcrackerClock() { if (isLeaderScript && Time.realtimeSinceStartup - timeAtNextInspection > 2f) { timeAtNextInspection = Time.realtimeSinceStartup + Random.Range(6f, 15f); } } public override void Update() { //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0087: 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_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_023d: Unknown result type (might be due to invalid IL or missing references) //IL_0216: Unknown result type (might be due to invalid IL or missing references) //IL_03bc: Unknown result type (might be due to invalid IL or missing references) //IL_03dd: Unknown result type (might be due to invalid IL or missing references) //IL_0414: Unknown result type (might be due to invalid IL or missing references) //IL_0419: Unknown result type (might be due to invalid IL or missing references) //IL_0470: Unknown result type (might be due to invalid IL or missing references) //IL_056f: Unknown result type (might be due to invalid IL or missing references) //IL_058a: Unknown result type (might be due to invalid IL or missing references) //IL_059a: 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_04df: Unknown result type (might be due to invalid IL or missing references) //IL_051a: Unknown result type (might be due to invalid IL or missing references) //IL_051f: Unknown result type (might be due to invalid IL or missing references) //IL_05f6: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)this).Update(); TurnTorsoToTargetDegrees(); if (base.isEnemyDead) { StopInspection(); return; } GlobalNutcrackerClock(); if (!base.isEnemyDead && !GrabGunIfNotHolding()) { return; } if (walkCheckInterval <= 0f) { walkCheckInterval = 0.1f; Animator creatureAnimator = base.creatureAnimator; Vector3 val = ((Component)this).transform.position - positionLastCheck; creatureAnimator.SetBool("IsWalking", ((Vector3)(ref val)).sqrMagnitude > 0.001f); positionLastCheck = ((Component)this).transform.position; } else { walkCheckInterval -= Time.deltaTime; } if (base.stunNormalizedTimer >= 0f) { base.agent.speed = 0f; return; } timeSinceSeeingTarget += Time.deltaTime; timeSinceInspecting += Time.deltaTime; timeSinceFiringGun += Time.deltaTime; timeSinceHittingPlayer += Time.deltaTime; base.creatureAnimator.SetInteger("State", base.currentBehaviourStateIndex); base.creatureAnimator.SetBool("Aiming", aimingGun); switch (base.currentBehaviourStateIndex) { case 0: if (previousBehaviourState != base.currentBehaviourStateIndex) { previousBehaviourState = base.currentBehaviourStateIndex; isInspecting = false; lostPlayerInChase = false; base.creatureVoice.Stop(); } base.agent.speed = speedWhileMoving; targetTorsoDegrees = 0; torsoTurnSpeed = 525f; if (CheckLineOfSightForTarget(widthSearch, rangeSearch, 1)) { if (IsLocalPlayerMoving()) { SeeMovingThreatServerRpc(Vector3.zero, enterAttackFromPatrolMode: false, (int)GameNetworkManager.Instance.localPlayerController.playerClientId); } else { SeeMovingThreatServerRpc(target.position); } } break; case 2: if (previousBehaviourState != base.currentBehaviourStateIndex) { if (previousBehaviourState != 1) { longRangeAudio.PlayOneShot(base.enemyType.audioClips[3]); } StopInspection(); previousBehaviourState = base.currentBehaviourStateIndex; } if (((NetworkBehaviour)this).IsOwner) { if (reloadingGun || aimingGun || (timeSinceFiringGun < 1.2f && timeSinceSeeingTarget < 0.5f) || timeSinceHittingPlayer < 1f) { if (aimingGun && !reloadingGun) { base.agent.speed = speedWhileAiming; } else { base.agent.speed = 0f; } } else { base.agent.speed = 7f; } } if (((NetworkBehaviour)this).IsOwner && timeSinceFiringGun > 0.75f && gun.shellsLoaded <= 0 && !reloadingGun && !aimingGun) { reloadingGun = true; ReloadGunServerRpc(); } if (lostPlayerInChase) { targetTorsoDegrees = 0; } else { SetTargetDegreesToPosition(lastSeenPlayerPos); } if ((Object)(object)target != (Object)null && HasLineOfSightToPositionCopy(target.position, widthSearch, rangeSearch, 1f)) { timeSinceSeeingTarget = 0f; lastSeenPlayerPos = target.position; } else if (!CheckLineOfSightForTarget(70f, 12, 1)) { break; } if (CheckLineOfSightForTarget(widthSearch, 12, 1) && timeSinceSeeingTarget < 3f) { SetTargetDegreesToPosition(target.position); TurnTorsoToTargetDegrees(); if (timeSinceFiringGun > ((GrabbableObject)gun).useCooldown && !reloadingGun && !aimingGun && timeSinceHittingPlayer > 1f) { timeSinceFiringGun = 0f; base.agent.speed = 0f; AimGunServerRpc(((Component)this).transform.position); } if (lostPlayerInChase) { lostPlayerInChase = false; SetLostPlayerInChaseServerRpc(lostPlayer: false); } timeSinceSeeingTarget = 0f; lastSeenPlayerPos = target.position; } else if (IsLocalPlayerMoving()) { bool flag = (int)GameNetworkManager.Instance.localPlayerController.playerClientId == lastPlayerSeenMoving; if (flag) { timeSinceSeeingTarget = 0f; } if (Vector3.Distance(((Component)this).transform.position, ((Component)StartOfRound.Instance.allPlayerScripts[lastPlayerSeenMoving]).transform.position) - Vector3.Distance(((Component)this).transform.position, ((Component)GameNetworkManager.Instance.localPlayerController).transform.position) > 3f || (timeSinceSeeingTarget > 3f && !flag)) { lastPlayerSeenMoving = (int)GameNetworkManager.Instance.localPlayerController.playerClientId; SwitchTargetServerRpc(Vector3.zero, (int)GameNetworkManager.Instance.localPlayerController.playerClientId); } } break; } } [ServerRpc] public void ReloadGunServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: 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_00c2: 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)((NetworkBehaviour)this).__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(304019818u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 304019818u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (aimingGun) { reloadingGun = false; } else { ReloadGunClientRpc(); } } } [ClientRpc] public void ReloadGunClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(663905464u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 663905464u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; StopAimingGun(); gun.shellsLoaded = 2; gunCoroutine = ((MonoBehaviour)this).StartCoroutine(ReloadGun()); } } } [IteratorStateMachine(typeof(d__82))] private IEnumerator ReloadGun() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__82(0) { <>4__this = this }; } private void StopReloading() { reloadingGun = false; gun.gunAnimator.SetBool("Reloading", false); base.creatureAnimator.SetBool("Reloading", false); if (gunCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(gunCoroutine); } } [ServerRpc(RequireOwnership = false)] public void AimGunServerRpc(Vector3 enemyPos) { //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_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_0111: 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)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(2690841730u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref enemyPos); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 2690841730u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (gun.shellsLoaded <= 0) { aimingGun = false; ReloadGunClientRpc(); } else if (!reloadingGun) { aimingGun = true; AimGunClientRpc(enemyPos); } } } [ClientRpc] public void AimGunClientRpc(Vector3 enemyPos) { //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_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(996895810u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref enemyPos); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 996895810u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; StopReloading(); gunCoroutine = ((MonoBehaviour)this).StartCoroutine(AimGun(enemyPos)); } } } [IteratorStateMachine(typeof(d__86))] private IEnumerator AimGun(Vector3 enemyPos) { //IL_000e: 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) //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__86(0) { <>4__this = this, enemyPos = enemyPos }; } [ServerRpc] public void FireGunServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Invalid comparison between Unknown and I4 //IL_0107: 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_00c2: 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)((NetworkBehaviour)this).__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(664988742u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 664988742u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (base.stunNormalizedTimer <= 0f) { FireGunClientRpc(); } else { ((MonoBehaviour)this).StartCoroutine(waitToFireGun()); } } } [ClientRpc] public void FireGunClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_012e: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_014e: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0171: Unknown result type (might be due to invalid IL or missing references) //IL_018c: Unknown result type (might be due to invalid IL or missing references) //IL_0191: 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)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(738202313u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 738202313u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if ((Object)(object)gun == (Object)null) { Log.LogError("FireGunClientRpc failed: gun is null"); } else if ((Object)(object)gun.shotgunRayPoint == (Object)null) { Log.LogError("FireGunClientRpc failed: gun.shotgunRayPoint is null"); } else if (!((Object)(object)target == (Object)null)) { float x = gun.shotgunRayPoint.forward.x; Vector3 val3 = target.position - gun.shotgunRayPoint.position; Vector3 gunForward = default(Vector3); ((Vector3)(ref gunForward))..ctor(x, ((Vector3)(ref val3)).normalized.y, gun.shotgunRayPoint.forward.z); FireGun(gun.shotgunRayPoint.position, gunForward); } } } [IteratorStateMachine(typeof(d__89))] private IEnumerator waitToFireGun() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__89(0) { <>4__this = this }; } private void StopAimingGun() { base.inSpecialAnimation = false; aimingGun = false; if (gunCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(gunCoroutine); } } private void FireGun(Vector3 gunPosition, Vector3 gunForward) { //IL_0009: Unknown result type (might be due to invalid IL or missing references) //IL_000a: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_0019: 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) //IL_002d: Unknown result type (might be due to invalid IL or missing references) isFiring = true; fire(gunPosition, gunForward); ((MonoBehaviour)this).StartCoroutine(fireAfterDelay(0.35f, gunPosition, gunForward)); ((MonoBehaviour)this).StartCoroutine(fireAfterDelay(0.7f, gunPosition, gunForward)); isFiring = false; } [IteratorStateMachine(typeof(d__92))] private IEnumerator fireAfterDelay(float time, Vector3 gunPosition, Vector3 gunForward) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__92(0) { <>4__this = this, time = time, gunPosition = gunPosition, gunForward = gunForward }; } private void fire(Vector3 gunPosition, Vector3 gunForward) { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) base.creatureAnimator.ResetTrigger("ShootGun"); base.creatureAnimator.SetTrigger("ShootGun"); if ((Object)(object)gun == (Object)null) { ((EnemyAI)this).LogEnemyError("No gun held on local client, unable to shoot"); } else { gun.ShootGun(gunPosition, gunForward); } } [ServerRpc(RequireOwnership = false)] public void SwitchTargetServerRpc(Vector3 position, int playerId = -1) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1627560924u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref position); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1627560924u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SwitchTargetClientRpc(position, playerId); } } } [ClientRpc] public void SwitchTargetClientRpc(Vector3 position, int playerId = -1) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(447869165u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref position); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 447869165u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SwitchTargetTo(position, playerId); } } } private void SwitchTargetTo(Vector3 position, int playerId = -1) { //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_004c: 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_0036: Unknown result type (might be due to invalid IL or missing references) if (playerId != -1) { lastPlayerSeenMoving = playerId; timeSinceSeeingTarget = 0f; lastSeenPlayerPos = ((Component)StartOfRound.Instance.allPlayerScripts[playerId]).transform.position; } else { timeSinceSeeingTarget = 0f; lastSeenPlayerPos = position; } } public bool CheckLineOfSightForTarget(float width = 45f, int range = 60, int proximityAwareness = -1) { //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0022: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0086: 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_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_011f: 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_0132: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_014d: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) Vector3 position = ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.position; if (Vector3.Distance(position, base.eye.position) < (float)range && !Physics.Linecast(base.eye.position, position, StartOfRound.Instance.collidersAndRoomMaskAndDefault)) { Vector3 val = position - base.eye.position; if (Vector3.Angle(base.eye.forward, val) < width || (proximityAwareness != -1 && Vector3.Distance(base.eye.position, position) < (float)proximityAwareness)) { target = ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform; return true; } } foreach (EnemyAI spawnedEnemy in RoundManager.Instance.SpawnedEnemies) { if (!((Object)(object)spawnedEnemy == (Object)null) && !((Object)(object)((Component)spawnedEnemy).transform == (Object)null) && !spawnedEnemy.isEnemyDead) { position = ((Component)spawnedEnemy).transform.position; Vector3 val2 = position - base.eye.position; if (Vector3.Distance(position, base.eye.position) < (float)range && !Physics.Linecast(base.eye.position, position, StartOfRound.Instance.collidersAndRoomMaskAndDefault) && (Vector3.Angle(base.eye.forward, val2) < width || (proximityAwareness != -1 && Vector3.Distance(base.eye.position, position) < (float)proximityAwareness))) { target = ((Component)spawnedEnemy).transform; return true; } } } return false; } private bool IsLocalPlayerMoving() { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) localPlayerTurnDistance += StartOfRound.Instance.playerLookMagnitudeThisFrame; if (localPlayerTurnDistance > 0.1f && Vector3.Distance(((Component)GameNetworkManager.Instance.localPlayerController).transform.position, ((Component)this).transform.position) < 10f) { return true; } if (GameNetworkManager.Instance.localPlayerController.performingEmote) { return true; } if (Time.realtimeSinceStartup - StartOfRound.Instance.timeAtMakingLastPersonalMovement < 0.25f) { return true; } if (GameNetworkManager.Instance.localPlayerController.timeSincePlayerMoving < 0.02f) { return true; } return false; } public override void OnCollideWithPlayer(Collider other) { ((EnemyAI)this).OnCollideWithPlayer(other); if (!base.isEnemyDead && !(timeSinceHittingPlayer < 1f) && !(base.stunNormalizedTimer >= 0f)) { PlayerControllerB val = ((EnemyAI)this).MeetsStandardPlayerCollisionConditions(other, reloadingGun || aimingGun, false); if ((Object)(object)val != (Object)null) { timeSinceHittingPlayer = 0f; LegKickPlayerServerRpc((int)val.playerClientId); } } } [ServerRpc(RequireOwnership = false)] public void LegKickPlayerServerRpc(int playerId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(3545391484u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 3545391484u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; LegKickPlayerClientRpc(playerId); } } } [ClientRpc] public void LegKickPlayerClientRpc(int playerId) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2431147278u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerId); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2431147278u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; LegKickPlayer(playerId); } } } private void LegKickPlayer(int playerId) { //IL_0029: 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_0064: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Unknown result type (might be due to invalid IL or missing references) //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: 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_00ef: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: 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_0158: Unknown result type (might be due to invalid IL or missing references) timeSinceHittingPlayer = 0f; PlayerControllerB val = StartOfRound.Instance.allPlayerScripts[playerId]; RoundManager.Instance.tempTransform.position = ((Component)this).transform.position; RoundManager.Instance.tempTransform.LookAt(((Component)val).transform.position); ((Component)this).transform.eulerAngles = new Vector3(0f, RoundManager.Instance.tempTransform.eulerAngles.y, 0f); base.serverRotation = new Vector3(0f, RoundManager.Instance.tempTransform.eulerAngles.y, 0f); Vector3 val2 = Vector3.Normalize((((Component)val).transform.position + Vector3.up * 0.75f - ((Component)this).transform.position) * 100f) * 25f; val.KillPlayer(val2, true, (CauseOfDeath)12, 0, default(Vector3), false); base.creatureAnimator.SetTrigger("Kick"); base.creatureSFX.Stop(); torsoTurnAudio.volume = 0f; base.creatureSFX.PlayOneShot(kickSFX); if (base.currentBehaviourStateIndex != 2) { SwitchTargetTo(Vector3.zero, playerId); ((EnemyAI)this).SwitchToBehaviourStateOnLocalClient(2); } } public override void HitEnemy(int force = 1, PlayerControllerB playerWhoHit = null, bool playHitSFX = false, int hitID = -1) { //IL_00b7: Unknown result type (might be due to invalid IL or missing references) if (Immortal || (onlyPlayers && (Object)(object)playerWhoHit == (Object)null)) { return; } ((EnemyAI)this).HitEnemy(force, playerWhoHit, playHitSFX, -1); if (!base.isEnemyDead) { if (isInspecting || base.currentBehaviourStateIndex == 2) { base.creatureSFX.PlayOneShot(base.enemyType.audioClips[0]); base.enemyHP -= force; } else { base.creatureSFX.PlayOneShot(base.enemyType.audioClips[1]); } if ((Object)(object)playerWhoHit != (Object)null) { SeeMovingThreatServerRpc(Vector3.zero, enterAttackFromPatrolMode: true, (int)playerWhoHit.playerClientId); } if (base.enemyHP <= 0 && ((NetworkBehaviour)this).IsOwner) { ((EnemyAI)this).KillEnemyOnOwnerClient(false); } } } [ServerRpc(RequireOwnership = false)] private void SetLivesServerRpc(int value) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(320575105u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, value); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 320575105u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; SetLivesClientRpc(value); } } } [ClientRpc] private void SetLivesClientRpc(int value) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2777929231u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, value); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2777929231u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; Lives = value; base.enemyHP = setHp; } } } public override void KillEnemy(bool destroy = false) { //IL_0084: Unknown result type (might be due to invalid IL or missing references) if (Immortal) { return; } Lives--; base.enemyHP = setHp; if (NetworkManager.Singleton.IsServer) { SetLivesServerRpc(Lives); } if (Lives <= 0) { ((EnemyAI)this).KillEnemy(destroy); targetTorsoDegrees = 0; StopInspection(); StopReloading(); if (((NetworkBehaviour)this).IsOwner) { DropGunServerRpc(gunPoint.position); ((MonoBehaviour)this).StartCoroutine(spawnShotgunShellsOnDelay()); } base.creatureVoice.Stop(); torsoTurnAudio.Stop(); } } [IteratorStateMachine(typeof(d__107))] private IEnumerator spawnShotgunShellsOnDelay() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__107(0) { <>4__this = this }; } public bool HasLineOfSightToPositionCopy(Vector3 pos, float width = 45f, int range = 60, float proximityAwareness = -1f) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0030: 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_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //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_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0078: 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_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) if ((Object)(object)base.eye == (Object)null) { _ = ((Component)this).transform; } else { _ = base.eye; } if (Vector3.Distance(base.eye.position, pos) < (float)range && !Physics.Linecast(base.eye.position, pos, StartOfRound.Instance.collidersAndRoomMaskAndDefault)) { Vector3 val = pos - base.eye.position; if (Vector3.Angle(base.eye.forward, val) < width || Vector3.Distance(((Component)this).transform.position, pos) < proximityAwareness) { return true; } } return false; } protected override void __initializeVariables() { ((EnemyAI)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown //IL_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00c4: Expected O, but got Unknown //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown //IL_0109: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Expected O, but got Unknown //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0150: Expected O, but got Unknown //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_016c: Expected O, but got Unknown //IL_0179: Unknown result type (might be due to invalid IL or missing references) //IL_0188: Expected O, but got Unknown //IL_0195: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Expected O, but got Unknown //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Expected O, but got Unknown //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01dc: Expected O, but got Unknown //IL_01e9: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: Expected O, but got Unknown //IL_0205: Unknown result type (might be due to invalid IL or missing references) //IL_0214: Expected O, but got Unknown //IL_0221: Unknown result type (might be due to invalid IL or missing references) //IL_0230: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1891166366u, new RpcReceiveHandler(__rpc_handler_1891166366), "InitializeNutcrackerValuesServerRpc"); ((NetworkBehaviour)this).__registerRpc(2026217664u, new RpcReceiveHandler(__rpc_handler_2026217664), "InitializeNutcrackerValuesClientRpc"); ((NetworkBehaviour)this).__registerRpc(414091688u, new RpcReceiveHandler(__rpc_handler_414091688), "DropGunServerRpc"); ((NetworkBehaviour)this).__registerRpc(1357508234u, new RpcReceiveHandler(__rpc_handler_1357508234), "DropGunClientRpc"); ((NetworkBehaviour)this).__registerRpc(3029536429u, new RpcReceiveHandler(__rpc_handler_3029536429), "SetLostPlayerInChaseServerRpc"); ((NetworkBehaviour)this).__registerRpc(1309004243u, new RpcReceiveHandler(__rpc_handler_1309004243), "SetLostPlayerInChaseClientRpc"); ((NetworkBehaviour)this).__registerRpc(2375979427u, new RpcReceiveHandler(__rpc_handler_2375979427), "SeeMovingThreatServerRpc"); ((NetworkBehaviour)this).__registerRpc(1812034362u, new RpcReceiveHandler(__rpc_handler_1812034362), "SeeMovingThreatClientRpc"); ((NetworkBehaviour)this).__registerRpc(304019818u, new RpcReceiveHandler(__rpc_handler_304019818), "ReloadGunServerRpc"); ((NetworkBehaviour)this).__registerRpc(663905464u, new RpcReceiveHandler(__rpc_handler_663905464), "ReloadGunClientRpc"); ((NetworkBehaviour)this).__registerRpc(2690841730u, new RpcReceiveHandler(__rpc_handler_2690841730), "AimGunServerRpc"); ((NetworkBehaviour)this).__registerRpc(996895810u, new RpcReceiveHandler(__rpc_handler_996895810), "AimGunClientRpc"); ((NetworkBehaviour)this).__registerRpc(664988742u, new RpcReceiveHandler(__rpc_handler_664988742), "FireGunServerRpc"); ((NetworkBehaviour)this).__registerRpc(738202313u, new RpcReceiveHandler(__rpc_handler_738202313), "FireGunClientRpc"); ((NetworkBehaviour)this).__registerRpc(1627560924u, new RpcReceiveHandler(__rpc_handler_1627560924), "SwitchTargetServerRpc"); ((NetworkBehaviour)this).__registerRpc(447869165u, new RpcReceiveHandler(__rpc_handler_447869165), "SwitchTargetClientRpc"); ((NetworkBehaviour)this).__registerRpc(3545391484u, new RpcReceiveHandler(__rpc_handler_3545391484), "LegKickPlayerServerRpc"); ((NetworkBehaviour)this).__registerRpc(2431147278u, new RpcReceiveHandler(__rpc_handler_2431147278), "LegKickPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(320575105u, new RpcReceiveHandler(__rpc_handler_320575105), "SetLivesServerRpc"); ((NetworkBehaviour)this).__registerRpc(2777929231u, new RpcReceiveHandler(__rpc_handler_2777929231), "SetLivesClientRpc"); ((EnemyAI)this).__initializeRpcs(); } private static void __rpc_handler_1891166366(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((NutSlayerAI)(object)target).InitializeNutcrackerValuesServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2026217664(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_003c: 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_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005e: 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_0080: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int randomSeed = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref randomSeed); NetworkObjectReference gunObject = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref gunObject, default(ForNetworkSerializable)); int setShotgunValue = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref setShotgunValue); target.__rpc_exec_stage = (__RpcExecStage)1; ((NutSlayerAI)(object)target).InitializeNutcrackerValuesClientRpc(randomSeed, gunObject, setShotgunValue); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_414091688(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: 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_008e: 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_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { Vector3 dropPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref dropPosition); target.__rpc_exec_stage = (__RpcExecStage)1; ((NutSlayerAI)(object)target).DropGunServerRpc(dropPosition); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1357508234(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: 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_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 dropPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref dropPosition); target.__rpc_exec_stage = (__RpcExecStage)1; ((NutSlayerAI)(object)target).DropGunClientRpc(dropPosition); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3029536429(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool lostPlayerInChaseServerRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref lostPlayerInChaseServerRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((NutSlayerAI)(object)target).SetLostPlayerInChaseServerRpc(lostPlayerInChaseServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1309004243(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool lostPlayerInChaseClientRpc = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref lostPlayerInChaseClientRpc, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((NutSlayerAI)(object)target).SetLostPlayerInChaseClientRpc(lostPlayerInChaseClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2375979427(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_003c: 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_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); bool enterAttackFromPatrolMode = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref enterAttackFromPatrolMode, default(ForPrimitives)); int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((NutSlayerAI)(object)target).SeeMovingThreatServerRpc(position, enterAttackFromPatrolMode, playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1812034362(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_003c: 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_004b: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); bool enterAttackFromPatrolMode = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref enterAttackFromPatrolMode, default(ForPrimitives)); int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((NutSlayerAI)(object)target).SeeMovingThreatClientRpc(position, enterAttackFromPatrolMode, playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_304019818(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((NutSlayerAI)(object)target).ReloadGunServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_663905464(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((NutSlayerAI)(object)target).ReloadGunClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2690841730(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: 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_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 enemyPos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref enemyPos); target.__rpc_exec_stage = (__RpcExecStage)1; ((NutSlayerAI)(object)target).AimGunServerRpc(enemyPos); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_996895810(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0036: 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_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 enemyPos = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref enemyPos); target.__rpc_exec_stage = (__RpcExecStage)1; ((NutSlayerAI)(object)target).AimGunClientRpc(enemyPos); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_664988742(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { target.__rpc_exec_stage = (__RpcExecStage)1; ((NutSlayerAI)(object)target).FireGunServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_738202313(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((NutSlayerAI)(object)target).FireGunClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1627560924(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((NutSlayerAI)(object)target).SwitchTargetServerRpc(position, playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_447869165(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 position = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref position); int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((NutSlayerAI)(object)target).SwitchTargetClientRpc(position, playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_3545391484(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((NutSlayerAI)(object)target).LegKickPlayerServerRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2431147278(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerId = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerId); target.__rpc_exec_stage = (__RpcExecStage)1; ((NutSlayerAI)(object)target).LegKickPlayerClientRpc(playerId); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_320575105(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int livesServerRpc = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref livesServerRpc); target.__rpc_exec_stage = (__RpcExecStage)1; ((NutSlayerAI)(object)target).SetLivesServerRpc(livesServerRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2777929231(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int livesClientRpc = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref livesClientRpc); target.__rpc_exec_stage = (__RpcExecStage)1; ((NutSlayerAI)(object)target).SetLivesClientRpc(livesClientRpc); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "NutSlayerAI"; } } [HarmonyPatch] public class Passage : NetworkBehaviour { internal Passage otherPassage; public bool isInsideBuilding; public Transform spawnPosition; public InteractTrigger passageTrigger; public int audioReverbPreset = -1; public AudioSource passageAudioSource; public AudioClip[] doorAudios; internal static float checkForEnemyInterval; private static int bunkerPassagesToSpawn; public override void OnNetworkSpawn() { ((NetworkBehaviour)this).OnNetworkSpawn(); audioReverbPreset = ((!isInsideBuilding) ? 1 : 2); } public virtual void TeleportPlayer() { //IL_0026: 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_0070: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) Transform thisPlayerBody = GameNetworkManager.Instance.localPlayerController.thisPlayerBody; GameNetworkManager.Instance.localPlayerController.TeleportPlayer(otherPassage.spawnPosition.position, false, 0f, false, true); GameNetworkManager.Instance.localPlayerController.isInElevator = false; GameNetworkManager.Instance.localPlayerController.isInHangarShipRoom = false; thisPlayerBody.eulerAngles = new Vector3(thisPlayerBody.eulerAngles.x, otherPassage.spawnPosition.eulerAngles.y, thisPlayerBody.eulerAngles.z); SetAudioPreset((int)GameNetworkManager.Instance.localPlayerController.playerClientId); for (int i = 0; i < GameNetworkManager.Instance.localPlayerController.ItemSlots.Length; i++) { if ((Object)(object)GameNetworkManager.Instance.localPlayerController.ItemSlots[i] != (Object)null) { GameNetworkManager.Instance.localPlayerController.ItemSlots[i].isInFactory = isInsideBuilding; } } TeleportPlayerServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); GameNetworkManager.Instance.localPlayerController.isInsideFactory = isInsideBuilding; if (Compatibility.cullFactoryPresent) { Compatibility.cullOnTeleportLocalPlayer.Invoke(null, null); } } [ServerRpc(RequireOwnership = false)] private void TeleportPlayerServerRpc(int playerID) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(1401561583u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerID); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1401561583u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; TeleportPlayerClientRpc(playerID); } } } [ClientRpc] private void TeleportPlayerClientRpc(int playerID) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_010e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(1681378858u, val, (RpcDelivery)0); BytePacker.WriteValueBitPacked(val2, playerID); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 1681378858u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage != 1 || (!networkManager.IsClient && !networkManager.IsHost)) { return; } base.__rpc_exec_stage = (__RpcExecStage)0; StartOfRound instance = StartOfRound.Instance; if ((Object)(object)instance == (Object)null) { return; } instance.allPlayerScripts[playerID].TeleportPlayer(otherPassage.spawnPosition.position, true, otherPassage.spawnPosition.eulerAngles.y, false, true); instance.allPlayerScripts[playerID].isInElevator = false; instance.allPlayerScripts[playerID].isInHangarShipRoom = false; instance.allPlayerScripts[playerID].isInsideFactory = isInsideBuilding; for (int i = 0; i < instance.allPlayerScripts[playerID].ItemSlots.Length; i++) { if ((Object)(object)instance.allPlayerScripts[playerID].ItemSlots[i] != (Object)null) { instance.allPlayerScripts[playerID].ItemSlots[i].isInFactory = isInsideBuilding; } } if (GameNetworkManager.Instance.localPlayerController.isPlayerDead && (Object)(object)instance.allPlayerScripts[playerID] == (Object)(object)GameNetworkManager.Instance.localPlayerController.spectatedPlayerScript) { SetAudioPreset(playerID); } if (Compatibility.cullFactoryPresent) { Compatibility.cullOnTeleportOtherPlayer.Invoke(null, new object[1] { playerID }); } } public void SetAudioPreset(int playerObj) { if (audioReverbPreset != -1) { Object.FindObjectOfType().audioPresets[audioReverbPreset].ChangeAudioReverbForPlayer(StartOfRound.Instance.allPlayerScripts[playerObj]); } } [ServerRpc(RequireOwnership = false)] public void PlayAudioAtTeleportPositionsServerRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(841996285u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 841996285u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PlayAudioAtTeleportPositionsClientRpc(); } } } [ClientRpc] public void PlayAudioAtTeleportPositionsClientRpc() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_0096: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_00c1: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(992909530u, val, (RpcDelivery)0); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 992909530u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; PlayAudioAtTeleportPositions(); } } } public void PlayAudioAtTeleportPositions() { if (doorAudios.Length != 0) { passageAudioSource.PlayOneShot(doorAudios[Random.Range(0, doorAudios.Length)]); otherPassage.passageAudioSource.PlayOneShot(doorAudios[Random.Range(0, doorAudios.Length)]); } } [ServerRpc(RequireOwnership = false)] public void SyncBunkerPassagesServerRpc(NetworkObjectReference entrance, NetworkObjectReference exit) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) //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) 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(757507315u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref entrance, default(ForNetworkSerializable)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref exit, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 757507315u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; SyncBunkerPassagesClientRpc(entrance, exit); } } } [ClientRpc] public void SyncBunkerPassagesClientRpc(NetworkObjectReference entrance, NetworkObjectReference exit) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00c2: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00b2: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)base.__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(2493008230u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref entrance, default(ForNetworkSerializable)); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref exit, default(ForNetworkSerializable)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 2493008230u, val, (RpcDelivery)0); } if ((int)base.__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { base.__rpc_exec_stage = (__RpcExecStage)0; NetworkObject val3 = default(NetworkObject); ((NetworkObjectReference)(ref entrance)).TryGet(ref val3, (NetworkManager)null); NetworkObject val4 = default(NetworkObject); ((NetworkObjectReference)(ref exit)).TryGet(ref val4, (NetworkManager)null); BunkerLidPassage component = ((Component)((Component)val3).transform.Find("EntrancePassage")).GetComponent(); BunkerLadderPassage component2 = ((Component)((Component)val4).transform.Find("EscapePassage")).GetComponent(); BunkerLid component3 = ((Component)((Component)val3).transform.Find("Lid").Find("Interactable")).GetComponent(); component.otherPassage = component2; component2.otherPassage = component; component.bunkerLid = component3; component2.bunkerLid = component3; } } } public static void SpawnBunkerPassage(int amount) { bunkerPassagesToSpawn += amount; } [HarmonyPostfix] [HarmonyPatch(typeof(RoundManager), "RefreshEnemiesList")] private static void DoSpawnBunkerPassage() { //IL_00cb: Unknown result type (might be due to invalid IL or missing references) //IL_00d0: 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_00d7: 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_0110: Unknown result type (might be due to invalid IL or missing references) //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0122: Unknown result type (might be due to invalid IL or missing references) //IL_0124: Unknown result type (might be due to invalid IL or missing references) //IL_019c: 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_0134: 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_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_01c2: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_0151: Unknown result type (might be due to invalid IL or missing references) //IL_0156: 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_0179: Unknown result type (might be due to invalid IL or missing references) //IL_017e: Unknown result type (might be due to invalid IL or missing references) //IL_0183: Unknown result type (might be due to invalid IL or missing references) //IL_01f3: Unknown result type (might be due to invalid IL or missing references) //IL_01f8: 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_031f: Unknown result type (might be due to invalid IL or missing references) //IL_0321: 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_0363: Unknown result type (might be due to invalid IL or missing references) //IL_0370: Unknown result type (might be due to invalid IL or missing references) //IL_0372: Unknown result type (might be due to invalid IL or missing references) //IL_037c: Unknown result type (might be due to invalid IL or missing references) //IL_0381: Unknown result type (might be due to invalid IL or missing references) //IL_03a3: Unknown result type (might be due to invalid IL or missing references) //IL_03a8: Unknown result type (might be due to invalid IL or missing references) //IL_03ae: Unknown result type (might be due to invalid IL or missing references) //IL_03bc: Unknown result type (might be due to invalid IL or missing references) //IL_03c6: Unknown result type (might be due to invalid IL or missing references) //IL_03d6: Unknown result type (might be due to invalid IL or missing references) //IL_03d8: Unknown result type (might be due to invalid IL or missing references) //IL_0411: Unknown result type (might be due to invalid IL or missing references) //IL_0416: Unknown result type (might be due to invalid IL or missing references) //IL_041c: Unknown result type (might be due to invalid IL or missing references) //IL_0430: Unknown result type (might be due to invalid IL or missing references) //IL_043a: Unknown result type (might be due to invalid IL or missing references) //IL_044a: Unknown result type (might be due to invalid IL or missing references) //IL_044c: Unknown result type (might be due to invalid IL or missing references) //IL_046c: Unknown result type (might be due to invalid IL or missing references) //IL_0478: Unknown result type (might be due to invalid IL or missing references) //IL_0341: Unknown result type (might be due to invalid IL or missing references) //IL_0355: Unknown result type (might be due to invalid IL or missing references) //IL_035a: Unknown result type (might be due to invalid IL or missing references) //IL_035f: Unknown result type (might be due to invalid IL or missing references) //IL_0219: Unknown result type (might be due to invalid IL or missing references) //IL_0248: Unknown result type (might be due to invalid IL or missing references) //IL_024a: 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_0229: Unknown result type (might be due to invalid IL or missing references) //IL_028a: Unknown result type (might be due to invalid IL or missing references) //IL_028f: Unknown result type (might be due to invalid IL or missing references) //IL_02c3: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02d9: Unknown result type (might be due to invalid IL or missing references) //IL_02de: Unknown result type (might be due to invalid IL or missing references) //IL_02e3: Unknown result type (might be due to invalid IL or missing references) //IL_0301: Unknown result type (might be due to invalid IL or missing references) //IL_0306: Unknown result type (might be due to invalid IL or missing references) if (bunkerPassagesToSpawn <= 0) { return; } int num = Net.Instance._seed++ + Environment.TickCount; List list = new List(); List list2 = new List(); List outsideNodes = Helper.GetOutsideNodes(); List insideAINodes = Helper.GetInsideAINodes(); List spawnDenialNodes = Helper.GetSpawnDenialNodes(); List fromNodes = (from s in Object.FindObjectsOfType() select ((Component)s).transform.position).ToList(); List fromNodes2 = (from l in Object.FindObjectsOfType() select ((Component)l).transform.position).ToList(); RaycastHit val3 = default(RaycastHit); for (int i = 0; i < bunkerPassagesToSpawn; i++) { Random random = new Random(num++); Vector3 val = Vector3.zero; Vector3 val2 = Vector3.zero; for (int j = 0; j < 20; j++) { random = new Random(num++); Vector3 randomNavMeshPositionInBoxPredictable = RoundManager.Instance.GetRandomNavMeshPositionInBoxPredictable(outsideNodes[random.Next(outsideNodes.Count)], 30f, RoundManager.Instance.navHit, random, -1, 1f); if (Helper.IsSafe(randomNavMeshPositionInBoxPredictable, spawnDenialNodes, 20f) && Helper.IsSafe(randomNavMeshPositionInBoxPredictable, list2, 15f)) { Physics.Raycast(new Ray(randomNavMeshPositionInBoxPredictable, Vector3.down), ref val3); val = ((RaycastHit)(ref val3)).point + new Vector3(0f, 0.05f, 0f); break; } } if (val == Vector3.zero) { val = outsideNodes[random.Next(outsideNodes.Count)]; } list2.Add(val); for (int k = 0; k < 100; k++) { random = new Random(num++); Vector3 val4 = insideAINodes[random.Next(insideAINodes.Count)]; if (!Helper.IsSafe(val4, spawnDenialNodes, 30f) || !Helper.IsSafe(val4, list, 15f) || !Helper.IsSafe(val4, fromNodes, 3f) || !Helper.IsSafe(val4, fromNodes2, 0.5f)) { continue; } RaycastHit[] array = Physics.RaycastAll(new Ray(val4, Vector3.up), 8f); if (array.Length == 0) { continue; } int num2 = 0; float num3 = 0f; for (int m = 0; m < array.Length; m++) { float num4 = Vector3.Distance(((RaycastHit)(ref array[m])).point, val4); if (num4 > num3) { num3 = num4; num2 = m; } } if (Physics.Raycast(new Ray(val4 - new Vector3(0f, -2f, 0f), Vector3.down))) { val2 = ((RaycastHit)(ref array[num2])).point; break; } } if (val2 == Vector3.zero) { val2 = insideAINodes[random.Next(outsideNodes.Count)] + new Vector3(0f, 5.3f, 0f); } list.Add(val2); float num5 = RoundManager.Instance.YRotationThatFacesTheFarthestFromPosition(val2 + Vector3.up * 0.2f, 25f, 6) - 180f; Quaternion rotation = Assets.bunkerEntrance.transform.rotation; ((Quaternion)(ref rotation)).eulerAngles = new Vector3(((Quaternion)(ref rotation)).eulerAngles.x, num5, ((Quaternion)(ref rotation)).eulerAngles.z); GameObject val5 = Object.Instantiate(Assets.bunkerEntrance, val, rotation); val5.GetComponent().Spawn(true); BunkerLidPassage component = ((Component)val5.transform.Find("EntrancePassage")).GetComponent(); Quaternion rotation2 = Assets.bunkerEscape.transform.rotation; ((Quaternion)(ref rotation2)).eulerAngles = new Vector3(((Quaternion)(ref rotation2)).eulerAngles.x, num5 - 90f, ((Quaternion)(ref rotation2)).eulerAngles.z); GameObject val6 = Object.Instantiate(Assets.bunkerEscape, val2, rotation2); val6.GetComponent().Spawn(true); component.SyncBunkerPassagesServerRpc(NetworkObjectReference.op_Implicit(val5.GetComponent()), NetworkObjectReference.op_Implicit(val6.GetComponent())); Manager.objectsToClear.Add(val5); Manager.objectsToClear.Add(val6); } bunkerPassagesToSpawn = 0; } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0099: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(1401561583u, new RpcReceiveHandler(__rpc_handler_1401561583), "TeleportPlayerServerRpc"); ((NetworkBehaviour)this).__registerRpc(1681378858u, new RpcReceiveHandler(__rpc_handler_1681378858), "TeleportPlayerClientRpc"); ((NetworkBehaviour)this).__registerRpc(841996285u, new RpcReceiveHandler(__rpc_handler_841996285), "PlayAudioAtTeleportPositionsServerRpc"); ((NetworkBehaviour)this).__registerRpc(992909530u, new RpcReceiveHandler(__rpc_handler_992909530), "PlayAudioAtTeleportPositionsClientRpc"); ((NetworkBehaviour)this).__registerRpc(757507315u, new RpcReceiveHandler(__rpc_handler_757507315), "SyncBunkerPassagesServerRpc"); ((NetworkBehaviour)this).__registerRpc(2493008230u, new RpcReceiveHandler(__rpc_handler_2493008230), "SyncBunkerPassagesClientRpc"); ((NetworkBehaviour)this).__initializeRpcs(); } private static void __rpc_handler_1401561583(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerID = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerID); target.__rpc_exec_stage = (__RpcExecStage)1; ((Passage)(object)target).TeleportPlayerServerRpc(playerID); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1681378858(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { int playerID = default(int); ByteUnpacker.ReadValueBitPacked(reader, ref playerID); target.__rpc_exec_stage = (__RpcExecStage)1; ((Passage)(object)target).TeleportPlayerClientRpc(playerID); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_841996285(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((Passage)(object)target).PlayAudioAtTeleportPositionsServerRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_992909530(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { target.__rpc_exec_stage = (__RpcExecStage)1; ((Passage)(object)target).PlayAudioAtTeleportPositionsClientRpc(); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_757507315(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkObjectReference entrance = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref entrance, default(ForNetworkSerializable)); NetworkObjectReference exit = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref exit, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Passage)(object)target).SyncBunkerPassagesServerRpc(entrance, exit); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_2493008230(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { NetworkObjectReference entrance = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref entrance, default(ForNetworkSerializable)); NetworkObjectReference exit = default(NetworkObjectReference); ((FastBufferReader)(ref reader)).ReadValueSafe(ref exit, default(ForNetworkSerializable)); target.__rpc_exec_stage = (__RpcExecStage)1; ((Passage)(object)target).SyncBunkerPassagesClientRpc(entrance, exit); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "Passage"; } } public class SlayerShotgun : GrabbableObject { [CompilerGenerated] private sealed class d__42 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public float effectSeverity; public SlayerShotgun <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__42(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(0.6f); <>1__state = 1; return true; case 1: <>1__state = -1; SoundManager.Instance.earsRingingTimer = effectSeverity; return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__49 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public SlayerShotgun <>4__this; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__49(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0148: Expected O, but got Unknown //IL_01a5: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Unknown result type (might be due to invalid IL or missing references) //IL_01db: Unknown result type (might be due to invalid IL or missing references) //IL_01e5: Expected O, but got Unknown //IL_02a8: Unknown result type (might be due to invalid IL or missing references) //IL_02b2: Expected O, but got Unknown //IL_00de: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.isReloading = true; if (<>4__this.shellsLoaded <= 0) { ((GrabbableObject)<>4__this).playerHeldBy.playerBodyAnimator.SetBool("ReloadShotgun", true); ((Renderer)<>4__this.shotgunShellLeft).enabled = false; ((Renderer)<>4__this.shotgunShellRight).enabled = false; } else { ((GrabbableObject)<>4__this).playerHeldBy.playerBodyAnimator.SetBool("ReloadShotgun2", true); ((Renderer)<>4__this.shotgunShellRight).enabled = false; } <>2__current = (object)new WaitForSeconds(0.15f); <>1__state = 1; return true; case 1: <>1__state = -1; <>4__this.gunAudio.PlayOneShot(<>4__this.gunReloadSFX); <>4__this.gunAnimator.SetBool("Reloading", true); <>4__this.ReloadGunEffectsServerRpc(); <>2__current = (object)new WaitForSeconds(0.45f); <>1__state = 2; return true; case 2: <>1__state = -1; ((Renderer)<>4__this.shotgunShellInHand).enabled = true; <>4__this.shotgunShellInHandTransform.SetParent(((GrabbableObject)<>4__this).playerHeldBy.leftHandItemTarget); <>4__this.shotgunShellInHandTransform.localPosition = new Vector3(-0.0555f, 0.1469f, -0.0655f); <>4__this.shotgunShellInHandTransform.localEulerAngles = new Vector3(-1.956f, 143.856f, -16.427f); <>2__current = (object)new WaitForSeconds(0.45f); <>1__state = 3; return true; case 3: <>1__state = -1; ((GrabbableObject)<>4__this).playerHeldBy.DestroyItemInSlotAndSync(<>4__this.ammoSlotToUse); <>4__this.ammoSlotToUse = -1; <>4__this.shellsLoaded = Mathf.Clamp(<>4__this.shellsLoaded + 1, 0, 2); ((Renderer)<>4__this.shotgunShellLeft).enabled = true; if (<>4__this.shellsLoaded == 2) { ((Renderer)<>4__this.shotgunShellRight).enabled = true; } ((Renderer)<>4__this.shotgunShellInHand).enabled = false; <>4__this.shotgunShellInHandTransform.SetParent(((Component)<>4__this).transform); <>2__current = (object)new WaitForSeconds(0.25f); <>1__state = 4; return true; case 4: <>1__state = -1; <>4__this.gunAudio.PlayOneShot(<>4__this.gunReloadFinishSFX); <>4__this.gunAnimator.SetBool("Reloading", false); ((GrabbableObject)<>4__this).playerHeldBy.playerBodyAnimator.SetBool("ReloadShotgun", false); ((GrabbableObject)<>4__this).playerHeldBy.playerBodyAnimator.SetBool("ReloadShotgun2", false); <>4__this.isReloading = false; <>4__this.ReloadGunEffectsServerRpc(start: false); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public int gunCompatibleAmmoID = 1410; public bool isReloading; public int shellsLoaded; public Animator gunAnimator; public AudioSource gunAudio; public AudioSource gunShootAudio; public AudioSource gunBulletsRicochetAudio; private Coroutine gunCoroutine; public AudioClip[] gunShootSFX; public AudioClip gunReloadSFX; public AudioClip gunReloadFinishSFX; public AudioClip noAmmoSFX; public AudioClip gunSafetySFX; public AudioClip switchSafetyOnSFX; public AudioClip switchSafetyOffSFX; public bool safetyOn; private float misfireTimer = 30f; private bool hasHitGroundWithSafetyOff = true; private int ammoSlotToUse = -1; private bool localClientSendingShootGunRPC; private PlayerControllerB previousPlayerHeldBy; public ParticleSystem gunShootParticle; public Transform shotgunRayPoint; public MeshRenderer shotgunShellLeft; public MeshRenderer shotgunShellRight; public MeshRenderer shotgunShellInHand; public Transform shotgunShellInHandTransform; private RaycastHit[] enemyColliders; private EnemyAI heldByEnemy; public override void Start() { ((GrabbableObject)this).Start(); misfireTimer = 10f; hasHitGroundWithSafetyOff = true; } public override int GetItemDataToSave() { ((GrabbableObject)this).GetItemDataToSave(); return shellsLoaded; } public override void LoadItemSaveData(int saveData) { ((GrabbableObject)this).LoadItemSaveData(saveData); safetyOn = false; shellsLoaded = saveData; } public override void Update() { ((GrabbableObject)this).Update(); if (!((NetworkBehaviour)this).IsOwner || shellsLoaded <= 0 || isReloading || (Object)(object)heldByEnemy != (Object)null || base.isPocketed) { return; } if (base.hasHitGround && !safetyOn && !hasHitGroundWithSafetyOff && !base.isHeld) { if (Random.Range(0, 100) < 5) { ShootGunAndSync(heldByPlayer: false); } hasHitGroundWithSafetyOff = true; } else if (!safetyOn && misfireTimer <= 0f && !StartOfRound.Instance.inShipPhase) { if (Random.Range(0, 100) < 4) { ShootGunAndSync(base.isHeld); } if (Random.Range(0, 100) < 5) { misfireTimer = 2f; } else { misfireTimer = Random.Range(8f, 15f); } } else if (!safetyOn) { misfireTimer -= Time.deltaTime; } } public override void EquipItem() { ((GrabbableObject)this).EquipItem(); previousPlayerHeldBy = base.playerHeldBy; previousPlayerHeldBy.equippedUsableItemQE = true; hasHitGroundWithSafetyOff = false; } public override void GrabItemFromEnemy(EnemyAI enemy) { ((GrabbableObject)this).GrabItemFromEnemy(enemy); heldByEnemy = enemy; hasHitGroundWithSafetyOff = false; } public override void DiscardItemFromEnemy() { ((GrabbableObject)this).DiscardItemFromEnemy(); heldByEnemy = null; } public override void ItemActivate(bool used, bool buttonDown = true) { ((GrabbableObject)this).ItemActivate(used, buttonDown); if (!isReloading) { if (shellsLoaded == 0) { StartReloadGun(); } else if (((NetworkBehaviour)this).IsOwner) { ShootGunAndSync(heldByPlayer: true); } } } public void ShootGunAndSync(bool heldByPlayer) { //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0053: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: 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) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0090: 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_00ab: Unknown result type (might be due to invalid IL or missing references) Vector3 shotgunPosition; Vector3 forward; if (!heldByPlayer) { shotgunPosition = shotgunRayPoint.position; forward = shotgunRayPoint.forward; } else { shotgunPosition = ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.position - ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.up * 0.45f; forward = ((Component)GameNetworkManager.Instance.localPlayerController.gameplayCamera).transform.forward; } Debug.Log((object)"Calling shoot gun...."); ShootGun(shotgunPosition, forward); Debug.Log((object)"Calling shoot gun and sync"); localClientSendingShootGunRPC = true; ShootGunServerRpc(shotgunPosition, forward); } [ServerRpc(RequireOwnership = false)] public void ShootGunServerRpc(Vector3 shotgunPosition, Vector3 shotgunForward) { //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_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsClient || networkManager.IsHost)) { ServerRpcParams val = default(ServerRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendServerRpc(61960284u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref shotgunPosition); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref shotgunForward); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 61960284u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ShootGunClientRpc(shotgunPosition, shotgunForward); } } } [ClientRpc] public void ShootGunClientRpc(Vector3 shotgunPosition, Vector3 shotgunForward) { //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_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00db: Unknown result type (might be due to invalid IL or missing references) //IL_00e2: 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) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager != null && networkManager.IsListening) { if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(391005339u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref shotgunPosition); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref shotgunForward); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 391005339u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ShootGun(shotgunPosition, shotgunForward); } } } private static float ClampAngle(float ang, float min, float max) { float num = Mathf.DeltaAngle(ang, min); float num2 = Mathf.DeltaAngle(ang, max); if (num <= 0f && num2 >= 0f) { return ang; } return (Mathf.Abs(num) < Mathf.Abs(num2)) ? min : max; } public void ShootGun(Vector3 shotgunPosition, Vector3 shotgunForward) { //IL_0493: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001e: 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_011d: Unknown result type (might be due to invalid IL or missing references) //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013b: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0421: Unknown result type (might be due to invalid IL or missing references) //IL_042b: 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_015b: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_015e: Unknown result type (might be due to invalid IL or missing references) //IL_0238: Unknown result type (might be due to invalid IL or missing references) //IL_0239: Unknown result type (might be due to invalid IL or missing references) //IL_023f: Unknown result type (might be due to invalid IL or missing references) //IL_0279: Unknown result type (might be due to invalid IL or missing references) //IL_02d4: Unknown result type (might be due to invalid IL or missing references) //IL_02da: Unknown result type (might be due to invalid IL or missing references) //IL_02be: Unknown result type (might be due to invalid IL or missing references) //IL_02c8: Unknown result type (might be due to invalid IL or missing references) try { if (Configuration.ExtraLogging.Value) { Log.LogInfo($"SlayerShotGun shot at {shotgunPosition}, towards {shotgunForward}"); } } catch (NullReferenceException) { Log.LogError("Extra Logging Feature Errored."); } isReloading = false; bool flag = false; if (base.isHeld && (Object)(object)base.playerHeldBy != (Object)null && (Object)(object)base.playerHeldBy == (Object)(object)GameNetworkManager.Instance.localPlayerController) { base.playerHeldBy.playerBodyAnimator.SetTrigger("ShootShotgun"); flag = true; } RoundManager.PlayRandomClip(gunShootAudio, gunShootSFX, true, 1f, 1840, 1000); WalkieTalkie.TransmitOneShotAudio(gunShootAudio, gunShootSFX[0], 1f); gunShootParticle.Play(true); shellsLoaded = 2; PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if ((Object)(object)localPlayerController == (Object)null) { return; } float num = Vector3.Distance(((Component)localPlayerController).transform.position, ((Component)shotgunRayPoint).transform.position); bool flag2 = false; int num2 = 0; float num3 = 0f; Vector3 val = localPlayerController.playerCollider.ClosestPoint(shotgunPosition); if (!flag && !Physics.Linecast(shotgunPosition, val, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1) && Vector3.Angle(shotgunForward, val - shotgunPosition) < 30f) { flag2 = true; } if (num < 5f) { num3 = 0.8f; HUDManager.Instance.ShakeCamera((ScreenShakeType)1); num2 = 100; } if (num < 15f) { num3 = 0.5f; HUDManager.Instance.ShakeCamera((ScreenShakeType)1); num2 = 100; } else if (num < 23f) { HUDManager.Instance.ShakeCamera((ScreenShakeType)0); num2 = 40; } else if (num < 30f) { num2 = 20; } if (num3 > 0f && SoundManager.Instance.timeSinceEarsStartedRinging > 16f) { ((MonoBehaviour)this).StartCoroutine(delayedEarsRinging(num3)); } Ray val2 = default(Ray); ((Ray)(ref val2))..ctor(shotgunPosition, shotgunForward); RaycastHit val3 = default(RaycastHit); if (Physics.Raycast(val2, ref val3, 30f, StartOfRound.Instance.collidersAndRoomMaskAndDefault, (QueryTriggerInteraction)1)) { ((Component)gunBulletsRicochetAudio).transform.position = ((Ray)(ref val2)).GetPoint(((RaycastHit)(ref val3)).distance - 0.5f); gunBulletsRicochetAudio.Play(); } if (flag2) { Debug.Log((object)$"Dealing {num2} damage to player"); localPlayerController.DamagePlayer(num2, true, true, (CauseOfDeath)7, 0, false, shotgunRayPoint.forward * 30f); } RaycastHit[] array = Physics.SphereCastAll(shotgunPosition, 5f, shotgunForward, 15f, 524288, (QueryTriggerInteraction)2); try { if (Configuration.ExtraLogging.Value) { Log.LogInfo($"Raycast hits: {array.Length}"); } } catch (NullReferenceException) { Log.LogError("Extra Logging Feature Errored."); } IHittable val4 = default(IHittable); for (int i = 0; i < array.Length; i++) { try { if (Configuration.ExtraLogging.Value) { Log.LogInfo("Raycasting enemy"); } } catch (NullReferenceException) { Log.LogError("Extra Logging Feature Errored."); } if (!Object.op_Implicit((Object)(object)((Component)((RaycastHit)(ref array[i])).transform).GetComponent())) { continue; } EnemyAI mainScript = ((Component)((RaycastHit)(ref array[i])).transform).GetComponent().mainScript; if ((Object)(object)heldByEnemy != (Object)null && (Object)(object)heldByEnemy == (Object)(object)mainScript) { try { if (Configuration.ExtraLogging.Value) { Log.LogInfo("Shotgun is held by enemy, skipping entry"); } } catch (NullReferenceException) { Log.LogError("Extra Logging Feature Errored."); } continue; } if (((Component)((RaycastHit)(ref array[i])).transform).TryGetComponent(ref val4)) { float num4 = Vector3.Distance(shotgunPosition, ((RaycastHit)(ref array[i])).point); int num5 = ((num4 < 3.7f) ? 5 : ((!(num4 < 6f)) ? 2 : 3)); try { if (Configuration.ExtraLogging.Value) { Log.LogInfo($"Hit enemy, hitDamage: {num5}"); } } catch (NullReferenceException) { Log.LogError("Extra Logging Feature Errored."); } val4.Hit(num5, shotgunForward, base.playerHeldBy, true, -1); continue; } try { if (Configuration.ExtraLogging.Value) { Log.LogInfo("Could not get hittable script from collider, transform: " + ((Object)((RaycastHit)(ref array[i])).transform).name); Log.LogInfo("collider: " + ((Object)((RaycastHit)(ref array[i])).collider).name); } } catch (NullReferenceException) { Log.LogError("Extra Logging Feature Errored."); } } } [IteratorStateMachine(typeof(d__42))] private IEnumerator delayedEarsRinging(float effectSeverity) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__42(0) { <>4__this = this, effectSeverity = effectSeverity }; } public override void ItemInteractLeftRight(bool right) { ((GrabbableObject)this).ItemInteractLeftRight(right); if ((Object)(object)base.playerHeldBy == (Object)null) { return; } Debug.Log((object)$"r/l activate: {right}"); if (!right) { if (safetyOn) { safetyOn = false; gunAudio.PlayOneShot(switchSafetyOffSFX); WalkieTalkie.TransmitOneShotAudio(gunAudio, switchSafetyOffSFX, 1f); SetSafetyControlTip(); } else { safetyOn = false; gunAudio.PlayOneShot(switchSafetyOffSFX); WalkieTalkie.TransmitOneShotAudio(gunAudio, switchSafetyOffSFX, 1f); SetSafetyControlTip(); } base.playerHeldBy.playerBodyAnimator.SetTrigger("SwitchGunSafety"); } else if (!isReloading && shellsLoaded < 2) { StartReloadGun(); } } public override void SetControlTipsForItem() { string[] toolTips = base.itemProperties.toolTips; if (toolTips.Length <= 2) { Debug.LogError((object)"Shotgun control tips array length is too short to set tips!"); return; } if (safetyOn) { toolTips[2] = "No safety"; } else { toolTips[2] = "No safety"; } HUDManager.Instance.ChangeControlTipMultiple(toolTips, true, base.itemProperties); } private void SetSafetyControlTip() { string text = ((!safetyOn) ? "No safety" : "No safety"); if (((NetworkBehaviour)this).IsOwner) { HUDManager.Instance.ChangeControlTip(3, text, false); } } private void StartReloadGun() { if (ReloadedGun()) { if (((NetworkBehaviour)this).IsOwner) { if (gunCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(gunCoroutine); } gunCoroutine = ((MonoBehaviour)this).StartCoroutine(reloadGunAnimation()); } } else { gunAudio.PlayOneShot(noAmmoSFX); } } [ServerRpc] public void ReloadGunEffectsServerRpc(bool start = true) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00ed: Unknown result type (might be due to invalid IL or missing references) //IL_00f7: Invalid comparison between Unknown and I4 //IL_0122: 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_00dd: 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)((NetworkBehaviour)this).__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(1485861874u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref start, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendServerRpc(ref val2, 1485861874u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsServer || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; ReloadGunEffectsClientRpc(start); } } [ClientRpc] public void ReloadGunEffectsClientRpc(bool start = true) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Invalid comparison between Unknown and I4 //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: Invalid comparison between Unknown and I4 //IL_005f: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Unknown result type (might be due to invalid IL or missing references) //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Unknown result type (might be due to invalid IL or missing references) //IL_00dc: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = ((NetworkBehaviour)this).NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if ((int)((NetworkBehaviour)this).__rpc_exec_stage != 1 && (networkManager.IsServer || networkManager.IsHost)) { ClientRpcParams val = default(ClientRpcParams); FastBufferWriter val2 = ((NetworkBehaviour)this).__beginSendClientRpc(122673521u, val, (RpcDelivery)0); ((FastBufferWriter)(ref val2)).WriteValueSafe(ref start, default(ForPrimitives)); ((NetworkBehaviour)this).__endSendClientRpc(ref val2, 122673521u, val, (RpcDelivery)0); } if ((int)((NetworkBehaviour)this).__rpc_exec_stage == 1 && (networkManager.IsClient || networkManager.IsHost)) { ((NetworkBehaviour)this).__rpc_exec_stage = (__RpcExecStage)0; if (start) { gunAudio.PlayOneShot(gunReloadSFX); WalkieTalkie.TransmitOneShotAudio(gunAudio, gunReloadSFX, 1f); gunAnimator.SetBool("Reloading", true); isReloading = true; } else { shellsLoaded = Mathf.Clamp(shellsLoaded + 1, 0, 2); gunAudio.PlayOneShot(gunReloadFinishSFX); gunAnimator.SetBool("Reloading", false); isReloading = false; } } } [IteratorStateMachine(typeof(d__49))] private IEnumerator reloadGunAnimation() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__49(0) { <>4__this = this }; } private bool ReloadedGun() { int num = FindAmmoInInventory(); if (num == -1) { Debug.Log((object)"not reloading"); return false; } Debug.Log((object)"reloading!"); ammoSlotToUse = num; return true; } private int FindAmmoInInventory() { for (int i = 0; i < base.playerHeldBy.ItemSlots.Length; i++) { if (!((Object)(object)base.playerHeldBy.ItemSlots[i] == (Object)null)) { GrabbableObject obj = base.playerHeldBy.ItemSlots[i]; GunAmmo val = (GunAmmo)(object)((obj is GunAmmo) ? obj : null); Debug.Log((object)$"Ammo null in slot #{i}?: {(Object)(object)val == (Object)null}"); if ((Object)(object)val != (Object)null) { Debug.Log((object)$"Ammo in slot #{i} id: {val.ammoType}"); } if ((Object)(object)val != (Object)null && val.ammoType == gunCompatibleAmmoID) { return i; } } } return -1; } public override void PocketItem() { ((GrabbableObject)this).PocketItem(); StopUsingGun(); } public override void DiscardItem() { ((GrabbableObject)this).DiscardItem(); StopUsingGun(); } private void StopUsingGun() { previousPlayerHeldBy.equippedUsableItemQE = false; if (isReloading) { if (gunCoroutine != null) { ((MonoBehaviour)this).StopCoroutine(gunCoroutine); } gunAnimator.SetBool("Reloading", false); gunAudio.Stop(); if ((Object)(object)previousPlayerHeldBy != (Object)null) { previousPlayerHeldBy.playerBodyAnimator.SetBool("ReloadShotgun", false); previousPlayerHeldBy.playerBodyAnimator.SetBool("ReloadShotgun2", false); } ((Renderer)shotgunShellInHand).enabled = false; shotgunShellInHandTransform.SetParent(((Component)this).transform); isReloading = false; } } protected override void __initializeVariables() { ((GrabbableObject)this).__initializeVariables(); } protected override void __initializeRpcs() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Expected O, but got Unknown //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_0038: Expected O, but got Unknown //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0054: Expected O, but got Unknown //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0070: Expected O, but got Unknown ((NetworkBehaviour)this).__registerRpc(61960284u, new RpcReceiveHandler(__rpc_handler_61960284), "ShootGunServerRpc"); ((NetworkBehaviour)this).__registerRpc(391005339u, new RpcReceiveHandler(__rpc_handler_391005339), "ShootGunClientRpc"); ((NetworkBehaviour)this).__registerRpc(1485861874u, new RpcReceiveHandler(__rpc_handler_1485861874), "ReloadGunEffectsServerRpc"); ((NetworkBehaviour)this).__registerRpc(122673521u, new RpcReceiveHandler(__rpc_handler_122673521), "ReloadGunEffectsClientRpc"); ((GrabbableObject)this).__initializeRpcs(); } private static void __rpc_handler_61960284(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 shotgunPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref shotgunPosition); Vector3 shotgunForward = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref shotgunForward); target.__rpc_exec_stage = (__RpcExecStage)1; ((SlayerShotgun)(object)target).ShootGunServerRpc(shotgunPosition, shotgunForward); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_391005339(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004e: Unknown result type (might be due to invalid IL or missing references) //IL_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { Vector3 shotgunPosition = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref shotgunPosition); Vector3 shotgunForward = default(Vector3); ((FastBufferReader)(ref reader)).ReadValueSafe(ref shotgunForward); target.__rpc_exec_stage = (__RpcExecStage)1; ((SlayerShotgun)(object)target).ShootGunClientRpc(shotgunPosition, shotgunForward); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_1485861874(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) //IL_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_004b: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Invalid comparison between Unknown and I4 NetworkManager networkManager = target.NetworkManager; if (networkManager == null || !networkManager.IsListening) { return; } if (rpcParams.Server.Receive.SenderClientId != target.OwnerClientId) { if ((int)networkManager.LogLevel <= 1) { Debug.LogError((object)"Only the owner can invoke a ServerRpc that requires ownership!"); } } else { bool start = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref start, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((SlayerShotgun)(object)target).ReloadGunEffectsServerRpc(start); target.__rpc_exec_stage = (__RpcExecStage)0; } } private static void __rpc_handler_122673521(NetworkBehaviour target, FastBufferReader reader, __RpcParams rpcParams) { //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) NetworkManager networkManager = target.NetworkManager; if (networkManager != null && networkManager.IsListening) { bool start = default(bool); ((FastBufferReader)(ref reader)).ReadValueSafe(ref start, default(ForPrimitives)); target.__rpc_exec_stage = (__RpcExecStage)1; ((SlayerShotgun)(object)target).ReloadGunEffectsClientRpc(start); target.__rpc_exec_stage = (__RpcExecStage)0; } } protected internal override string __getTypeName() { return "SlayerShotgun"; } } internal class TeleportAudioSource : MonoBehaviour { public float objectLifeTime = 5f; public AudioSource audioSource; private void Start() { audioSource.Play(); } private void Update() { objectLifeTime -= Time.deltaTime; if (objectLifeTime <= 0f) { Object.Destroy((Object)(object)((Component)this).gameObject); } } } [HarmonyPatch] internal class TimeChaosNet : NetworkBehaviour { public static TimeChaosNet instance; public void Awake() { if ((Object)(object)instance != (Object)null) { DestroyTimeInstance(); } instance = this; } public void Update() { if (!TimeChaos.Instance.Active) { return; } try { Net.Instance.MoveTimeServerRpc(0f, TimeChaos.timeMultiplier); } catch { Net.Instance.MoveTimeServerRpc(0f, 1.0001f); } } public static void DestroyTimeInstance() { TimeChaos.Instance.Active = false; TimeOfDay.Instance.globalTimeSpeedMultiplier = 1f; GameObject val = GameObject.Find("TimeChaosEvent"); if ((Object)(object)val != (Object)null) { Object.Destroy((Object)(object)val); } } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "ShipLeave")] public static void OnShipLeave() { DestroyTimeInstance(); } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "EndGameServerRpc")] public static void DestroyForGodsSake() { DestroyTimeInstance(); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "TimeChaosNet"; } } } namespace BrutalCompanyMinus.Minus.Handlers { [HarmonyPatch] public class AllMetalPatches { public static Dictionary OriginalStates = new Dictionary(); [HarmonyPostfix] [HarmonyPatch(typeof(GrabbableObject), "Start")] public static void MetalOffFix(GrabbableObject __instance) { if (NotMetal.Active) { ApplyMetalStates(__instance, state: false); } } [HarmonyPostfix] [HarmonyPatch(typeof(GrabbableObject), "Start")] public static void MetalOnFix(GrabbableObject __instance) { if (IsMetal.Active) { ApplyMetalStates(__instance, state: true); } } [HarmonyPostfix] [HarmonyPatch(typeof(GrabbableObject), "Start")] public static void MetalSwitch(GrabbableObject __instance) { if (BrutalCompanyMinus.Minus.Events.MetalSwitch.Active && (Object)(object)__instance != (Object)null && (Object)(object)__instance.itemProperties != (Object)null) { ApplyMetalStates(__instance, !__instance.itemProperties.isConductiveMetal); } } [HarmonyPostfix] [HarmonyPatch(typeof(StartOfRound), "OpenShipDoors")] public static void MetalOffSweep() { if (NotMetal.Active) { GrabbableObject[] array = Object.FindObjectsOfType(); GrabbableObject[] array2 = array; foreach (GrabbableObject item in array2) { ApplyMetalStates(item, state: false); } } } [HarmonyPostfix] [HarmonyPatch(typeof(StartOfRound), "OpenShipDoors")] public static void MetalOnSweep() { if (IsMetal.Active) { GrabbableObject[] array = Object.FindObjectsOfType(); GrabbableObject[] array2 = array; foreach (GrabbableObject item in array2) { ApplyMetalStates(item, state: true); } } } [HarmonyPostfix] [HarmonyPatch(typeof(StartOfRound), "OpenShipDoors")] public static void MetalSwitchSweep() { if (!BrutalCompanyMinus.Minus.Events.MetalSwitch.Active) { return; } GrabbableObject[] array = Object.FindObjectsOfType(); GrabbableObject[] array2 = array; foreach (GrabbableObject val in array2) { if ((Object)(object)val != (Object)null && (Object)(object)val.itemProperties != (Object)null) { ApplyMetalStates(val, !val.itemProperties.isConductiveMetal); } } } public static void ApplyMetalStates(GrabbableObject item, bool state) { if ((Object)(object)item == (Object)null || (Object)(object)item.itemProperties == (Object)null) { return; } item.itemProperties = Object.Instantiate(item.itemProperties); if (!OriginalStates.ContainsKey(item)) { OriginalStates.Add(item, item.itemProperties.isConductiveMetal); if (Configuration.ExtraLogging.Value) { Log.LogDebug($"Stored original state for item: {((Object)item).name}, isConductiveMetal: {item.itemProperties.isConductiveMetal}"); } } item.itemProperties.isConductiveMetal = state; } public static void RestoreOriginalStates() { foreach (KeyValuePair originalState in OriginalStates) { if ((Object)(object)originalState.Key != (Object)null && (Object)(object)originalState.Key.itemProperties != (Object)null) { originalState.Key.itemProperties.isConductiveMetal = originalState.Value; if (Configuration.ExtraLogging.Value) { Log.LogMessage($"Restored item: {((Object)originalState.Key).name} to original isConductiveMetal: {originalState.Value}"); } } } OriginalStates.Clear(); } } [HarmonyPatch] internal class AllWeather { public static FloodWeather spawnedFloodedWeather = null; public static FieldInfo floodLevelOffset = typeof(FloodWeather).GetField("floodLevelOffset", BindingFlags.Instance | BindingFlags.NonPublic); public static float floodVariable1 = 1f; public static float floodVariable2 = 1f; public static float lightningVariable1 = 1f; public static float LightningVariable2 = 1f; public static bool raining = false; [HarmonyPrefix] [HarmonyPatch(typeof(RoundManager), "SpawnOutsideHazards")] private static void OnSpawnOutsideHazards() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Invalid comparison between Unknown and I4 if (BrutalCompanyMinus.Minus.Events.AllWeather.Active && (int)RoundManager.Instance.currentLevel.currentWeather != 1 && raining && ((NetworkBehaviour)RoundManager.Instance).IsHost) { Net.Instance.SpawnMudPilesOutsideServerRpc(Random.Range(8, 16)); } } [HarmonyPostfix] [HarmonyPatch(typeof(FloodWeather), "OnGlobalTimeSync")] private static void OnGlobalTimeSync(ref FloodWeather __instance) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Invalid comparison between Unknown and I4 if (BrutalCompanyMinus.Minus.Events.AllWeather.Active && (int)RoundManager.Instance.currentLevel.currentWeather != 4 && !((Object)(object)spawnedFloodedWeather == (Object)null)) { floodLevelOffset.SetValue(spawnedFloodedWeather, Mathf.Clamp(TimeOfDay.Instance.globalTime / 1080f, 0f, 100f) * floodVariable2 + floodVariable1 - 1f); } } [HarmonyPostfix] [HarmonyPatch(typeof(FloodWeather), "OnEnable")] private static void OnOnEnable(ref FloodWeather __instance) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Invalid comparison between Unknown and I4 //IL_0044: Unknown result type (might be due to invalid IL or missing references) if (BrutalCompanyMinus.Minus.Events.AllWeather.Active && (int)RoundManager.Instance.currentLevel.currentWeather != 4 && !((Object)(object)spawnedFloodedWeather == (Object)null)) { ((Component)__instance).transform.position = new Vector3(0f, floodVariable1, 0f); floodLevelOffset.SetValue(spawnedFloodedWeather, Mathf.Clamp(TimeOfDay.Instance.globalTime / 1080f, 0f, 100f) * floodVariable2 + floodVariable1 - 1f); } } [HarmonyPostfix] [HarmonyPatch(typeof(RoundManager), "SetToCurrentLevelWeather")] private static void OnSetToCurrentLevelWeather() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Invalid comparison between Unknown and I4 if (BrutalCompanyMinus.Minus.Events.AllWeather.Active && (int)RoundManager.Instance.currentLevel.currentWeather != 2) { TimeOfDay.Instance.currentWeatherVariable = lightningVariable1; TimeOfDay.Instance.currentWeatherVariable = LightningVariable2; } } } [HarmonyPatch] [HarmonyPatch(typeof(EnemyAI))] internal class AntiBounty { public static List enemyObjectIDs = new List(); private static int due = 0; [HarmonyPostfix] [HarmonyPatch("KillEnemyOnOwnerClient")] private static void PayOnkill(ref EnemyAI __instance) { if (due > 0 && Manager.currentTerminal.groupCredits > 0) { HUDManager.Instance.AddTextToChatOnServer("Due payment.", -1); int groupCredits = due; if (Manager.currentTerminal.groupCredits - due < 0) { groupCredits = Manager.currentTerminal.groupCredits; } Manager.PayCredits(-groupCredits); due -= groupCredits; HUDManager.Instance.AddTextToChatOnServer($"New Due balance: {due}", -1); } if (!BrutalCompanyMinus.Minus.Events.AntiBounty.AntiBountyActive) { return; } foreach (int enemyObjectID in enemyObjectIDs) { if (((Object)((Component)__instance).gameObject).GetInstanceID() == enemyObjectID) { return; } } MEvent instance = BrutalCompanyMinus.Minus.Events.AntiBounty.Instance; int num = Random.Range(instance.Get(MEvent.ScaleType.MinValue), instance.Get(MEvent.ScaleType.MaxValue) + 1); if (Manager.currentTerminal.groupCredits - num < 0) { due += num - Manager.currentTerminal.groupCredits; num = Manager.currentTerminal.groupCredits; HUDManager.Instance.AddTextToChatOnServer($"Since you lack credits to pay the full fine, you will be due {due} on the next kill.", -1); } Log.LogDebug("BCMER Fine " + -num); Manager.PayCredits(-num); enemyObjectIDs.Add(((Object)((Component)__instance).gameObject).GetInstanceID()); } } [HarmonyPatch(typeof(Turret))] internal class BerserkTurrets { [HarmonyPrefix] [HarmonyPatch("Update")] private static void TurretsHellMode(Turret __instance) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) if (BrutalCompanyMinus.Minus.Events.BerserkTurrets.Instance.Active) { __instance.turretMode = (TurretMode)3; } } } [HarmonyPatch] [HarmonyPatch(typeof(EnemyAI))] internal class Bounty { public static List enemyObjectIDs = new List(); [HarmonyPostfix] [HarmonyPatch("KillEnemyOnOwnerClient")] private static void PayOnkill(ref EnemyAI __instance) { if (!BrutalCompanyMinus.Minus.Events.Bounty.Active) { return; } foreach (int enemyObjectID in enemyObjectIDs) { if (((Object)((Component)__instance).gameObject).GetInstanceID() == enemyObjectID) { return; } } MEvent instance = BrutalCompanyMinus.Minus.Events.Bounty.Instance; Manager.PayCredits(Random.Range(instance.Get(MEvent.ScaleType.MinValue), instance.Get(MEvent.ScaleType.MaxValue) + 1)); enemyObjectIDs.Add(((Object)((Component)__instance).gameObject).GetInstanceID()); } } [HarmonyPatch(typeof(VehicleController))] internal class CruiserFailures { [HarmonyPrefix] [HarmonyPatch("StartTryCarIgnition")] private static bool InterruptCruiser() { if (CruiserFailure.Active) { switch (Random.Range(0, 3)) { case 0: ((TMP_Text)HUDManager.Instance.globalNotificationText).text = "Do you even have a license?!"; break; case 1: ((TMP_Text)HUDManager.Instance.globalNotificationText).text = "Hope you have insurance!"; break; case 2: ((TMP_Text)HUDManager.Instance.globalNotificationText).text = "Do you know how to operate the vehicle?"; break; default: ((TMP_Text)HUDManager.Instance.globalNotificationText).text = "Your car is out of gas!"; break; } HUDManager.Instance.globalNotificationAnimator.SetTrigger("TriggerNotif"); HUDManager.Instance.UIAudio.PlayOneShot(HUDManager.Instance.radiationWarningAudio, 1f); return false; } return true; } } [HarmonyPatch(typeof(HangarShipDoor))] internal class HangarShipDoorPatches { private static float lockdownTime; [HarmonyPostfix] [HarmonyPatch("Update")] private static void OverwriteDoorPower(HangarShipDoor __instance) { if (DoorFailure.Instance.Active) { __instance.doorPower = 0f; __instance.SetDoorOpen(); __instance.buttonsEnabled = false; lockdownTime = (lockdownTime + Time.deltaTime) % 6f; ((TMP_Text)__instance.doorPowerDisplay).text = ((lockdownTime > 3f) ? "FAILURE" : "RETRYING") ?? ""; } } [HarmonyPostfix] [HarmonyPatch("Update")] private static void OverwriteDoorState(HangarShipDoor __instance) { if (DoorCircuitFailure.Instance.Active) { if ((TimeOfDay.Instance.hour == 9) | (TimeOfDay.Instance.hour == 10) | (TimeOfDay.Instance.hour == 11) | (TimeOfDay.Instance.hour == 12) | (TimeOfDay.Instance.hour == 13) | (TimeOfDay.Instance.hour == 14) | (TimeOfDay.Instance.hour == 15)) { __instance.doorPower = 1f; __instance.PlayDoorAnimation(true); __instance.buttonsEnabled = false; lockdownTime = (lockdownTime + Time.deltaTime) % 6f; ((TMP_Text)__instance.doorPowerDisplay).text = ((lockdownTime > 3f) ? "LOCKED" : "OPEN 10PM") ?? ""; } else if (TimeOfDay.Instance.hour == 16) { __instance.PlayDoorAnimation(false); __instance.buttonsEnabled = true; } } } } public class DoorLockPatches : NetworkBehaviour { public static DoorLockPatches instance; public void Awake() { if ((Object)(object)instance != (Object)null) { DestroyDoorLockPatches(); } instance = this; Net.Instance.SetEntranceServerRpc(active: true); } public static void DestroyDoorLockPatches() { LockedEntrance.Active = false; GameObject val = GameObject.Find("LockEntranceObject"); if ((Object)(object)val != (Object)null) { Object.Destroy((Object)(object)val); } } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "ShipLeave")] public static void OnShipLeave() { DestroyDoorLockPatches(); } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "EndGameServerRpc")] public static void DestroyForGodsSake() { DestroyDoorLockPatches(); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "DoorLockPatches"; } } [HarmonyPatch(typeof(HangarShipDoor))] internal class HangarShipDoorOvPatches { [HarmonyPostfix] [HarmonyPatch("Update")] private static void OverwriteDoorPower(HangarShipDoor __instance) { if (DoorOverdriveEv.Instance.Active) { __instance.doorPower = 1f; __instance.buttonsEnabled = true; } } } [HarmonyPatch] internal class FacilityGhost { [CompilerGenerated] private sealed class d__23 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public GrabbableLandmine grabbableLandmine; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__23(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; grabbableLandmine.ToggleMine(enabled: false); <>2__current = (object)new WaitForSeconds(7f); <>1__state = 1; return true; case 1: <>1__state = -1; grabbableLandmine.ToggleMine(enabled: true); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__22 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Landmine landmine; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__22(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; landmine.ToggleMine(false); <>2__current = (object)new WaitForSeconds(7f); <>1__state = 1; return true; case 1: <>1__state = -1; landmine.ToggleMine(true); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__24 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public SpikeRoofTrap trap; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__24(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; trap.ToggleSpikesEnabled(false); <>2__current = (object)new WaitForSeconds(7f); <>1__state = 1; return true; case 1: <>1__state = -1; trap.ToggleSpikesEnabled(true); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [CompilerGenerated] private sealed class d__21 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public Turret turret; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__21(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; turret.ToggleTurretEnabled(false); <>2__current = (object)new WaitForSeconds(7f); <>1__state = 1; return true; case 1: <>1__state = -1; turret.ToggleTurretEnabled(true); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public static float actionCurrentTime = 0f; public static float actionTimeCooldown = 15f; public static float ghostCrazyCurrentTime = 0f; public static float ghostCrazyPeriod = 3f; public static float ghostCrazyActionInterval = 0.1f; public static float crazyGhostChance = 0.1f; public static int DoNothingWeight = 20; public static int OpenCloseBigDoorsWeight = 20; public static int MessWithLightsWeight = 16; public static int MessWithBreakerWeight = 4; public static int OpenCloseDoorsWeight = 9; public static int lockUnlockDoorsWeight = 3; public static int disableTurretsWeight = 5; public static int disableLandminesWeight = 5; public static int disableSpikeTrapsWeight = 5; public static int turretRageWeight = 15; public static float chanceToOpenCloseDoor = 0.3f; public static float chanceToLockUnlockDoor = 0.1f; public static float rageTurretsChance = 0.33f; private static Random rng = new Random(); [HarmonyPostfix] [HarmonyPatch(typeof(RoundManager), "Update")] private static void OnUpdate() { //IL_0494: Unknown result type (might be due to invalid IL or missing references) //IL_049a: Invalid comparison between Unknown and I4 //IL_049e: Unknown result type (might be due to invalid IL or missing references) //IL_04a4: Invalid comparison between Unknown and I4 //IL_04be: Unknown result type (might be due to invalid IL or missing references) if (!BrutalCompanyMinus.Minus.Events.FacilityGhost.Active || !((NetworkBehaviour)RoundManager.Instance).IsHost) { return; } if (ghostCrazyCurrentTime > 0f) { ghostCrazyCurrentTime -= Time.deltaTime; } if (actionCurrentTime > 0f) { actionCurrentTime -= Time.deltaTime; return; } rng = new Random(Net.Instance._seed++); if (rng.NextDouble() <= (double)crazyGhostChance && ghostCrazyCurrentTime <= 0f) { Log.LogInfo("Ghost has went crazy"); ghostCrazyCurrentTime = ghostCrazyPeriod; } if (ghostCrazyCurrentTime > 0f) { actionCurrentTime = ghostCrazyActionInterval; } else { actionCurrentTime = actionTimeCooldown; } int[] array = new int[10] { DoNothingWeight, OpenCloseDoorsWeight, MessWithLightsWeight, MessWithBreakerWeight, OpenCloseDoorsWeight, lockUnlockDoorsWeight, disableTurretsWeight, disableLandminesWeight, disableSpikeTrapsWeight, turretRageWeight }; if (ghostCrazyCurrentTime > 0f) { array[0] = 0; array[5] = 0; array[6] = 0; array[7] = 0; array[8] = 0; } switch (RoundManager.Instance.GetRandomWeightedIndex(array, rng)) { case 0: Log.LogInfo("Facility ghost did nothing"); break; case 1: { TerminalAccessibleObject[] array6 = Object.FindObjectsOfType(); if (array6.Length != 0) { Log.LogInfo("Facility ghost did OpenClose doors"); TerminalAccessibleObject[] array7 = array6; foreach (TerminalAccessibleObject val2 in array7) { val2.SetDoorOpenServerRpc(Convert.ToBoolean(rng.Next(2))); } } break; } case 2: Log.LogInfo("Facility ghost messed with the lights"); Net.Instance.MessWithLightsServerRpc(); break; case 3: Log.LogInfo("Facility ghost messed with breaker"); Net.Instance.MessWithBreakerServerRpc(Convert.ToBoolean(rng.Next(2))); break; case 4: Log.LogInfo("Facility ghost attempts to open and close doors"); Net.Instance.MessWithDoorsServerRpc(chanceToOpenCloseDoor); break; case 5: Log.LogInfo("Facility ghost attempts to lock and unlock doors"); Net.Instance.MessWithDoorsServerRpc(chanceToOpenCloseDoor, messWithLock: true, chanceToLockUnlockDoor); break; case 6: { Log.LogInfo("Facility ghost attempts to disable turrets"); Turret[] array4 = Object.FindObjectsOfType(); Turret[] array5 = array4; foreach (Turret turret in array5) { if (Convert.ToBoolean(rng.Next(2))) { ((MonoBehaviour)RoundManager.Instance).StartCoroutine(DisableTurret(turret)); } } if (Compatibility.toilheadPresent) { ToilHeadHandler.AttemptToDisableToilHeadTurrets(ref rng); } break; } case 7: { Log.LogInfo("Facility ghost attempts to disable landmines"); Landmine[] array10 = Object.FindObjectsOfType(); Landmine[] array11 = array10; foreach (Landmine landmine in array11) { if (Convert.ToBoolean(rng.Next(2))) { ((MonoBehaviour)RoundManager.Instance).StartCoroutine(DisableLandmine(landmine)); } } GrabbableLandmine[] array12 = Object.FindObjectsOfType(); GrabbableLandmine[] array13 = array12; foreach (GrabbableLandmine grabbableLandmine in array13) { if (Convert.ToBoolean(rng.Next(2))) { ((MonoBehaviour)RoundManager.Instance).StartCoroutine(DisableGrabbableLandmine(grabbableLandmine)); } } break; } case 8: { Log.LogInfo("Facility ghost attempts to disable spiketraps"); SpikeRoofTrap[] array8 = Object.FindObjectsOfType(); SpikeRoofTrap[] array9 = array8; foreach (SpikeRoofTrap trap in array9) { if (Convert.ToBoolean(rng.Next(2))) { ((MonoBehaviour)RoundManager.Instance).StartCoroutine(DisableSpikeTrap(trap)); } } break; } case 9: { Log.LogInfo("Facility ghost attempts to rage turrets"); Turret[] array2 = Object.FindObjectsOfType(); Turret[] array3 = array2; foreach (Turret val in array3) { if (rng.NextDouble() <= (double)rageTurretsChance && (int)val.turretMode != 3 && (int)val.turretMode != 2 && val.turretActive) { val.turretMode = (TurretMode)3; val.EnterBerserkModeServerRpc((int)GameNetworkManager.Instance.localPlayerController.playerClientId); } } if (Compatibility.toilheadPresent) { ToilHeadHandler.AttemptToRageToilHeadTurrets(ref rng); } break; } } } [IteratorStateMachine(typeof(d__21))] private static IEnumerator DisableTurret(Turret turret) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__21(0) { turret = turret }; } [IteratorStateMachine(typeof(d__22))] private static IEnumerator DisableLandmine(Landmine landmine) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__22(0) { landmine = landmine }; } [IteratorStateMachine(typeof(d__23))] private static IEnumerator DisableGrabbableLandmine(GrabbableLandmine grabbableLandmine) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__23(0) { grabbableLandmine = grabbableLandmine }; } [IteratorStateMachine(typeof(d__24))] private static IEnumerator DisableSpikeTrap(SpikeRoofTrap trap) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__24(0) { trap = trap }; } } public class FlashlightItemsNet : NetworkBehaviour { public static FlashlightItemsNet instance; public void Awake() { if ((Object)(object)instance != (Object)null) { DestroyFlashlightFailure(); } instance = this; Net.Instance.SetFlashlightsServerRpc(active: true); } public static void DestroyFlashlightFailure() { FlashLightsFailure.Active = false; GameObject val = GameObject.Find("FlashlightsFailureObject"); if ((Object)(object)val != (Object)null) { Object.Destroy((Object)(object)val); } } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "ShipLeave")] public static void OnShipLeave() { DestroyFlashlightFailure(); } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "EndGameServerRpc")] public static void DestroyForGodsSake() { DestroyFlashlightFailure(); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "FlashlightItemsNet"; } } [HarmonyPatch] internal class FullAccess { [CompilerGenerated] private sealed class d__1 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(8f); <>1__state = 1; return true; case 1: <>1__state = -1; Net.Instance.UnlockAndOpenAllDoorsServerRpc(); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [HarmonyPostfix] [HarmonyPatch(typeof(RoundManager), "RefreshEnemiesList")] private static void OnRefreshEnemiesList() { if (BrutalCompanyMinus.Minus.Events.FullAccess.Active && NetworkManager.Singleton.IsServer) { ((MonoBehaviour)RoundManager.Instance).StartCoroutine(OpenAll()); BrutalCompanyMinus.Minus.Events.FullAccess.Active = false; } } [IteratorStateMachine(typeof(d__1))] private static IEnumerator OpenAll() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1(0); } } [HarmonyPatch] internal class Hell { [CompilerGenerated] private sealed class d__2 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__2(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(75f); <>1__state = 1; return true; case 1: <>1__state = -1; EnemySpawnCycle.Instance.spawnCycles.Add(BrutalCompanyMinus.Minus.Events.Hell.outsideHellSpawnCycle); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [HarmonyPrefix] [HarmonyPatch(typeof(RoundManager), "AssignRandomEnemyToVent")] private static void OnAssignRandomEnemyToVent(ref RoundManager __instance) { if (BrutalCompanyMinus.Minus.Events.Hell.Active) { __instance.currentMaxInsidePower = 0f; __instance.currentMaxOutsidePower = 0f; } } [HarmonyPostfix] [HarmonyPatch(typeof(RoundManager), "RefreshEnemiesList")] private static void OnRefreshEnemiesList() { if (BrutalCompanyMinus.Minus.Events.Hell.Active && BrutalCompanyMinus.Minus.Events.Hell.SpawnCycle) { EnemySpawnCycle.Instance.spawnCycles.Add(BrutalCompanyMinus.Minus.Events.Hell.insideHellSpawnCycle); ((MonoBehaviour)RoundManager.Instance).StartCoroutine(AddOutsideSpawnCycleAfterDelay()); BrutalCompanyMinus.Minus.Events.Hell.SpawnCycle = false; } } [IteratorStateMachine(typeof(d__2))] private static IEnumerator AddOutsideSpawnCycleAfterDelay() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__2(0); } } public class IsMetalNet : NetworkBehaviour { public static IsMetalNet instance; public void Awake() { if ((Object)(object)instance != (Object)null) { DestroyMetalPatch(); } instance = this; Net.Instance.SetMetalOnNetServerRpc(active: true); } public static void DestroyMetalPatch() { IsMetal.Active = false; GameObject val = GameObject.Find("IsMetalObj"); if ((Object)(object)val != (Object)null) { Object.Destroy((Object)(object)val); } } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "ShipLeave")] public static void OnShipLeave() { DestroyMetalPatch(); } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "EndGameServerRpc")] public static void DestroyForGodsSake() { DestroyMetalPatch(); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "IsMetalNet"; } } [HarmonyPatch(typeof(ItemCharger))] internal class ItemChargerPatches { [HarmonyPrefix] [HarmonyPatch("ChargeItem")] private static bool InterruptChargeItem() { if (ItemChargerFailure.Instance.Active) { ((TMP_Text)HUDManager.Instance.globalNotificationText).text = "CHARGING STATION FAILURE:\nINSUFFICIENT POWER"; HUDManager.Instance.globalNotificationAnimator.SetTrigger("TriggerNotif"); HUDManager.Instance.UIAudio.PlayOneShot(HUDManager.Instance.radiationWarningAudio, 1f); return false; } return true; } } [HarmonyPatch(typeof(JetpackItem))] internal class JetpackItemPatches { [HarmonyPostfix] [HarmonyPatch("Update")] private static void PreventItemActivation(JetpackItem __instance) { if (JetpackFailure.Instance.Active) { ((GrabbableObject)__instance).insertedBattery.empty = true; } } } public class kidnapperFoxNet : NetworkBehaviour { public static kidnapperFoxNet instance; public void Awake() { if ((Object)(object)instance != (Object)null) { DestroyKidnapperNet(); } instance = this; Net.Instance.SetKidnapperFoxNetServerRpc(active: true); } public static void DestroyKidnapperNet() { KidnapperFox.Active = false; GameObject val = GameObject.Find("KidnapperFoxNet"); if ((Object)(object)val != (Object)null) { Object.Destroy((Object)(object)val); } } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "ShipLeave")] public static void OnShipLeave() { DestroyKidnapperNet(); } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "EndGameServerRpc")] public static void DestroyForGodsSake() { DestroyKidnapperNet(); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "kidnapperFoxNet"; } } [HarmonyPatch] internal class LevelModifications { internal static List insideEnemies = new List(); internal static List outsideEnemies = new List(); internal static List daytimeEnemies = new List(); internal static List spawnableMapObjects = new List(); [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "Start")] private static void onStartOfRoundStart() { if (Configuration.Initalized) { EventManager.forcedEvents.Clear(); UI.canClearText = true; EventManager.ExecuteOnGameStart(); } } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "ShipLeave")] private static void OnShipLeave() { EventManager.ExecuteOnShipLeave(); EventManager.currentEvents.Clear(); EventManager.sideEvents.Clear(); Net.Instance.ClearGameObjectsServerRpc(); Log.LogInfo("Restoring un-modified level enemy spawns on current level."); RoundManager.Instance.currentLevel.Enemies.Clear(); RoundManager.Instance.currentLevel.Enemies.AddRange(insideEnemies); RoundManager.Instance.currentLevel.OutsideEnemies.Clear(); RoundManager.Instance.currentLevel.OutsideEnemies.AddRange(outsideEnemies); RoundManager.Instance.currentLevel.DaytimeEnemies.Clear(); RoundManager.Instance.currentLevel.DaytimeEnemies.AddRange(daytimeEnemies); if (Compatibility.DawnLibPresent) { try { DawnLibHandling.OnEventEnd(); } catch { Log.LogWarning("Failed to restore DawnLib registry for hazards"); } } } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "OnLocalDisconnect")] private static void OnLocalDisconnect() { EventManager.ExecuteOnLocalDisconnect(); if (Compatibility.HotBarPlusPresent) { HotBarPlusCompat.ResetHotbar(); } } public static void ResetValues(StartOfRound __instance) { //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_014b: Unknown result type (might be due to invalid IL or missing references) //IL_017c: Unknown result type (might be due to invalid IL or missing references) //IL_0181: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01c5: Unknown result type (might be due to invalid IL or missing references) //IL_01d2: Unknown result type (might be due to invalid IL or missing references) if (!((NetworkBehaviour)RoundManager.Instance).IsHost || __instance.currentLevel.levelID == 3) { return; } Manager.currentLevel = __instance.currentLevel; int levelIndex = Manager.GetLevelIndex(); Log.LogInfo($"Storing un-modified level paramaters on level:{((Object)__instance.currentLevel).name}"); insideEnemies.Clear(); insideEnemies.AddRange(__instance.currentLevel.Enemies); outsideEnemies.Clear(); outsideEnemies.AddRange(__instance.currentLevel.OutsideEnemies); daytimeEnemies.Clear(); daytimeEnemies.AddRange(__instance.currentLevel.DaytimeEnemies); Log.LogInfo("Resetting level values before changing."); __instance.currentLevel.spawnableMapObjects = Assets.spawnableMapObjects[levelIndex]; if (!Configuration.dontHandleSpawnCurves.Value) { __instance.currentLevel.enemySpawnChanceThroughoutDay.ClearKeys(); __instance.currentLevel.outsideEnemySpawnChanceThroughDay.ClearKeys(); __instance.currentLevel.daytimeEnemySpawnChanceThroughDay.ClearKeys(); Keyframe[] keys = Assets.insideSpawnChanceCurves[levelIndex].keys; foreach (Keyframe val in keys) { __instance.currentLevel.enemySpawnChanceThroughoutDay.AddKey(val); } Keyframe[] keys2 = Assets.outsideSpawnChanceCurves[levelIndex].keys; foreach (Keyframe val2 in keys2) { __instance.currentLevel.outsideEnemySpawnChanceThroughDay.AddKey(val2); } Keyframe[] keys3 = Assets.daytimeSpawnChanceCurves[levelIndex].keys; foreach (Keyframe val3 in keys3) { __instance.currentLevel.daytimeEnemySpawnChanceThroughDay.AddKey(val3); } } GrabbableLandmines.LandmineDisabled = false; foreach (MEvent @event in EventManager.events) { @event.Executed = false; } if (!Configuration.dontHandlePower.Value) { RoundManager.Instance.currentLevel.maxEnemyPowerCount = Assets.insideMaxPowerCounts[levelIndex]; RoundManager.Instance.currentLevel.maxOutsideEnemyPowerCount = Assets.outsideMaxPowerCounts[levelIndex]; RoundManager.Instance.currentLevel.maxDaytimeEnemyPowerCount = Assets.daytimeMaxPowerCounts[levelIndex]; } Manager.bonusEnemyHp = 0; Manager.spawnChanceMultiplier = 1f; Manager.spawncapMultipler = 1f; Manager.bonusMaxInsidePowerCount = 0; Manager.bonusMaxOutsidePowerCount = 0; try { Manager.currentLevel.factorySizeMultiplier = Assets.factorySizeMultiplierList[__instance.currentLevel.levelID]; } catch { Manager.currentLevel.factorySizeMultiplier = 1f; } Manager.scrapAmountMultiplier = 1f; Manager.scrapValueMultiplier = 1f; Manager.randomItemsToSpawnOutsideCount = 0; Manager.transmuteScrap = false; Manager.ScrapToTransmuteTo.Clear(); Manager.insideObjectsToSpawnOutside.Clear(); } [HarmonyPrefix] [HarmonyPatch(typeof(RoundManager), "waitForScrapToSpawnToSync")] public static void OnwaitForScrapToSpawnToSync(ref NetworkObjectReference[] spawnedScrap, ref int[] scrapValues) { //IL_0172: Unknown result type (might be due to invalid IL or missing references) //IL_01b1: Unknown result type (might be due to invalid IL or missing references) //IL_01f6: Unknown result type (might be due to invalid IL or missing references) //IL_03fb: Unknown result type (might be due to invalid IL or missing references) //IL_03ac: Unknown result type (might be due to invalid IL or missing references) //IL_04c7: 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_0533: 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_0551: Unknown result type (might be due to invalid IL or missing references) //IL_05bc: Unknown result type (might be due to invalid IL or missing references) if (spawnedScrap.Length == 0) { return; } for (int i = 0; i < scrapValues.Length; i++) { if (Configuration.ExtraLogging.Value) { Log.LogDebug($"Old scrap value: {scrapValues[i]}"); } scrapValues[i] = (int)((float)scrapValues[i] * Manager.scrapValueMultiplier); if (Configuration.ExtraLogging.Value) { Log.LogDebug("New scrap value: " + scrapValues[i]); } } int num = (int)((float)spawnedScrap.Length * (Manager.scrapAmountMultiplier - 1f)); int num2 = 0; Manager.ScrapSpawnInfo scrapSpawnInfo = new Manager.ScrapSpawnInfo((NetworkObjectReference[])(object)new NetworkObjectReference[0], new int[0]); if (num >= 0) { scrapSpawnInfo = Manager.Spawn.DoSpawnScrapInside(num); } else { num2 = Mathf.Clamp(num * -1, 0, scrapValues.Length - 1); Log.LogInfo($"Removing {num2} scrap."); NetworkObject val = default(NetworkObject); for (int num3 = spawnedScrap.Length - 1; num3 >= spawnedScrap.Length - num2; num3--) { if (((NetworkObjectReference)(ref spawnedScrap[num3])).TryGet(ref val, (NetworkManager)null)) { val.Despawn(true); } } } Manager.ScrapSpawnInfo scrapSpawnInfo2 = Manager.Spawn.DoSpawnScrapOutside(Manager.randomItemsToSpawnOutsideCount); List list = new List(); List list2 = new List(); for (int j = 0; j < spawnedScrap.Length - num2; j++) { list.Add(spawnedScrap[j]); list2.Add(scrapValues[j]); } for (int k = 0; k < scrapSpawnInfo.netObjects.Length; k++) { list.Add(scrapSpawnInfo.netObjects[k]); list2.Add(scrapSpawnInfo.scrapPrices[k]); } for (int l = 0; l < scrapSpawnInfo2.netObjects.Length; l++) { list.Add(scrapSpawnInfo2.netObjects[l]); list2.Add(scrapSpawnInfo2.scrapPrices[l]); } spawnedScrap = list.ToArray(); scrapValues = list2.ToArray(); IncreaseApparaticeScrapValue(); if (!Manager.transmuteScrap) { return; } if (Manager.ScrapToTransmuteTo.Count == 0) { Log.LogError("ScrapToTransmuteTo Count is 0, returning."); return; } if (Manager.scrapTransmuteAmount.Count == 0) { Log.LogError("scrapTransmuteAmount Count is 0, returning."); return; } float num4 = 0f; foreach (float item in Manager.scrapTransmuteAmount) { num4 += item; } num4 /= (float)Manager.scrapTransmuteAmount.Count; Manager.scrapTransmuteAmount.Clear(); int num5 = Mathf.Clamp((int)((float)spawnedScrap.Length * num4) + 1, 1, spawnedScrap.Length); int num6 = 0; Log.LogInfo($"Transmuting {num5} scrap."); List list3 = new List(); NetworkObject val2 = default(NetworkObject); for (int m = 0; m < num5; m++) { if (((NetworkObjectReference)(ref spawnedScrap[m])).TryGet(ref val2, (NetworkManager)null)) { string text = ((Component)val2).GetComponent()?.itemProperties.itemName; if (Configuration.ExtraLogging.Value) { Log.LogInfo("Attempting to transmute scrap item: " + text); } if (!isIgnoredItem(text)) { list3.Add(((Component)val2).transform.position); val2.Despawn(true); num6++; } } } num5 = num6; List list4 = new List(); List list5 = new List(); for (int n = num5; n < spawnedScrap.Length; n++) { list4.Add(spawnedScrap[n]); list5.Add(scrapValues[n]); } List list6 = new List(); foreach (SpawnableItemWithRarity item2 in Manager.ScrapToTransmuteTo) { list6.Add(item2.rarity); } for (int num7 = 0; num7 < num5; num7++) { SpawnableItemWithRarity val3 = Manager.ScrapToTransmuteTo[RoundManager.Instance.GetRandomWeightedIndexList(list6, (Random)null)]; if ((Object)(object)val3.spawnableItem.spawnPrefab == (Object)null) { Log.LogWarning("chosenItem spawnPrefab is null, skipping entry."); continue; } GameObject val4 = Object.Instantiate(val3.spawnableItem.spawnPrefab, Vector3.zero, Quaternion.identity); GrabbableObject component = val4.GetComponent(); NetworkObject component2 = val4.GetComponent(); if ((Object)(object)component == (Object)null) { Log.LogWarning("chosenItem grabbableObject is null, skipping entry."); continue; } if ((Object)(object)component2 == (Object)null) { Log.LogWarning("chosenItem networkObject is null, skipping entry,"); continue; } ((Component)component).transform.position = list3[num7]; ((Component)component).transform.rotation = Quaternion.Euler(component.itemProperties.restingRotation); component.fallTime = 0f; int num8 = (int)((float)Random.Range(val3.spawnableItem.minValue, val3.spawnableItem.maxValue + 1) * RoundManager.Instance.scrapValueMultiplier * Manager.scrapValueMultiplier); list5.Add(num8); component.scrapValue = num8; component2.Spawn(false); list4.Add(NetworkObjectReference.op_Implicit(component2)); } spawnedScrap = list4.ToArray(); scrapValues = list5.ToArray(); } internal static bool isIgnoredItem(string itemNameToIgnore) { bool result = false; Log.LogInfo("Got item: " + itemNameToIgnore); string serializedValue = ((ConfigEntryBase)Configuration.transmutationBlacklist).GetSerializedValue(); string[] array = (string.IsNullOrEmpty(serializedValue) ? new string[0] : (from itemName in serializedValue.Split(new char[1] { ',' }, StringSplitOptions.RemoveEmptyEntries) select itemName.Trim()).ToArray()); if (Configuration.ExtraLogging.Value) { Log.LogInfo("List of items to ignore transmute: " + string.Join(", ", array)); } if (array.Contains(itemNameToIgnore)) { result = true; Log.LogInfo("Item is on list of items to ignore transmute. Skipping Transmute"); } return result; } private static void IncreaseApparaticeScrapValue() { //IL_017a: Unknown result type (might be due to invalid IL or missing references) if (!((NetworkBehaviour)Net.Instance).IsServer) { return; } LungProp[] array = Object.FindObjectsOfType(); if (array.Length == 0 && (RoundManager.Instance.currentDungeonType == 0 || RoundManager.Instance.currentDungeonType == 3)) { Log.LogWarning("Could not find apparatice in facility interior to increase it's scrap value multiplier."); } LungProp[] array2 = array; foreach (LungProp val in array2) { Log.LogDebug($"LungProp stats: [isScrap: {((GrabbableObject)val).itemProperties.isScrap}] [isLungDocked: {val.isLungDocked}] " + $"[isLungPowered: {val.isLungPowered}] [hasBeenHeld: {((GrabbableObject)val).hasBeenHeld}] [isInShipRoom: {((GrabbableObject)val).isInShipRoom}] " + $"[isInElevator: {((GrabbableObject)val).isInElevator}] [name: {((Object)val).name}] [scrapname: {((GrabbableObject)val).itemProperties.itemName}] " + $"[currentDungeonType: {RoundManager.Instance.currentDungeonType}]"); if (((GrabbableObject)val).itemProperties.isScrap && val.isLungDocked && val.isLungPowered && !((GrabbableObject)val).hasBeenHeld && !((GrabbableObject)val).isInShipRoom && !((GrabbableObject)val).isInElevator) { ScanNodeProperties componentInChildren = ((Component)val).gameObject.GetComponentInChildren(); bool flag = componentInChildren.subText.Contains("???"); NetworkObject component = ((Component)val).GetComponent(); Net.Instance.SyncScrapValueServerRpc(NetworkObjectReference.op_Implicit(component), Mathf.RoundToInt((float)((GrabbableObject)val).scrapValue * Manager.scrapValueMultiplier)); if (flag) { componentInChildren.subText = "Value: ???"; } } } } } [HarmonyPatch(typeof(StartMatchLever))] internal class StartMatchLeverPatches { [HarmonyPrefix] [HarmonyPatch("PullLever")] private static bool InterruptPullLever(StartMatchLever __instance) { if (EventManager.sideEvents.Contains(LeverFailure.Instance)) { ((TMP_Text)HUDManager.Instance.globalNotificationText).text = "SHIP CORE DEPLETION:\nAWAIT 12AM EMERGENCY AUTOPILOT"; HUDManager.Instance.globalNotificationAnimator.SetTrigger("TriggerNotif"); HUDManager.Instance.UIAudio.PlayOneShot(HUDManager.Instance.radiationWarningAudio, 1f); Net.Instance.SyncLeverTooltipServerRpc("[No power to hydraulics]"); return false; } if (LeverFailure.Instance.Active) { ((TMP_Text)HUDManager.Instance.globalNotificationText).text = "SHIP LEVER HYDRAULICS JAM:\nAWAIT 12AM EMERGENCY AUTOPILOT"; HUDManager.Instance.globalNotificationAnimator.SetTrigger("TriggerNotif"); HUDManager.Instance.UIAudio.PlayOneShot(HUDManager.Instance.radiationWarningAudio, 1f); Net.Instance.SyncLeverTooltipServerRpc("[Hydraulics jammed]"); return false; } return true; } } [HarmonyPatch] internal class LockedDoorsHandler { [CompilerGenerated] private sealed class d__1 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__1(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(8f); <>1__state = 1; return true; case 1: <>1__state = -1; Net.Instance.LockAndCloseAllDoorsServerRpc(); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [HarmonyPostfix] [HarmonyPatch(typeof(RoundManager), "RefreshEnemiesList")] private static void OnRefreshEnemiesList() { if (LockedDoors.Active && NetworkManager.Singleton.IsServer) { ((MonoBehaviour)RoundManager.Instance).StartCoroutine(CloseAll()); LockedDoors.Active = false; } } [IteratorStateMachine(typeof(d__1))] private static IEnumerator CloseAll() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__1(0); } } [HarmonyPatch(typeof(ManualCameraRenderer))] internal class ManualCameraRendererPatches { [HarmonyPrefix] [HarmonyPatch("SwitchScreenButton")] private static bool InterruptSwitchScreenButton(ManualCameraRenderer __instance) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) if (ManualCameraFailure.Active) { __instance.offScreenMat.color = Color.black; return false; } return true; } [HarmonyPrefix] [HarmonyPatch("SwitchRadarTargetClientRpc")] private static bool InterruptSwitchCameraView(ManualCameraRenderer __instance) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) if (ManualCameraFailure.Active) { __instance.offScreenMat.color = Color.black; __instance.currentCameraDisabled = true; return false; } return true; } } public class MetalSwitchNet : NetworkBehaviour { public static MetalSwitchNet instance; public void Awake() { if ((Object)(object)instance != (Object)null) { DestroyMetalSwitchPatch(); } instance = this; Net.Instance.SetMetalSwitchNetServerRpc(active: true); } public static void DestroyMetalSwitchPatch() { MetalSwitch.Active = false; GameObject val = GameObject.Find("MetalSwitch"); if ((Object)(object)val != (Object)null) { Object.Destroy((Object)(object)val); } } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "ShipLeave")] public static void OnShipLeave() { DestroyMetalSwitchPatch(); } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "EndGameServerRpc")] public static void DestroyForGodsSake() { DestroyMetalSwitchPatch(); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "MetalSwitchNet"; } } public class ScanVanNet : NetworkBehaviour { public static ScanVanNet instance; public void Awake() { if ((Object)(object)instance != (Object)null) { DestroyCruiserFailure(); } instance = this; Net.Instance.CruiserFailureServerRpc(active: true); } public static void DestroyCruiserFailure() { CruiserFailure.Active = false; GameObject val = GameObject.Find("ScanVanFailure"); if ((Object)(object)val != (Object)null) { Object.Destroy((Object)(object)val); } } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "ShipLeave")] public static void OnShipLeave() { DestroyCruiserFailure(); } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "EndGameServerRpc")] public static void DestroyForGodsSake() { DestroyCruiserFailure(); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "ScanVanNet"; } } public class NotMetalNet : NetworkBehaviour { public static NotMetalNet instance; public void Awake() { if ((Object)(object)instance != (Object)null) { DestroyNotMetalPatch(); } instance = this; Net.Instance.SetMetalOffNetServerRpc(active: true); } public static void DestroyNotMetalPatch() { NotMetal.Active = false; GameObject val = GameObject.Find("NotMetal"); if ((Object)(object)val != (Object)null) { Object.Destroy((Object)(object)val); } } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "ShipLeave")] public static void OnShipLeave() { DestroyNotMetalPatch(); } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "EndGameServerRpc")] public static void DestroyForGodsSake() { DestroyNotMetalPatch(); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "NotMetalNet"; } } [HarmonyPatch] internal class RealityShift { [CompilerGenerated] private sealed class d__16 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public PlayerControllerB instance; private NetworkObject 5__1; private NetworkObjectReference 5__2; private GrabbableObject 5__3; private List <>s__4; private bool <>s__5; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__16(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__3 = null; <>s__4 = null; <>1__state = -2; } private bool MoveNext() { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_0345: Unknown result type (might be due to invalid IL or missing references) switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitUntil((Func)(() => shiftedObjects.Count > 0)); <>1__state = 1; return true; case 1: <>1__state = -1; 5__1 = null; <>s__4 = shiftedObjects; <>s__5 = false; try { Monitor.Enter(<>s__4, ref <>s__5); if (shiftedObjects.Count == 0) { Log.LogError("No shifted objects found in GrabShiftedObject()"); return false; } 5__2 = shiftedObjects[0]; shiftedObjects.RemoveAt(0); } finally { if (<>s__5) { Monitor.Exit(<>s__4); } } <>s__4 = null; if (!((NetworkObjectReference)(ref 5__2)).TryGet(ref 5__1, (NetworkManager)null) || (Object)(object)5__1 == (Object)null) { Log.LogError("Null network object in GrabShiftedObject()"); return false; } 5__3 = ((Component)5__1).GetComponent(); currentlyGrabbingObject.SetValue(instance, 5__3); if ((int)firstEmptyItemSlot.Invoke(instance, new object[1] { 5__3 }) == -1) { return false; } 5__3.InteractItem(); if (5__3.grabbable) { instance.playerBodyAnimator.SetBool("GrabInvalidated", false); instance.playerBodyAnimator.SetBool("GrabValidated", false); instance.playerBodyAnimator.SetBool("cancelHolding", false); instance.playerBodyAnimator.ResetTrigger("Throw"); setSpecialGrabAnimationBool.Invoke(instance, new object[2] { true, null }); instance.isGrabbingObjectAnimation = true; ((Behaviour)instance.cursorIcon).enabled = false; ((TMP_Text)instance.cursorTip).text = ""; instance.twoHanded = 5__3.itemProperties.twoHanded; PlayerControllerB obj = instance; obj.carryWeight += Mathf.Clamp(5__3.itemProperties.weight - 1f, 0f, 10f); if (5__3.itemProperties.grabAnimationTime > 0f) { instance.grabObjectAnimationTime = 5__3.itemProperties.grabAnimationTime; } else { instance.grabObjectAnimationTime = 0.4f; } if (grabObjectCoroutine.GetValue(instance) != null) { ((MonoBehaviour)instance).StopCoroutine("GrabObject"); } grabObjectCoroutine.SetValue(instance, ((MonoBehaviour)instance).StartCoroutine("GrabObject")); } grabObjectServerRpc.Invoke(instance, new object[1] { 5__2 }); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } public static List shiftList = new List(); public static List shiftListValues = new List(); public static int normalScrapWeight = 85; public static int grabbableLandmineWeight = 15; public static float transmuteChance = 0.5f; public static float enemyTeleportChance = 0.1f; public static List ShiftableObjects = new List(); public static List shiftedObjects = new List(); public static MethodInfo grabObjectServerRpc = typeof(PlayerControllerB).GetMethod("GrabObjectServerRpc", BindingFlags.Instance | BindingFlags.NonPublic); public static MethodInfo firstEmptyItemSlot = typeof(PlayerControllerB).GetMethod("FirstEmptyItemSlot", BindingFlags.Instance | BindingFlags.NonPublic); public static MethodInfo setSpecialGrabAnimationBool = typeof(PlayerControllerB).GetMethod("SetSpecialGrabAnimationBool", BindingFlags.Instance | BindingFlags.NonPublic); public static FieldInfo grabObjectCoroutine = typeof(PlayerControllerB).GetField("grabObjectCoroutine", BindingFlags.Instance | BindingFlags.NonPublic); public static FieldInfo currentlyGrabbingObject = typeof(PlayerControllerB).GetField("currentlyGrabbingObject", BindingFlags.Instance | BindingFlags.NonPublic); public static bool invalidateGrab = false; [HarmonyPrefix] [HarmonyPatch(typeof(PlayerControllerB), "BeginGrabObject")] public static void OnBeginGrabObject(ref PlayerControllerB __instance) { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004d: Unknown result type (might be due to invalid IL or missing references) //IL_016f: Unknown result type (might be due to invalid IL or missing references) if (!BrutalCompanyMinus.Minus.Events.RealityShift.Active || (Object)(object)GameNetworkManager.Instance.localPlayerController == (Object)null) { return; } Ray val = default(Ray); ((Ray)(ref val))..ctor(((Component)__instance.gameplayCamera).transform.position, ((Component)__instance.gameplayCamera).transform.forward); RaycastHit val2 = default(RaycastHit); if (!Physics.Raycast(val, ref val2, __instance.grabDistance, 832) || ((Component)((RaycastHit)(ref val2)).collider).gameObject.layer == 8 || !(((Component)((RaycastHit)(ref val2)).collider).tag == "PhysicsProp") || __instance.twoHanded || __instance.sinkingValue > 0.73f) { return; } GrabbableObject component = ((Component)((RaycastHit)(ref val2)).collider).gameObject.GetComponent(); if (!((Object)(object)component != (Object)null) || !((Object)(object)((NetworkBehaviour)component).NetworkObject != (Object)null) || (int)firstEmptyItemSlot.Invoke(__instance, new object[1] { component }) == -1) { return; } foreach (int shiftableObject in ShiftableObjects) { if (shiftableObject == ((Object)((Component)component).gameObject).GetInstanceID() && Random.Range(0f, 1f) <= transmuteChance) { invalidateGrab = true; Net.Instance.ShiftServerRpc(NetworkObjectReference.op_Implicit(((NetworkBehaviour)component).NetworkObject)); ((MonoBehaviour)__instance).StopCoroutine(GrabShiftedObject(__instance)); ((MonoBehaviour)__instance).StartCoroutine(GrabShiftedObject(__instance)); break; } } } [HarmonyPrefix] [HarmonyPatch(typeof(EnemyAI), "HitEnemy")] private static void OnHitEnemy(ref EnemyAI __instance) { //IL_006c: Unknown result type (might be due to invalid IL or missing references) //IL_007b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: 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_009e: Unknown result type (might be due to invalid IL or missing references) if (!BrutalCompanyMinus.Minus.Events.RealityShift.Active || !NetworkManager.Singleton.IsServer || (Object)(object)__instance == (Object)null || (Object)(object)((Component)__instance).transform == (Object)null) { return; } Random random = new Random(Net.Instance._seed++); if (random.NextDouble() <= (double)enemyTeleportChance) { Vector3 randomNavMeshPositionInBox = Helper.GetRandomNavMeshPositionInBox(((Component)__instance).transform.position, 15f, 25f); NetworkObject val = default(NetworkObject); if (((Component)__instance).TryGetComponent(ref val)) { Net.Instance.TeleportEnemyServerRpc(NetworkObjectReference.op_Implicit(val), randomNavMeshPositionInBox); } } } [IteratorStateMachine(typeof(d__16))] public static IEnumerator GrabShiftedObject(PlayerControllerB instance) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__16(0) { instance = instance }; } [HarmonyPostfix] [HarmonyPatch(typeof(PlayerControllerB), "GrabObjectClientRpc")] public static void OnGrabObjectClientRpc() { lock (shiftedObjects) { shiftedObjects.Clear(); } } [HarmonyPrefix] [HarmonyPriority(0)] [HarmonyPatch(typeof(RoundManager), "waitForScrapToSpawnToSync")] public static void OnwaitForScrapToSpawnToSync(ref NetworkObjectReference[] spawnedScrap) { if (!BrutalCompanyMinus.Minus.Events.RealityShift.Active) { return; } shiftList.Clear(); shiftListValues.Clear(); Net.Instance.GenerateShiftableObjectsListServerRpc(spawnedScrap); List list = new List(); foreach (SpawnableItemWithRarity item in RoundManager.Instance.currentLevel.spawnableScrap) { if (item != null) { list.Add(item.rarity); } else { list.Add(0); } } for (int i = 0; i < ShiftableObjects.Count; i++) { int num = StartOfRound.Instance.randomMapSeed + i; Random random = new Random(num); Random.InitState(num); Item val = RoundManager.Instance.currentLevel.spawnableScrap[RoundManager.Instance.GetRandomWeightedIndexList(list, random)].spawnableItem; int num2 = RoundManager.Instance.GetRandomWeightedIndex(new int[2] { normalScrapWeight, grabbableLandmineWeight }, random); if ((Object)(object)val.spawnPrefab == (Object)null || (Object)(object)val.spawnPrefab.GetComponent() == (Object)null) { num2 = 1; } if (num2 == 1) { val = Assets.grabbableLandmine; } shiftList.Add(val.spawnPrefab); shiftListValues.Add((int)((float)Random.Range(val.minValue, val.maxValue + 1) * RoundManager.Instance.scrapValueMultiplier * Manager.scrapValueMultiplier)); } } } internal class GrabObjectTranspiler { [HarmonyTranspiler] [HarmonyPatch(typeof(PlayerControllerB), "BeginGrabObject")] private static IEnumerable OnBeginGrabIL(IEnumerable instructions, ILGenerator il) { //IL_0105: Unknown result type (might be due to invalid IL or missing references) //IL_010f: Expected O, but got Unknown //IL_0136: Unknown result type (might be due to invalid IL or missing references) //IL_0140: Expected O, but got Unknown List list = new List(instructions); int num = -1; object obj = null; for (int i = 0; i < list.Count; i++) { if (num == -1 && list[i].opcode == OpCodes.Ldfld && list[i + 1].opcode == OpCodes.Callvirt && list[i + 2].opcode == OpCodes.Callvirt && list[i + 3].opcode == OpCodes.Newobj && list[i + 4].opcode == OpCodes.Stfld) { num = i + 5; } if (list[i].opcode == OpCodes.Brfalse) { obj = list[i].operand; break; } } if (num != -1 && obj != null) { list.Insert(num, new CodeInstruction(OpCodes.Brtrue, obj)); list.Insert(num, new CodeInstruction(Transpilers.EmitDelegate>((Func)delegate { if (RealityShift.invalidateGrab) { RealityShift.invalidateGrab = false; return true; } return false; }))); } else { Log.LogError("Failed to patch BeginGrabObject()"); } Log.LogInfo("Patched Section PlayerControllerB.BeginGrabObject()"); for (int j = 0; j < num + 4; j++) { string text = ""; string text2 = ""; foreach (Label label in list[j].labels) { text += list[j].labels; } if (j == num || j == num + 1) { text2 = "-> "; } Log.LogInfo($"{text2}{j}: {list[j].opcode}, {list[j].operand}, {text}"); } return list.AsEnumerable(); } } [HarmonyPatch] internal class SafeOutside { [CompilerGenerated] private sealed class d__2 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public EnemyAI ai; private NetworkObject 5__1; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__2(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; <>1__state = -2; } private bool MoveNext() { //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitForSeconds(0.1f); <>1__state = 1; return true; case 1: <>1__state = -1; 5__1 = ((Component)ai).GetComponent(); if ((Object)(object)5__1 != (Object)null) { 5__1.Despawn(true); } else { Log.LogError("Failed to capture enemyAI networkobject while safeOutside is active"); } return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [HarmonyPrefix] [HarmonyPatch(typeof(RoundManager), "AssignRandomEnemyToVent")] private static void OnAssignRandomEnemyToVent(ref RoundManager __instance) { if (BrutalCompanyMinus.Minus.Events.SafeOutside.Active) { __instance.currentMaxOutsidePower = 0f; } } [HarmonyPostfix] [HarmonyPatch(typeof(EnemyAI), "Start")] private static void OnEnemyAIStart(ref EnemyAI __instance) { //IL_0044: 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) if (BrutalCompanyMinus.Minus.Events.SafeOutside.Active) { GameObject terrainObject = Manager.terrainObject; float num = -100f; if ((Object)(object)terrainObject != (Object)null) { num = terrainObject.transform.position.y - 100f; } if (((Component)__instance).transform.position.y > num) { ((MonoBehaviour)__instance).StartCoroutine(DestroyEnemyAI(__instance)); } } } [IteratorStateMachine(typeof(d__2))] private static IEnumerator DestroyEnemyAI(EnemyAI ai) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__2(0) { ai = ai }; } } [HarmonyPatch] [HarmonyPatch(typeof(ItemDropship))] internal class ShipmentFees { private static int due; [HarmonyPrefix] [HarmonyPatch("LandShipOnServer")] private static void OnShipment() { if (due > 0 && Manager.currentTerminal.groupCredits > 0) { HUDManager.Instance.AddTextToChatOnServer("Due payment.", -1); int groupCredits = due; if (Manager.currentTerminal.groupCredits - due < 0) { groupCredits = Manager.currentTerminal.groupCredits; } Manager.PayCredits(-groupCredits); due -= groupCredits; HUDManager.Instance.AddTextToChatOnServer($"New Due balance: {due}", -1); } if (!BrutalCompanyMinus.Minus.Events.ShipmentFees.Active) { return; } MEvent instance = BrutalCompanyMinus.Minus.Events.ShipmentFees.Instance; float num = instance.Getf(MEvent.ScaleType.MinCut); float num2 = instance.Getf(MEvent.ScaleType.MaxCut); int num3 = 0; foreach (int item in Manager.currentTerminal.orderedItemsFromTerminal) { Item val = Manager.currentTerminal.buyableItemsList[item]; num3 += (int)((float)val.creditsWorth * Random.Range(num, num2)); } if (Manager.currentTerminal.groupCredits - num3 < 0) { due += num3 - Manager.currentTerminal.groupCredits; num3 = Manager.currentTerminal.groupCredits; HUDManager.Instance.AddTextToChatOnServer($"Since you lack credits to pay the full fee, you will be due {due} on the next shipment.", -1); } Manager.PayCredits(-num3); } } [HarmonyPatch(typeof(ShipTeleporter))] internal class ShipTeleporterPatches { [HarmonyPrefix] [HarmonyPatch("PressTeleportButtonOnLocalClient")] private static bool InterruptPressTeleportButton(ShipTeleporter __instance) { if (TeleporterFailure.Instance.Active) { __instance.buttonAnimator.SetTrigger("press"); __instance.buttonAudio.PlayOneShot(__instance.buttonPressSFX); return false; } return true; } [HarmonyPostfix] [HarmonyPatch("PressTeleportButtonOnLocalClient")] private static void RandomizePressTeleportButton() { if (TargetingFailureEvent.Instance.Active) { PlayerControllerB[] array = (from player in Object.FindObjectsByType((FindObjectsSortMode)0) where player.isPlayerControlled select player).ToArray(); if (array.Length != 0) { StartOfRound.Instance.mapScreen.targetedPlayer = array[Random.Range(0, array.Length)]; } } } } [HarmonyPatch(typeof(Terminal))] internal class TerminalPatches { [HarmonyPrefix] [HarmonyPatch("OnSubmit")] private static bool BlockMoonConfirmNode() { if (TerminalFailure.Instance.Active) { HUDManager.Instance.UIAudio.PlayOneShot(HUDManager.Instance.radiationWarningAudio, 1f); return false; } return true; } } [HarmonyPatch] public class TerminalCommands { public class MCommand { public string command; public string tag; public string shortinfo; public string info; public Action execute; } private static string response = ""; private static bool _clearPreviousText = true; public static List mCommands = new List { new MCommand { command = "MHELP", shortinfo = "Provides help information for commands.", info = "MHELP [Command]\n Command - displays help information on that command.", execute = delegate(string[] arguments) { if (arguments.Length == 0) { string text11 = "To display extra information about a particular command use MHELP [Command]\n\n"; foreach (MCommand mCommand in mCommands) { text11 = text11 + mCommand.command.PadRight(10) + mCommand.shortinfo + "\n\n"; } Respond(text11); } else { bool flag5 = false; foreach (MCommand mCommand2 in mCommands) { if (!(mCommand2.command != arguments[0].ToUpper())) { Respond(mCommand2.shortinfo + "\n\n" + mCommand2.info); flag5 = true; break; } } if (!flag5) { Respond(arguments[0] + " is not a command."); } } } }, new MCommand { command = "MEVENT", tag = "SERVER", shortinfo = "Forces a mEvent to occur for next day.", info = "MEVENT [mEvent]\n mEvent - the name of said event.\n\nMEVENT [mEvent 1] [mEvent 2] ... [mEvent n]\n this can take multiple events.", execute = delegate(string[] arguments) { if (Configuration.speedrunMode.Value) { Respond("MEVENT command is disabled in speedrun mode."); } else if (arguments.Length == 0) { Respond("MEVENT command is missing argument(s)."); } else { string text9 = ""; foreach (string text10 in arguments) { if (!Utility.IsNullOrWhiteSpace(text10)) { bool flag2 = false; string upperArg = text10.ToUpper(); foreach (MEvent @event in EventManager.events) { bool flag3 = upperArg == @event.Name().ToUpper(); bool flag4 = @event.Aliases != null && @event.Aliases.Any((string alias) => alias.ToUpper() == upperArg); if (flag3 || flag4) { flag2 = true; text9 = text9 + @event.Name() + " will now be forced to occur.\n"; EventManager.forcedEvents.Add(@event); break; } } if (!flag2) { text9 = text9 + "Failed to find " + text10 + " in events.\n"; } } } text9 = text9 + "\nCurrent forced events = [" + Helper.StringsToList(EventManager.forcedEvents.Select((MEvent n) => n.Name()).ToList(), ",") + "]"; Respond(text9); } } }, new MCommand { command = "MCLEAR", tag = "SERVER", shortinfo = "Clears the forced event list.", info = "MCLEAR\n Clears the forced event list from MEVENT.", execute = delegate { if (Configuration.speedrunMode.Value) { Respond("MCLEAR command is disabled in speedrun mode."); } else { EventManager.forcedEvents.Clear(); Respond("Cleared forced event list\n\nCurrent forced events = [" + Helper.StringsToList(EventManager.forcedEvents.Select((MEvent n) => n.Name()).ToList(), ",") + "]"); } } }, new MCommand { command = "MEVENTS", tag = "SERVER", shortinfo = "Displays all events.", info = "MEVENTS\n This will display all events, excluding disabled ones and modded ones where said mod isn't present.\n\nMEVENTS [Name]\n Displays properties of said event.", execute = delegate(string[] arguments) { if (arguments.Length == 0) { foreach (MEvent event2 in EventManager.events) { if (event2.isSpecialEvent) { EventManager.allSpecial.Add(event2); } if (event2.isBetaEvent) { EventManager.allBeta.Add(event2); } } string text7 = "To display extra information about a particular event, use\nMEVENTS [Name]\n\n"; text7 += "[Rare] events:\n"; text7 += Helper.StringsToList(EventManager.allRare.Select((MEvent n) => n.Name()).ToList(), ", "); text7 += "\n\n[Very Good] events:\n"; text7 += Helper.StringsToList(EventManager.allVeryGood.Select((MEvent n) => n.Name()).ToList(), ", "); text7 += "\n\n[Good] events:\n"; text7 += Helper.StringsToList(EventManager.allGood.Select((MEvent n) => n.Name()).ToList(), ", "); text7 += "\n\n[Neutral] events:\n"; text7 += Helper.StringsToList(EventManager.allNeutral.Select((MEvent n) => n.Name()).ToList(), ", "); text7 += "\n\n[Bad] events:\n"; text7 += Helper.StringsToList(EventManager.allBad.Select((MEvent n) => n.Name()).ToList(), ", "); text7 += "\n\n[VeryBad] events:\n"; text7 += Helper.StringsToList(EventManager.allVeryBad.Select((MEvent n) => n.Name()).ToList(), ", "); text7 += "\n\n[Insane] events:\n"; text7 += Helper.StringsToList(EventManager.allInsane.Select((MEvent n) => n.Name()).ToList(), ", "); text7 += "\n\n[Remove] events:\n"; text7 += Helper.StringsToList(EventManager.allRemove.Select((MEvent n) => n.Name()).ToList(), ", "); text7 += "\n\n\n[Special] events:\n"; text7 += Helper.StringsToList(EventManager.allSpecial.Select((MEvent n) => n.Name()).ToList(), ", "); text7 += "\n\n[Beta] events:\n"; text7 += Helper.StringsToList(EventManager.allBeta.Select((MEvent n) => n.Name()).ToList(), ", "); Respond(text7); EventManager.allSpecial.Clear(); EventManager.allBeta.Clear(); } else if (!Utility.IsNullOrWhiteSpace(arguments[0])) { bool flag = false; foreach (MEvent event3 in EventManager.events) { if (event3.Name().ToUpper() == arguments[0].ToUpper()) { flag = true; string text8 = "[" + event3.Name() + "]:\n\n"; text8 += $"[ColorHex]: {event3.ColorHex}\n[Weight]: {event3.Weight}\n[Type]: {event3.Type}\n\n"; text8 = text8 + "[Descriptions]: " + Helper.StringsToList(event3.Descriptions, "|") + "\n\n"; text8 = text8 + "[Aliases]: " + Helper.StringsToList(event3.Aliases, ", ") + "\n\n"; text8 = text8 + "[EventsToRemove]: " + Helper.StringsToList(event3.EventsToRemove, ", ") + "\n\n"; text8 = text8 + "[EventsToSpawnWith]: " + Helper.StringsToList(event3.EventsToSpawnWith, ", ") + "\n\n"; text8 = text8 + "[EventEnabled]: " + event3.Enabled + "\n\n"; text8 = text8 + "[IsSpecialEvent]: " + event3.isSpecialEvent + "\n\n"; text8 = text8 + "[IsBetaEvent]: " + event3.isBetaEvent + "\n\n"; text8 = text8 + "[WhitelistMode]: " + event3.MoonMode + "\n\n"; text8 = text8 + "[MoonsToNotSpawnOn]: " + Helper.StringsToList(event3.Blacklist, ", ") + "\n\n"; text8 = text8 + "[MoonsToSpawnOn]: " + Helper.StringsToList(event3.Whitelist, ", ") + "\n\n"; text8 = text8 + "[SpeedRunSafe]: " + event3.SpeedRunSafe + "\n\n"; text8 += "[ScaleList]: \n"; foreach (KeyValuePair scale in event3.ScaleList) { text8 = text8 + ScaleTypePadded(scale.Key) + " " + Helper.GetStringFromScale(scale.Value) + "\n"; } text8 += "\n[MonsterEvents]:\n"; foreach (MEvent.MonsterEvent item in event3.monstersToSpawn) { text8 = text8 + "\n" + ((Object)item.enemy).name + "\n"; text8 = text8 + ScaleTypePadded(MEvent.ScaleType.InsideEnemyRarity) + Helper.GetStringFromScale(item.insideSpawnRarity) + "\n"; text8 = text8 + ScaleTypePadded(MEvent.ScaleType.OutsideEnemyRarity) + Helper.GetStringFromScale(item.outsideSpawnRarity) + "\n"; text8 = text8 + ScaleTypePadded(MEvent.ScaleType.MinInsideEnemy) + Helper.GetStringFromScale(item.minInside) + "\n"; text8 = text8 + ScaleTypePadded(MEvent.ScaleType.MaxInsideEnemy) + Helper.GetStringFromScale(item.maxInside) + "\n"; text8 = text8 + ScaleTypePadded(MEvent.ScaleType.MinOutsideEnemy) + Helper.GetStringFromScale(item.minOutside) + "\n"; text8 = text8 + ScaleTypePadded(MEvent.ScaleType.MaxOutsideEnemy) + Helper.GetStringFromScale(item.maxOutside) + "\n"; } text8 += "\n[TransmutationEvent]:\n"; SpawnableItemWithRarity[] items = event3.scrapTransmutationEvent.items; foreach (SpawnableItemWithRarity val16 in items) { text8 += $"[Item]: {((Object)val16.spawnableItem).name.PadRight(18)} [Rarity]: {val16.rarity}\n"; } Respond(text8); break; } } if (!flag) { Respond("Failed to find event " + arguments[0] + " in events list."); } } } }, new MCommand { command = "MPAY", tag = "SERVER", shortinfo = "Adds or subtracts credits.", info = "MPAY [Amount]\n Amount is the quantity of credits added or subtracted.", execute = delegate(string[] arguments) { int result2; if (arguments.Length == 0) { Respond("MPAY command is missing argument(s)."); } else if (Configuration.speedrunMode.Value) { Respond("MPAY command is disabled in speedrun mode."); } else if (int.TryParse(arguments[0], out result2)) { Manager.PayCredits(result2); Respond("Added " + arguments[0] + " credits."); } else { Respond(arguments[0] + " is not an acceptable value, must be int32."); } } }, new MCommand { command = "MENEMIES", tag = "SERVER", shortinfo = "Displays all enemies.", info = "MENEMIES\n Will display the names of every enemy grabbed by this mod.", execute = delegate { int num15 = 0; string text6 = ""; foreach (string key in Assets.EnemyList.Keys) { num15++; text6 = ((num15 % 2 != 0) ? (text6 + key.PadRight(23)) : (text6 + " " + key + "\n")); } Respond(text6); } }, new MCommand { command = "MITEMS", tag = "SERVER", shortinfo = "Displays all items.", info = "MITEMS\n Will display the names of every item grabbed by this mod.", execute = delegate { int num14 = 0; string text5 = ""; foreach (string key2 in Assets.ItemList.Keys) { num14++; text5 = ((num14 % 2 != 0) ? (text5 + key2.PadRight(23)) : (text5 + " " + key2 + "\n")); } Respond(text5); } }, new MCommand { command = "MMOONS", tag = "SERVER", shortinfo = "Displays all moons.", info = "MMOONS\n This will display the names of every moon\nMMOONS [name/id]\n This will dump all information about said moon into the console.", execute = delegate(string[] arguments) { //IL_02ea: Unknown result type (might be due to invalid IL or missing references) //IL_0309: Unknown result type (might be due to invalid IL or missing references) //IL_0284: Unknown result type (might be due to invalid IL or missing references) //IL_04a4: Unknown result type (might be due to invalid IL or missing references) //IL_04a9: Unknown result type (might be due to invalid IL or missing references) //IL_05e3: Unknown result type (might be due to invalid IL or missing references) //IL_05e8: Unknown result type (might be due to invalid IL or missing references) //IL_09c9: Unknown result type (might be due to invalid IL or missing references) //IL_09ce: Unknown result type (might be due to invalid IL or missing references) //IL_0a43: Unknown result type (might be due to invalid IL or missing references) //IL_0a48: Unknown result type (might be due to invalid IL or missing references) //IL_0abd: Unknown result type (might be due to invalid IL or missing references) //IL_0ac2: Unknown result type (might be due to invalid IL or missing references) if (arguments.Length == 0) { string text3 = "To display extra information about a particular moon, use\nMOONS [name/id]\n Use moon name or ID\n\n"; SelectableLevel[] levels2 = StartOfRound.Instance.levels; foreach (SelectableLevel val5 in levels2) { text3 += $"{val5.levelID}:{((Object)val5).name}\n"; } Respond(text3); } else { int result = -42; try { int.TryParse(arguments[0], out result); } catch { result = -42; } SelectableLevel[] levels3 = StartOfRound.Instance.levels; foreach (SelectableLevel val6 in levels3) { if (!((Object)(object)val6 != (Object)null) || !(((Object)val6).name.ToUpper() != arguments[0].ToUpper()) || val6.levelID == result) { Respond("All moon info about " + ((Object)val6).name + " has been dumped into the console."); string text4 = "\n\n--------------------------------------------------------------------------------------"; text4 = text4 + "\nName: " + ((Object)val6).name; text4 = text4 + "\nScene Name: " + val6.sceneName; text4 += $"\nLevel ID: {val6.levelID}"; text4 += $"\nLocked For Demo: {val6.lockedForDemo}"; text4 += $"\nSpawn Enemies And Scrap: {val6.spawnEnemiesAndScrap}"; text4 = text4 + "\nPlanet Name: " + val6.PlanetName; text4 = text4 + "\nLevel Description: " + val6.LevelDescription; text4 = text4 + "\nRisk Level: " + val6.riskLevel; text4 += $"\nTime To Arrive: {val6.timeToArrive}"; text4 += $"\nOffset From Global Time: {val6.OffsetFromGlobalTime}"; text4 += $"\nDay Speed Multiplier: {val6.DaySpeedMultiplier}"; text4 += $"\nPlanet Has Time: {val6.planetHasTime}"; if (val6.randomWeathers != null) { text4 += "\nRandom Weather With Variables:"; RandomWeatherWithVariables[] randomWeathers = val6.randomWeathers; foreach (RandomWeatherWithVariables val7 in randomWeathers) { text4 += $"\n WeatherType:{val7.weatherType}:\n WeatherVariable: {val7.weatherVariable}\n WeatherVariable2: {val7.weatherVariable2}"; } } text4 += $"\nOverride Weather: {val6.overrideWeather}"; text4 += $"\nOverride Weather Type: {val6.overrideWeatherType}"; text4 += $"\nCurrent Weather: {val6.currentWeather}"; text4 += $"\nFactory Size Multiplier: {val6.factorySizeMultiplier}"; if (val6.dungeonFlowTypes != null) { text4 += "\nDungeon Flow Types:"; IntWithRarity[] dungeonFlowTypes = val6.dungeonFlowTypes; foreach (IntWithRarity val8 in dungeonFlowTypes) { text4 += $"\n ID:{val8.id}, Rarity:{val8.rarity}"; } } if (val6.spawnableMapObjects != null) { text4 += "\nSpawnable Map Objects:"; SpawnableMapObject[] spawnableMapObjects2 = val6.spawnableMapObjects; foreach (SpawnableMapObject val9 in spawnableMapObjects2) { text4 += $"\n Prefab Name: {((Object)val9.prefabToSpawn).name}\n Spawn Facing Away From Wall: {val9.spawnFacingAwayFromWall}, \n Spawn Facing Wall: {val9.spawnFacingWall}\n Spawn With Back To Wall: {val9.spawnWithBackToWall}\n Spawn With Back Flush Against Wall: {val9.spawnWithBackFlushAgainstWall}\n Require Distance Between Spawns: {val9.requireDistanceBetweenSpawns}\n Disallow Spawning Near Entrances: {val9.disallowSpawningNearEntrances}"; if (val9.numberToSpawn != null) { text4 += "\n Number To Spawn:"; Keyframe[] keys = val9.numberToSpawn.keys; for (int num8 = 0; num8 < keys.Length; num8++) { Keyframe val10 = keys[num8]; text4 += $"\n Time: {((Keyframe)(ref val10)).time}, Value: {((Keyframe)(ref val10)).value}"; } } } } if (val6.spawnableOutsideObjects != null) { text4 += "\nSpawnable Outside Objects:"; SpawnableOutsideObjectWithRarity[] spawnableOutsideObjects2 = val6.spawnableOutsideObjects; foreach (SpawnableOutsideObjectWithRarity val11 in spawnableOutsideObjects2) { SpawnableOutsideObject spawnableObject = val11.spawnableObject; text4 += $"\n Prefab Name: {((Object)spawnableObject.prefabToSpawn).name}\n Spawn Facing Away from Wall: {spawnableObject.spawnFacingAwayFromWall}\n Object Width: {spawnableObject.objectWidth}"; if (spawnableObject.spawnableFloorTags != null) { text4 = text4 + "\n Spawnable Floor Tags: " + Helper.StringsToList(spawnableObject.spawnableFloorTags.ToList(), ","); } if (val11.randomAmount != null) { text4 += "\n Random Amount:"; Keyframe[] keys2 = val11.randomAmount.keys; for (int num10 = 0; num10 < keys2.Length; num10++) { Keyframe val12 = keys2[num10]; text4 += $"\n Time: {((Keyframe)(ref val12)).time}, Value: {((Keyframe)(ref val12)).value}"; } } } } if (val6.spawnableScrap != null) { text4 += "\nSpawnable Scrap:"; foreach (SpawnableItemWithRarity item2 in val6.spawnableScrap) { if (item2 != null && !((Object)(object)item2.spawnableItem == (Object)null)) { text4 += $"\n Name: {((Object)item2.spawnableItem).name}, Rarity: {item2.rarity}"; } } } text4 += $"\nMin Scrap: {val6.minScrap}"; text4 += $"\nMax Scrap: {val6.maxScrap}"; text4 += $"\nMin Total Scrap Value: {val6.minTotalScrapValue}"; text4 += $"\nMax Total Scrap Value: {val6.maxTotalScrapValue}"; text4 += $"\nMax Enemy Power Count: {val6.maxEnemyPowerCount}"; text4 += $"\nMax Outside Enemy Power Count: {val6.maxOutsideEnemyPowerCount}"; text4 += $"\nMax Daytime Enemy Power Count: {val6.maxDaytimeEnemyPowerCount}"; if (val6.Enemies != null) { text4 += "\nEnemies:"; foreach (SpawnableEnemyWithRarity enemy in val6.Enemies) { if (enemy != null && !((Object)(object)enemy.enemyType == (Object)null)) { text4 += $"\n Enemy: {((Object)enemy.enemyType).name}, Rarity: {enemy.rarity}"; } } } if (val6.OutsideEnemies != null) { text4 += "\nOutside Enemies:"; foreach (SpawnableEnemyWithRarity outsideEnemy in val6.OutsideEnemies) { if (outsideEnemy != null && !((Object)(object)outsideEnemy.enemyType == (Object)null)) { text4 += $"\n Enemy: {((Object)outsideEnemy.enemyType).name}, Rarity: {outsideEnemy.rarity}"; } } } if (val6.DaytimeEnemies != null) { text4 += "\nDaytime Enemies:"; foreach (SpawnableEnemyWithRarity daytimeEnemy in val6.DaytimeEnemies) { if (daytimeEnemy != null && !((Object)(object)daytimeEnemy.enemyType == (Object)null)) { text4 += $"\n Enemy: {((Object)daytimeEnemy.enemyType).name}, Rarity: {daytimeEnemy.rarity}"; } } } text4 += "\nEnemy Spawn Chance Throughout Day:"; if (val6.enemySpawnChanceThroughoutDay != null) { Keyframe[] keys3 = val6.enemySpawnChanceThroughoutDay.keys; for (int num11 = 0; num11 < keys3.Length; num11++) { Keyframe val13 = keys3[num11]; text4 += $"\n Time: {((Keyframe)(ref val13)).time}, Value: {((Keyframe)(ref val13)).value}"; } } text4 += "\nOutside Enemy Spawn Chance Throughout Day:"; if (val6.outsideEnemySpawnChanceThroughDay != null) { Keyframe[] keys4 = val6.outsideEnemySpawnChanceThroughDay.keys; for (int num12 = 0; num12 < keys4.Length; num12++) { Keyframe val14 = keys4[num12]; text4 += $"\n Time: {((Keyframe)(ref val14)).time}, Value: {((Keyframe)(ref val14)).value}"; } } text4 += "\nDaytime Enemy Spawn Chance Throughout Day:"; if (val6.daytimeEnemySpawnChanceThroughDay != null) { Keyframe[] keys5 = val6.daytimeEnemySpawnChanceThroughDay.keys; for (int num13 = 0; num13 < keys5.Length; num13++) { Keyframe val15 = keys5[num13]; text4 += $"\n Time: {((Keyframe)(ref val15)).time}, Value: {((Keyframe)(ref val15)).value}"; } } text4 += $"\nSpawn Probability Range: {val6.spawnProbabilityRange}"; text4 += $"\nDaytime Enemies Probability Range: {val6.daytimeEnemiesProbabilityRange}"; text4 += $"\nLevel Includes Snow Footprints: {val6.levelIncludesSnowFootprints}"; text4 = text4 + "\nLevel Icon String: " + val6.levelIconString; text4 += "\n--------------------------------------------------------------------------------------\n"; Console.WriteLine(text4); break; } } } } }, new MCommand { command = "MSCAN", shortinfo = "Provides a scan of all the items that are not on ship", info = "MSCAN [Command]\n Command - Provides an accurate scan on all items not on ship.", execute = delegate(string[] arguments) { if (arguments.Length >= 0) { string text2 = ""; int num2 = 0; int num3 = 0; GrabbableObject[] array = Object.FindObjectsOfType(); GrabbableObject[] array2 = array; foreach (GrabbableObject val4 in array2) { if ((Object)(object)val4 != (Object)null && val4.itemProperties.isScrap && !val4.isInElevator && !val4.isInShipRoom) { num2++; num3 += val4.scrapValue; } } text2 += $"There are {num2} items outside the ship, totaling a total of {num3} altogether."; Respond(text2); } } }, new MCommand { command = "MHAZARDS", tag = "SERVER", shortinfo = "Displays all HAZARDS.", info = "MHAZARDS\n Will display the names of every Hazard grabbed by this mod.", execute = delegate { int num = 0; string text = ""; SelectableLevel[] levels = StartOfRound.Instance.levels; foreach (SelectableLevel val in levels) { SpawnableMapObject[] spawnableMapObjects = val.spawnableMapObjects; foreach (SpawnableMapObject val2 in spawnableMapObjects) { num++; text = ((num % 2 != 0) ? (text + ((Object)val2.prefabToSpawn).name.PadRight(23)) : (text + " " + ((Object)val2.prefabToSpawn).name + "\n")); } text += "\n"; SpawnableOutsideObjectWithRarity[] spawnableOutsideObjects = val.spawnableOutsideObjects; foreach (SpawnableOutsideObjectWithRarity val3 in spawnableOutsideObjects) { num++; text = ((num % 2 != 0) ? (text + ((Object)val3.spawnableObject.prefabToSpawn).name.PadRight(23)) : (text + " " + ((Object)val3.spawnableObject.prefabToSpawn).name + "\n")); } } Respond(text); } } }; public static string ScaleTypePadded(MEvent.ScaleType type) { return $"[{type}]:".PadRight(23); } public static void Respond(string text, bool clearPreviousText = true) { Log.LogInfo(text); response = text; _clearPreviousText = clearPreviousText; } [HarmonyPostfix] [HarmonyPatch(typeof(Terminal), "ParsePlayerSentence")] private static void OnParsePlayerSentence(ref Terminal __instance, ref TerminalNode __result) { if ((Object)(object)__instance == (Object)null || (Object)(object)__instance.screenText == (Object)null) { Log.LogError("Instance is null."); return; } try { string text = __instance.screenText.text; int textAdded = __instance.textAdded; int length = text.Length; int num = length - textAdded; string[] array = text.Substring(num, length - num).Split(" "); if (array.Length == 0) { return; } string text2 = array[0].ToUpper(); string[] array2 = ((array.Length > 1) ? array[1..] : Array.Empty()); if (Configuration.ExtraLogging.Value) { Log.LogDebug("MCommand Detected: " + text2 + " with arguments: " + string.Join(", ", array2)); } if (Configuration.handleScanCommand.Value && text2.ToLower() == "scan") { text2 = "mscan"; } foreach (MCommand mCommand in mCommands) { Log.LogDebug("Checking command: " + mCommand.command); if (string.Equals(mCommand.command, text2, StringComparison.OrdinalIgnoreCase)) { Log.LogDebug("Command " + mCommand.command + " matched a valid mCommand."); if (!NetworkManager.Singleton.IsServer && string.Equals(mCommand.tag, "server", StringComparison.OrdinalIgnoreCase)) { Log.LogDebug("Command " + mCommand.command + " is a server-only command. Ignoring execution."); return; } try { mCommand.execute(array2); } catch (Exception arg) { Log.LogError($"An error occurred while executing command {mCommand.command}: {arg}"); Respond("An error occurred trying to process the command."); } Log.LogDebug("Response: " + response); } } if (!Utility.IsNullOrWhiteSpace(response)) { __result = ScriptableObject.CreateInstance(); __result.displayText = response + "\n\n"; __result.clearPreviousText = _clearPreviousText; response = ""; } } catch (Exception arg2) { Log.LogError($"An error occurred while tryingt to process an mcommand {arg2}"); Respond("An error occurred trying to process the command."); } } } [HarmonyPatch(typeof(WalkieTalkie))] internal class WalkieTalkiePatches { [HarmonyPrefix] [HarmonyPatch("ItemActivate")] private static bool InterruptItemActivate(WalkieTalkie __instance) { if (WalkieFailure.Instance.Active) { __instance.thisAudio.PlayOneShot(__instance.playerDieOnWalkieTalkieSFX); ((GrabbableObject)__instance).UseUpBatteries(); return false; } return true; } } internal class _EnemyAI { [CompilerGenerated] private sealed class d__4 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public EnemyAI __instance; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__4(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>2__current = (object)new WaitUntil((Func)(() => Net.Instance.receivedSyncedValues)); <>1__state = 1; return true; case 1: <>1__state = -1; __instance.enemyHP = (int)Mathf.Clamp((float)(__instance.enemyHP + Manager.bonusEnemyHp), 1.1f, 100000000f); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } [HarmonyPostfix] [HarmonyPatch("MeetsStandardPlayerCollisionConditions")] private static void OnMeetsStandardPlayerCollisionConditions(ref PlayerControllerB __result, ref Collider other, ref EnemyType ___enemyType, ref bool ___isEnemyDead, ref bool inKillAnimation, ref float ___stunNormalizedTimer) { PlayerControllerB component = ((Component)other).gameObject.GetComponent(); if ((Object)(object)component != (Object)null && !___isEnemyDead && ___stunNormalizedTimer < 0f && !inKillAnimation && (Object)(object)__result == (Object)null && component.actualClientId == GameNetworkManager.Instance.localPlayerController.actualClientId) { __result = component; } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void PatchEnemyStart(Harmony harmony) { ApplyEnemyStart(harmony); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] [HarmonyPostfix] public static void ApplyEnemyStart(Harmony harmony) { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Expected O, but got Unknown MethodInfo methodInfo = AccessTools.Method(typeof(EnemyAI), "Start", (Type[])null, (Type[])null); MethodInfo methodInfo2 = AccessTools.Method(typeof(_EnemyAI), "OnStart", (Type[])null, (Type[])null); if (methodInfo != null && methodInfo2 != null) { harmony.Patch((MethodBase)methodInfo, new HarmonyMethod(methodInfo2), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); Log.LogInfo("Successfully patched EnemyAI"); } else { Log.LogError("Failed to locate methods for conditional patching."); } } public static void OnStart(ref EnemyAI __instance) { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) ((MonoBehaviour)__instance).StartCoroutine(UpdateHP(__instance)); try { GameObject terrainObject = Manager.terrainObject; float num = -100f; if ((Object)(object)terrainObject != (Object)null) { num = terrainObject.transform.position.y - 100f; } if (((Component)__instance).transform.position.y > num) { __instance.isOutside = true; __instance.allAINodes = GameObject.FindGameObjectsWithTag("OutsideAINode"); if ((Object)(object)GameNetworkManager.Instance.localPlayerController != (Object)null) { __instance.EnableEnemyMesh(!StartOfRound.Instance.hangarDoorsClosed || !GameNetworkManager.Instance.localPlayerController.isInHangarShipRoom, false, false); } __instance.SyncPositionToClients(); } else { __instance.isOutside = false; __instance.allAINodes = GameObject.FindGameObjectsWithTag("AINode"); __instance.SyncPositionToClients(); } } catch { Log.LogError("Failed to set isOutside on EnemyAI.Start"); } } [IteratorStateMachine(typeof(d__4))] private static IEnumerator UpdateHP(EnemyAI __instance) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__4(0) { __instance = __instance }; } } } namespace BrutalCompanyMinus.Minus.Handlers.Modded { public class CustomWeather { [MethodImpl(MethodImplOptions.NoInlining)] public static void SetCustomWeather(string WeatherName) { if (!Compatibility.WeatherRegistryPresent) { return; } try { Weather val = null; foreach (Weather weather in WeatherManager.Weathers) { if (string.Equals(weather.Name, WeatherName, StringComparison.OrdinalIgnoreCase)) { val = weather; break; } } if (val == null) { Log.LogError("Weather '" + WeatherName + "' not found."); } else { WeatherManager.CurrentWeathers.SetWeather(StartOfRound.Instance.currentLevel, val); } } catch (Exception ex) { Log.LogError("Error setting '" + WeatherName + "' weather: " + ex.Message); } } [MethodImpl(MethodImplOptions.NoInlining)] public static bool isWeatherPresent(string WeatherName) { if (!Compatibility.WeatherRegistryPresent) { return false; } try { foreach (Weather weather in WeatherManager.Weathers) { if (string.Equals(weather.Name, WeatherName, StringComparison.OrdinalIgnoreCase)) { return true; } } return false; } catch (Exception ex) { Log.LogError("Error checking for '" + WeatherName + "' weather: " + ex.Message); return false; } } [MethodImpl(MethodImplOptions.NoInlining)] public static void AddCustomWeather(string WeatherName) { if (!Compatibility.WeatherRegistryPresent) { return; } try { Weather val = null; foreach (Weather weather in WeatherManager.Weathers) { if (string.Equals(weather.Name, WeatherName, StringComparison.OrdinalIgnoreCase)) { val = weather; break; } } if (val == null) { Log.LogError("Weather '" + WeatherName + "' not found."); } else { WeatherController.AddWeatherEffect(val); } } catch (Exception ex) { Log.LogError("Error adding '" + WeatherName + "' weather: " + ex.Message); } } [MethodImpl(MethodImplOptions.NoInlining)] public static void RegisterWeathers() { if (Compatibility.CombinedWeatherToolKitPresent) { } } [MethodImpl(MethodImplOptions.NoInlining)] public static string GetCustomWeather() { if (!Compatibility.WeatherRegistryPresent) { return ""; } try { Weather currentWeather = WeatherManager.GetCurrentWeather(StartOfRound.Instance.currentLevel); return (currentWeather != null) ? ((object)currentWeather).ToString() : ""; } catch { return ""; } } } internal class HotBarPlusCompat { private static int _overrideSlots; private static int _defaultHotbarSize => SyncManager.hotbarSize + SyncManager.purchasedHotbarSlots; private static int _currentHotbarSize => SyncManager.currentHotbarSize; [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void PatchAll(Harmony harmony) { ApplyCurrentHotbarSizePatch(harmony); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void ResizeHotbarRandomly() { if (_overrideSlots <= 0) { int size = ((_defaultHotbarSize >= 20) ? _defaultHotbarSize : Random.Range(_defaultHotbarSize, 20)); Log.LogInfo("[HotBarMania] New big hotbar size: " + size); OverrideHotbarSlots(size); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void ResizeHotbarRandomlySmall() { if (_overrideSlots <= 0) { int size = Random.Range(1, _defaultHotbarSize); Log.LogInfo("[HotBarMania] New small hotbar size: " + size); OverrideHotbarSlots(size); } } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void OverrideHotbarSlots(int size) { if (size <= 0) { if (_defaultHotbarSize < _currentHotbarSize) { DropExtraItems(_defaultHotbarSize); } } else if (size < _currentHotbarSize) { DropExtraItems(size); } _overrideSlots = Mathf.Max(size, 0); SyncManager.OnUpdateHotbarSize(); } private static void DropExtraItems(int newSize) { //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if ((Object)(object)localPlayerController == (Object)null) { return; } int num = localPlayerController.ItemSlots.Length; if (newSize >= num) { return; } for (int num2 = num - 1; num2 >= newSize; num2--) { if (num2 > localPlayerController.ItemSlots.Length - 1) { Log.LogWarning($"DropExtraItems(); Index {num2} is out of range. Slots: {num}"); } else if ((Object)(object)localPlayerController.ItemSlots[num2] != (Object)null) { localPlayerController.SwitchToItemSlot(num2, (GrabbableObject)null); localPlayerController.DiscardHeldObject(false, (NetworkObject)null, default(Vector3), true); } } } public static void ResetHotbar() { OverrideHotbarSlots(0); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void ApplyCurrentHotbarSizePatch(Harmony harmony) { //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0056: Expected O, but got Unknown MethodInfo methodInfo = AccessTools.PropertyGetter(typeof(SyncManager), "currentHotbarSize"); MethodInfo methodInfo2 = AccessTools.Method(typeof(HotBarPlusCompat), "CurrentHotbarSizePatch", (Type[])null, (Type[])null); if (methodInfo != null && methodInfo2 != null) { harmony.Patch((MethodBase)methodInfo, new HarmonyMethod(methodInfo2), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); Log.LogInfo("Successfully patched SyncManager.currentHotbarSize."); } else { Log.LogError("Failed to locate methods for conditional patching."); } } private static bool CurrentHotbarSizePatch(ref short __result) { if (_overrideSlots <= 0) { return true; } __result = (short)_overrideSlots; return false; } } public class PhonesOutPatches : NetworkBehaviour { public static PhonesOutPatches instance; public void Awake() { if ((Object)(object)instance != (Object)null) { DestroyPhonesOut(); } instance = this; Net.Instance.SetPhonesOutServerRpc(active: true); } public static void DestroyPhonesOut() { PhonesOut.Active = false; GameObject val = GameObject.Find("PhonesOutFailureObject"); if ((Object)(object)val != (Object)null) { Object.Destroy((Object)(object)val); } } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "ShipLeave")] public static void OnShipLeave() { DestroyPhonesOut(); } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "EndGameServerRpc")] public static void DestroyPhonesOutForGodsSake() { DestroyPhonesOut(); } protected override void __initializeVariables() { ((NetworkBehaviour)this).__initializeVariables(); } protected override void __initializeRpcs() { ((NetworkBehaviour)this).__initializeRpcs(); } protected internal override string __getTypeName() { return "PhonesOutPatches"; } } internal class PhonesOutPatching { [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void PatchAllPhone(Harmony harmony) { ApplyInterruptPhoneUsage(harmony); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] [HarmonyPrefix] public static void ApplyInterruptPhoneUsage(Harmony harmony) { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Expected O, but got Unknown MethodInfo methodInfo = AccessTools.Method(typeof(PlayerPhone), "ToggleActive", (Type[])null, (Type[])null); MethodInfo methodInfo2 = AccessTools.Method(typeof(PhonesOutPatching), "InterruptPhoneUsage", (Type[])null, (Type[])null); if (methodInfo != null && methodInfo2 != null) { harmony.Patch((MethodBase)methodInfo, new HarmonyMethod(methodInfo2), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); Log.LogInfo("Successfully patched PlayerPhone.ToggleActive."); } else { Log.LogError("Failed to locate methods for conditional patching."); } } public static bool InterruptPhoneUsage(bool active) { if (PhonesOut.Active) { ((TMP_Text)HUDManager.Instance.globalNotificationText).text = "BAD PHONE RECEPTION!!!!"; HUDManager.Instance.globalNotificationAnimator.SetTrigger("TriggerNotif"); HUDManager.Instance.UIAudio.PlayOneShot(HUDManager.Instance.radiationWarningAudio, 1f); return false; } return true; } } internal class ScanVanPatching { [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void PatchAllCruiserXL(Harmony harmony) { ApplyCruiserXLBlock(harmony); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] [HarmonyPrefix] public static void ApplyCruiserXLBlock(Harmony harmony) { //IL_004a: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Expected O, but got Unknown MethodInfo methodInfo = AccessTools.Method(typeof(CruiserXLController), "StartTryCarIgnition", (Type[])null, (Type[])null); MethodInfo methodInfo2 = AccessTools.Method(typeof(ScanVanPatching), "InterruptCruiserXL", (Type[])null, (Type[])null); if (methodInfo != null && methodInfo2 != null) { harmony.Patch((MethodBase)methodInfo, new HarmonyMethod(methodInfo2), (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null, (HarmonyMethod)null); Log.LogInfo("Successfully patched Scanvan"); } else { Log.LogError("Failed to locate methods for conditional patching."); } } public static bool InterruptCruiserXL() { if (CruiserFailure.Active) { switch (Random.Range(0, 3)) { case 0: ((TMP_Text)HUDManager.Instance.globalNotificationText).text = "This is more complicated than the Cruiser!"; break; case 1: ((TMP_Text)HUDManager.Instance.globalNotificationText).text = "It wont work"; break; case 2: ((TMP_Text)HUDManager.Instance.globalNotificationText).text = "Did you pass the drivers test first?"; break; default: ((TMP_Text)HUDManager.Instance.globalNotificationText).text = "Did you know that this vehicle doesn't work?"; break; } HUDManager.Instance.globalNotificationAnimator.SetTrigger("TriggerNotif"); HUDManager.Instance.UIAudio.PlayOneShot(HUDManager.Instance.radiationWarningAudio, 1f); return false; } return true; } } internal class SelfSortingStorageCompat { public static int GetSelfSortingStorageScrapValue() { try { int num = 0; foreach (List item in SmartMemory.Instance.ItemList) { foreach (Data item2 in item) { if (!item2.IsValid() || item2.Values.Count <= 0) { continue; } foreach (int value in item2.Values) { if (Configuration.ExtraLogging.Value) { Log.LogInfo($"Found SelfSortingStorage Item with total scrap value: {value}"); } num += value; } } } int num2 = sssFixCountFunc(); return num - num2; } catch (Exception) { Console.WriteLine("SelfSortingStorage types not found."); return 0; } } private static int sssFixCountFunc() { //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0047: Expected O, but got Unknown //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Expected O, but got Unknown //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Expected O, but got Unknown int num = 0; GameObject val = GameObject.Find("SSS_Module(Clone)"); if ((Object)(object)val != (Object)null) { Log.LogInfo("sssBox Found"); foreach (Transform item in val.transform) { Transform val2 = item; Log.LogInfo("Shelf Spot Found: " + ((Object)val2).name); Transform child = val2.GetChild(0); Log.LogInfo("Item Found: " + ((Object)child).name); if (child.childCount <= 0) { continue; } foreach (Transform item2 in child) { Transform val3 = item2; if (((Object)val3).name.ToLower().StartsWith("scannode")) { ScanNodeProperties val4 = (ScanNodeProperties)((Component)val3).GetComponent("ScanNodeProperties"); if ((Object)(object)val4 != (Object)null) { num += val4.scrapValue; } } } } } return num; } } internal class ShipInventoryCompat { public static int GetShipInventoryScrapValue() { //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) try { int num = 0; ItemData[] items = Inventory.Items; for (int i = 0; i < items.Length; i++) { ItemData val = items[i]; Item item = ((ItemData)(ref val)).GetItem(); if ((Object)(object)item != (Object)null && item.isScrap) { num += val.SCRAP_VALUE; } } return num; } catch (Exception) { Console.WriteLine("ShipInventory types not found."); return 0; } } } internal class ToilHeadHandler { [CompilerGenerated] private sealed class d__2 : IEnumerator, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public object toilheadTurretobj; private Type 5__1; private MethodInfo 5__2; object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__2(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { 5__1 = null; 5__2 = null; <>1__state = -2; } private bool MoveNext() { //IL_0096: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = Type.GetType("com.github.zehsteam.ToilHead.MonoBehaviours.ToilHeadTurretBehaviour"); if (5__1 == null) { return false; } 5__2 = 5__1.GetMethod("ToggleTurretEnabled", BindingFlags.Instance | BindingFlags.Public); if (5__2 == null) { return false; } 5__2.Invoke(toilheadTurretobj, new object[1] { false }); <>2__current = (object)new WaitForSeconds(7f); <>1__state = 1; return true; case 1: <>1__state = -1; 5__2.Invoke(toilheadTurretobj, new object[1] { true }); return false; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } } private static bool isToilHeadPresent() { return Chainloader.PluginInfos.ContainsKey("com.github.zehsteam.ToilHead"); } public static void AttemptToDisableToilHeadTurrets(ref Random rng) { Type type = Type.GetType("com.github.zehsteam.ToilHead.MonoBehaviours.ToilHeadTurretBehaviour, ToilHead"); if (type == null) { return; } Object[] array = Object.FindObjectsOfType(type); Object[] array2 = array; foreach (Object toilheadTurretobj in array2) { if (Convert.ToBoolean(rng.Next(2))) { ((MonoBehaviour)RoundManager.Instance).StartCoroutine(DisableToilHeadTurret(toilheadTurretobj)); } } } [IteratorStateMachine(typeof(d__2))] public static IEnumerator DisableToilHeadTurret(object toilheadTurretobj) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__2(0) { toilheadTurretobj = toilheadTurretobj }; } public static void AttemptToRageToilHeadTurrets(ref Random rng) { Type type = Type.GetType("com.github.zehsteam.ToilHead.MonoBehaviours.ToilHeadTurretBehaviour, ToilHead"); if (type == null) { return; } Object[] array = Object.FindObjectsOfType(type); Object[] array2 = array; foreach (Object val in array2) { if (rng.NextDouble() <= (double)FacilityGhost.rageTurretsChance) { dynamic val2 = val; dynamic val3 = val2.turretMode == (TurretMode)3 || val2.turretMode == (TurretMode)2; if (!(val3 ? true : false) && !((val3 | !val2.turretActive) ? true : false)) { val2.turretMode = (TurretMode)3; val2.EnterBerserkModeServerRpc(); } } } } } } namespace BrutalCompanyMinus.Minus.Handlers.Enemies { [HarmonyPatch(typeof(RedLocustBees))] internal static class RedLocustBeesPatcher { [CompilerGenerated] private sealed class d__0 : IEnumerable, IEnumerable, IEnumerator, IEnumerator, IDisposable { private int <>1__state; private CodeInstruction <>2__current; private int <>l__initialThreadId; private IEnumerable instructions; public IEnumerable <>3__instructions; private FieldInfo 5__1; private MethodInfo 5__2; private bool 5__3; private IEnumerator <>s__4; private CodeInstruction 5__5; CodeInstruction IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public d__0(int <>1__state) { this.<>1__state = <>1__state; <>l__initialThreadId = Environment.CurrentManagedThreadId; } [DebuggerHidden] void IDisposable.Dispose() { int num = <>1__state; if (num == -3 || (uint)(num - 1) <= 6u) { try { } finally { <>m__Finally1(); } } 5__1 = null; 5__2 = null; <>s__4 = null; 5__5 = null; <>1__state = -2; } private bool MoveNext() { //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0137: Expected O, but got Unknown //IL_0159: Unknown result type (might be due to invalid IL or missing references) //IL_0163: Expected O, but got Unknown //IL_0180: Unknown result type (might be due to invalid IL or missing references) //IL_018a: Expected O, but got Unknown //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Expected O, but got Unknown //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01e2: Expected O, but got Unknown //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_0110: Expected O, but got Unknown try { switch (<>1__state) { default: return false; case 0: <>1__state = -1; 5__1 = typeof(Manager).GetField("scrapValueMultiplier", BindingFlags.Static | BindingFlags.NonPublic); 5__2 = typeof(Mathf).GetMethod("RoundToInt"); 5__3 = false; <>s__4 = instructions.GetEnumerator(); <>1__state = -3; goto IL_021d; case 1: <>1__state = -3; <>2__current = new CodeInstruction(OpCodes.Conv_R4, (object)null); <>1__state = 2; return true; case 2: <>1__state = -3; <>2__current = new CodeInstruction(OpCodes.Ldsfld, (object)5__1); <>1__state = 3; return true; case 3: <>1__state = -3; <>2__current = new CodeInstruction(OpCodes.Mul, (object)null); <>1__state = 4; return true; case 4: <>1__state = -3; <>2__current = new CodeInstruction(OpCodes.Call, (object)5__2); <>1__state = 5; return true; case 5: <>1__state = -3; <>2__current = new CodeInstruction(OpCodes.Starg, (object)2); <>1__state = 6; return true; case 6: <>1__state = -3; goto IL_01f6; case 7: { <>1__state = -3; 5__5 = null; goto IL_021d; } IL_021d: if (<>s__4.MoveNext()) { 5__5 = <>s__4.Current; if (CodeInstructionExtensions.IsLdarg(5__5, (int?)2) && !5__3) { 5__3 = true; <>2__current = new CodeInstruction(OpCodes.Ldarg_2, (object)null); <>1__state = 1; return true; } goto IL_01f6; } <>m__Finally1(); <>s__4 = null; return false; IL_01f6: <>2__current = 5__5; <>1__state = 7; return true; } } catch { //try-fault ((IDisposable)this).Dispose(); throw; } } bool IEnumerator.MoveNext() { //ILSpy generated this explicit interface implementation from .override directive in MoveNext return this.MoveNext(); } private void <>m__Finally1() { <>1__state = -1; if (<>s__4 != null) { <>s__4.Dispose(); } } [DebuggerHidden] void IEnumerator.Reset() { throw new NotSupportedException(); } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { d__0 d__; if (<>1__state == -2 && <>l__initialThreadId == Environment.CurrentManagedThreadId) { <>1__state = 0; d__ = this; } else { d__ = new d__0(0); } d__.instructions = <>3__instructions; return d__; } [DebuggerHidden] IEnumerator IEnumerable.GetEnumerator() { return ((IEnumerable)this).GetEnumerator(); } } [IteratorStateMachine(typeof(d__0))] [HarmonyTranspiler] [HarmonyPatch("SpawnHiveClientRpc")] internal static IEnumerable IncreaseHiveScrapValue(IEnumerable instructions) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new d__0(-2) { <>3__instructions = instructions }; } } } namespace BrutalCompanyMinus.Minus.Handlers.CustomEvents { internal abstract class BaseHazardData { public string PrefabName { get; set; } public BaseHazardData(string prefabName) { PrefabName = prefabName; } } internal class EventTypeConverter : StringEnumConverter { public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer) { writer.WriteValue(value.ToString()); } public override object ReadJson(JsonReader reader, Type objectType, object? existingValue, JsonSerializer serializer) { //IL_0043: Unknown result type (might be due to invalid IL or missing references) string text = reader.Value?.ToString(); if (string.IsNullOrEmpty(text)) { return null; } if (Enum.TryParse(objectType, text, ignoreCase: true, out object result)) { return result; } throw new JsonSerializationException("Invalid EventType value: " + text); } } public class HazardConverter : JsonConverter { public override bool CanConvert(Type objectType) { return typeof(List).IsAssignableFrom(objectType); } public override object ReadJson(JsonReader reader, Type objectType, object? existingValue, JsonSerializer serializer) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Invalid comparison between Unknown and I4 //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e4: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Invalid comparison between Unknown and I4 //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00b8: Invalid comparison between Unknown and I4 //IL_0091: Unknown result type (might be due to invalid IL or missing references) if ((int)reader.TokenType == 2) { List list = new List(); while (reader.Read()) { if ((int)reader.TokenType == 1) { JObject val = JObject.Load(reader); string text = ((object)val["Type"]).ToString(); BaseHazardData baseHazardData = null; string text2 = text; string text3 = text2; if (!(text3 == "Inside")) { if (!(text3 == "Outside")) { throw new JsonSerializationException("Unknown hazard type: " + text); } baseHazardData = ((JToken)val).ToObject(); } else { baseHazardData = ((JToken)val).ToObject(); } if (baseHazardData != null) { list.Add(baseHazardData); } } else if ((int)reader.TokenType == 14) { break; } } return list; } JsonToken tokenType = reader.TokenType; throw new JsonSerializationException("Expected StartArray for Hazards, but got: " + ((object)(JsonToken)(ref tokenType)).ToString()); } public override void WriteJson(JsonWriter writer, object? value, JsonSerializer serializer) { throw new NotImplementedException(); } } internal class CustomEventHandling { public class EventData { public string Name; public MEvent.EventType Type; public int Weight; public string Color; public List Descriptions; public bool Enabled; public List? AddEventIfOnly; public ItemEventData? Items; public List? Enemies; public string? Weather; [JsonConverter(typeof(HazardConverter))] public List? Hazards; public List? EventsToRemove; public List? EventsToSpawnWith; public List? MoonBlacklist; public bool isSpecialEvent; public bool isBetaEvent; public bool showTip; public List? TipMessages; public List? TipTitle; public bool isWarning; public List? MoonWhitelist; public bool MoonMode; public List? Aliases; } public class ItemEventData { public float[] TransmuteAmount; public float[] ScrapAmount; public float[] ScrapValue; public List Items; } public struct ItemData { public string Name; public int Rarity; } public struct EnemyData { public string Name; public float[] InsideRarity; public float[] OutsideRarity; public float[] MinInside; public float[] MaxInside; public float[] MinOutside; public float[] MaxOutside; } public static EventData? ReadFile(string path) { //IL_001d: Expected O, but got Unknown string text = File.ReadAllText(path); CustomEventSerializer customEventSerializer = new CustomEventSerializer(); List list = null; try { list = JsonConvert.DeserializeObject>(text, (JsonSerializerSettings)(object)customEventSerializer); } catch (JsonReaderException val) { JsonReaderException val2 = val; Log.LogError("An error occurred while parsing event file: " + path + " Message: " + ((Exception)(object)val2).Message); return null; } if (list != null) { if (list.Count > 0) { Log.LogInfo("Adding custom event " + list[0].Name); return list[0]; } Log.LogInfo("File was read, but no events were found"); } else { Log.LogInfo("No data was read from the file"); } return null; } public static MEvent.Scale ArrayToScale(float[] array) { if (array.Length == 4) { return new MEvent.Scale(array[0], array[1], array[2], array[3]); } throw new ArgumentException($"ArrayToScale expected length of 4, got {array.Length}"); } public static MEvent.Scale ArrayToScale(int[] array) { if (array.Length == 4) { return new MEvent.Scale(array[0], array[1], array[2], array[3]); } throw new ArgumentException($"ArrayToScale expected length of 4, got {array.Length}"); } } internal class CustomEventSerializer : JsonSerializerSettings { public CustomEventSerializer() { ((JsonSerializerSettings)this).NullValueHandling = (NullValueHandling)1; ((JsonSerializerSettings)this).Converters.Add((JsonConverter)(object)new EventTypeConverter()); ((JsonSerializerSettings)this).Converters.Add((JsonConverter)(object)new HazardConverter()); } } public class DawnLibHandling { public struct DawnSnapshot { public object OutsideWeights; public object InsideWeights; public bool FacingAway; public bool FacingWall; public bool BackToWall; public bool BackFlush; public bool ReqDist; public bool DisallowNear; } public static Queue eventQueue = new Queue(); public static Dictionary originalStates = new Dictionary(); [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static bool ProcessHazardEvents() { bool flag = false; foreach (MEvent currentEvent in EventManager.currentEvents) { Log.LogInfo("Event name: " + currentEvent.GetType().Name); if (!(currentEvent is GeneralCustomEvent generalCustomEvent)) { continue; } Log.LogInfo("Event " + generalCustomEvent.Name() + " is a GeneralCustomEvent, checking hazard events..."); foreach (GeneralCustomEvent.HazardEvent hazardEvent in generalCustomEvent.hazardEvents) { Log.LogInfo("Processing..."); flag |= ProcessMapObject(hazardEvent); } } return flag; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static bool IsDawnManaged(string hazardName) { bool flag = false; foreach (DawnMapObjectInfo value in ((Registry)(object)LethalContent.MapObjects).Values) { if (((DawnBaseInfo)(object)value).ShouldSkipIgnoreOverride()) { continue; } GameObject mapObjectPrefab = value.GetMapObjectPrefab(); if (!(((mapObjectPrefab != null) ? ((Object)mapObjectPrefab).name : null) != hazardName)) { DawnOutsideMapObjectInfo outsideInfo = value.OutsideInfo; DawnInsideMapObjectInfo insideInfo = value.InsideInfo; if (outsideInfo != null || insideInfo != null) { flag = true; break; } } } Log.LogInfo($"{hazardName} managed: {flag}"); return flag; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static bool ProcessMapObject(GeneralCustomEvent.HazardEvent hazard) { bool flag = false; foreach (DawnMapObjectInfo value2 in ((Registry)(object)LethalContent.MapObjects).Values) { if (((DawnBaseInfo)(object)value2).ShouldSkipIgnoreOverride()) { continue; } GameObject mapObjectPrefab = value2.GetMapObjectPrefab(); if (!(((mapObjectPrefab != null) ? ((Object)mapObjectPrefab).name : null) != ((Object)hazard.hazardObject).name)) { string name = ((Object)value2.GetMapObjectPrefab()).name; if (!originalStates.ContainsKey(name)) { Dictionary dictionary = originalStates; DawnSnapshot value = default(DawnSnapshot); DawnOutsideMapObjectInfo outsideInfo = value2.OutsideInfo; value.OutsideWeights = ((outsideInfo != null) ? outsideInfo.SpawnWeights : null); DawnInsideMapObjectInfo insideInfo = value2.InsideInfo; value.InsideWeights = ((insideInfo != null) ? insideInfo.SpawnWeights : null); DawnInsideMapObjectInfo insideInfo2 = value2.InsideInfo; value.FacingAway = insideInfo2 != null && insideInfo2.IndoorMapHazardType.spawnFacingAwayFromWall; DawnInsideMapObjectInfo insideInfo3 = value2.InsideInfo; value.FacingWall = insideInfo3 != null && insideInfo3.IndoorMapHazardType.spawnFacingWall; DawnInsideMapObjectInfo insideInfo4 = value2.InsideInfo; value.BackToWall = insideInfo4 != null && insideInfo4.IndoorMapHazardType.spawnWithBackToWall; DawnInsideMapObjectInfo insideInfo5 = value2.InsideInfo; value.BackFlush = insideInfo5 != null && insideInfo5.IndoorMapHazardType.spawnWithBackFlushAgainstWall; DawnInsideMapObjectInfo insideInfo6 = value2.InsideInfo; value.ReqDist = insideInfo6 != null && insideInfo6.IndoorMapHazardType.requireDistanceBetweenSpawns; DawnInsideMapObjectInfo insideInfo7 = value2.InsideInfo; value.DisallowNear = insideInfo7 != null && insideInfo7.IndoorMapHazardType.disallowSpawningNearEntrances; dictionary[name] = value; } DawnOutsideMapObjectInfo outsideInfo2 = value2.OutsideInfo; DawnInsideMapObjectInfo insideInfo8 = value2.InsideInfo; NamespacedKey typedKey = ((DawnBaseInfo)(object)SelectableLevelExtensions.GetDawnInfo(RoundManager.Instance.currentLevel)).TypedKey; float num = Random.Range(hazard.minDensity.Computef(hazard.Type), hazard.maxDensity.Computef(hazard.Type)); Log.LogInfo($"Raw computed: {num}"); if (outsideInfo2 != null) { num = (int)Mathf.Clamp(num * Manager.terrainArea, 0f, 1000f); Log.LogInfo($"Outside adjusted computed: {num} Area: {Manager.terrainArea}"); outsideInfo2.SpawnWeights = new CurveTableBuilder().AddCurve(typedKey, AnimationCurve.Constant(0f, 1f, num)).Build(); value2.OutsideInfo = outsideInfo2; flag = true; } if (insideInfo8 != null) { int num2 = (int)num; Log.LogInfo("Inside adjusted computed: " + num2); insideInfo8.SpawnWeights = new CurveTableBuilder().AddCurve(typedKey, AnimationCurve.Constant(0f, 1f, (float)num2)).Build(); IndoorMapHazardType indoorMapHazardType = insideInfo8.IndoorMapHazardType; indoorMapHazardType.spawnFacingAwayFromWall = hazard.facingAwayFromWall; indoorMapHazardType.spawnFacingWall = hazard.facingWall; indoorMapHazardType.spawnWithBackToWall = hazard.backToWall; indoorMapHazardType.spawnWithBackFlushAgainstWall = hazard.backFlushWithWall; indoorMapHazardType.requireDistanceBetweenSpawns = hazard.requireDistanceBetween; indoorMapHazardType.disallowSpawningNearEntrances = hazard.disallowNearEntrances; insideInfo8.IndoorMapHazardType = indoorMapHazardType; value2.InsideInfo = insideInfo8; flag = true; } if (flag) { break; } } } return flag; } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static bool OnEventStart() { return ProcessHazardEvents(); } [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] public static void OnEventEnd() { foreach (KeyValuePair originalState in originalStates) { foreach (DawnMapObjectInfo value in ((Registry)(object)LethalContent.MapObjects).Values) { GameObject mapObjectPrefab = value.GetMapObjectPrefab(); if (((mapObjectPrefab != null) ? ((Object)mapObjectPrefab).name : null) == originalState.Key) { if (value.OutsideInfo != null) { value.OutsideInfo.SpawnWeights = (ProviderTable)originalState.Value.OutsideWeights; } if (value.InsideInfo != null) { value.InsideInfo.SpawnWeights = (ProviderTable)originalState.Value.InsideWeights; IndoorMapHazardType indoorMapHazardType = value.InsideInfo.IndoorMapHazardType; indoorMapHazardType.spawnFacingAwayFromWall = originalState.Value.FacingAway; indoorMapHazardType.spawnFacingWall = originalState.Value.FacingWall; indoorMapHazardType.spawnWithBackToWall = originalState.Value.BackToWall; indoorMapHazardType.spawnWithBackFlushAgainstWall = originalState.Value.BackFlush; indoorMapHazardType.requireDistanceBetweenSpawns = originalState.Value.ReqDist; indoorMapHazardType.disallowSpawningNearEntrances = originalState.Value.DisallowNear; value.InsideInfo.IndoorMapHazardType = indoorMapHazardType; } break; } } } originalStates.Clear(); } } [HarmonyPatch] internal class DawnlibPatching { [MethodImpl(MethodImplOptions.NoInlining | MethodImplOptions.NoOptimization)] [HarmonyPatch(typeof(RoundManager), "FinishGeneratingLevel")] [HarmonyPrefix] private static void DawnFixMethod() { if (Compatibility.DawnLibPresent) { Log.LogInfo($"Area gen: {Manager.terrainArea}"); if (Manager.terrainArea == 0f) { Manager.SampleMap(); } while (DawnLibHandling.eventQueue.Count > 0) { Log.LogInfo("Items left: " + DawnLibHandling.eventQueue.Count); DawnLibHandling.ProcessMapObject(DawnLibHandling.eventQueue.Dequeue()); } } } } internal class InsideHazardData : BaseHazardData { public class SpawnOptions_ { [JsonProperty("FacingAwayFromWall")] public bool FacingAwayFromWall { get; set; } [JsonProperty("FacingWall")] public bool FacingWall { get; set; } [JsonProperty("BackToWall")] public bool BackToWall { get; set; } [JsonProperty("BackFlushToWall")] public bool BackFlushWithWall { get; set; } [JsonProperty("RequireDistanceBetween")] public bool RequireDistanceBetween { get; set; } [JsonProperty("DisallowNearEntrances")] public bool DisallowNearEntrances { get; set; } [JsonProperty("allowInMineshaft")] public bool AllowInMineshaft { get; set; } } [JsonProperty("MinSpawn")] public int[] MinSpawn { get; set; } [JsonProperty("MaxSpawn")] public int[] MaxSpawn { get; set; } [JsonProperty("SpawnOptions")] public SpawnOptions_ SpawnOptions { get; set; } public InsideHazardData(string prefabName, int[] minSpawn, int[] maxSpawn, SpawnOptions_ options) : base(prefabName) { MinSpawn = minSpawn; MaxSpawn = maxSpawn; SpawnOptions = options; } } internal class OutsideHazardData : BaseHazardData { [JsonProperty("MinDensity")] public float[] MinDensity { get; set; } [JsonProperty("MaxDensity")] public float[] MaxDensity { get; set; } public OutsideHazardData(string prefabName, float[] minDensity, float[] maxDensity) : base(prefabName) { MinDensity = minDensity; MaxDensity = maxDensity; } } } namespace BrutalCompanyMinus.Minus.Events { [HarmonyPatch] internal class AllWeather : MEvent { public new static bool Active; public static AllWeather Instance; public override string Name() { return "AllWeather"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "신이 당신을 증오합니다.", "하늘이 인간에게 알려진 모든 기상 현상을 쏟아부으며 혼돈이 군림합니다.", "우산이 도움이 될지도 모르겠네요", "당신이 여기서 고통받길 바랍니다" }; ColorHex = "#800000"; Type = EventType.VeryBad; EventsToRemove = new List { "Gloomy", "Raining", "HeavyRain" }; ScaleList.Add(ScaleType.ScrapValue, new Scale(1.6f, 0f, 1.6f, 1.6f)); ScaleList.Add(ScaleType.ScrapAmount, new Scale(1.3f, 0f, 1.3f, 1.3f)); } public override bool AddEventIfOnly() { return RoundManager.Instance.currentLevel.randomWeathers != null && RoundManager.Instance.currentLevel.randomWeathers.Length >= 3; } public override void Execute() { //IL_008c: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00ac: Unknown result type (might be due to invalid IL or missing references) //IL_00b1: 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_00b5: Unknown result type (might be due to invalid IL or missing references) //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Expected I4, but got Unknown Net.Instance.SetAllWeatherActiveServerRpc(state: true); Net.Instance.SpawnAllWeatherServerRpc(Net.Instance._seed++); Manager.scrapAmountMultiplier *= Getf(ScaleType.ScrapAmount); Manager.scrapValueMultiplier *= Getf(ScaleType.ScrapValue); if (RoundManager.Instance.currentLevel.randomWeathers == null) { return; } RandomWeatherWithVariables[] randomWeathers = RoundManager.Instance.currentLevel.randomWeathers; foreach (RandomWeatherWithVariables val in randomWeathers) { if (val.weatherType != RoundManager.Instance.currentLevel.currentWeather) { LevelWeatherType weatherType = val.weatherType; LevelWeatherType val2 = weatherType; switch (val2 - 1) { case 0: Manager.SetAtmosphere(Assets.AtmosphereName.Rainy, state: true); break; case 2: Manager.SetAtmosphere(Assets.AtmosphereName.Foggy, state: true); break; case 1: Manager.SetAtmosphere(Assets.AtmosphereName.Stormy, state: true); break; case 3: Manager.SetAtmosphere(Assets.AtmosphereName.Flooded, state: true); break; case 4: Manager.SetAtmosphere(Assets.AtmosphereName.Eclipsed, state: true); break; } } } } public override void OnShipLeave() { Net.Instance.SetAllWeatherActiveServerRpc(state: false); } public override void OnGameStart() { Active = false; } } internal class AntiBounty : MEvent { public static bool AntiBountyActive; public static AntiBounty Instance; public override string Name() { return "AntiBounty"; } public override void Initalize() { Instance = this; Weight = 2; Descriptions = new List { "회사는 야생 동물 보호 구역을 훼손한 것에 대해 벌금을 부과합니다", "평화주의자 루트", "살생의 대가를 치르게 될 것입니다..." }; ColorHex = "#FF0000"; Type = EventType.Bad; EventsToRemove = new List { "Bounty" }; ScaleList.Add(ScaleType.MinValue, new Scale(20f, 0.4f, 20f, 60f)); ScaleList.Add(ScaleType.MaxValue, new Scale(30f, 0.6f, 30f, 90f)); } public override void Execute() { BrutalCompanyMinus.Minus.Handlers.AntiBounty.enemyObjectIDs.Clear(); AntiBountyActive = true; } public override void OnShipLeave() { AntiBountyActive = false; } public override void OnGameStart() { AntiBountyActive = false; } } internal class AntiCoilhead : MEvent { public static AntiCoilhead Instance; public override string Name() { return "AntiCoilhead"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "그들을 쳐다보지 마세요...", "무언가 나를 노려보고 있다", "나의 최애야", "지금 상황에 친구가 없기를 바랍니다." }; ColorHex = "#800000"; Type = EventType.VeryBad; EventsToRemove = new List { "Coilhead", "LeaflessBrownTrees", "Trees", "HeavyRain" }; EventsToSpawnWith = new List { "LeaflessTrees", "Gloomy" }; monstersToSpawn = new List { new MonsterEvent(Assets.antiCoilHead, new Scale(20f, 0.8f, 20f, 100f), new Scale(5f, 0.2f, 5f, 25f), new Scale(2f, 0.04f, 2f, 6f), new Scale(2f, 0.06f, 2f, 8f), new Scale(0f, 0.02f, 0f, 1f), new Scale(0f, 0.03f, 0f, 3f)) }; } public override void Execute() { Manager.RemoveSpawn(Assets.EnemyName.CoilHead); ExecuteAllMonsterEvents(); } } internal class Arachnophobia : MEvent { public static Arachnophobia Instance; public override string Name() { return "Arachnophobia"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "악몽 같은 시설", "진공청소기를 챙겨오는 것을 추천합니다.", "이 시설을 통째로 태워버리고 싶어질 겁니다.", "Zeekers가 화염방사기를 추가해줬으면 좋겠네요." }; ColorHex = "#800000"; Type = EventType.VeryBad; EventsToRemove = new List { "Trees", "LeaflessBrownTrees", "Spiders" }; EventsToSpawnWith = new List { "LeaflessTrees" }; monstersToSpawn = new List { new MonsterEvent(Assets.EnemyName.BunkerSpider, new Scale(33f, 0.66f, 33f, 100f), new Scale(5f, 0.2f, 5f, 25f), new Scale(7f, 0.14f, 7f, 21f), new Scale(9f, 0.18f, 9f, 27f), new Scale(2f, 0.04f, 2f, 6f), new Scale(3f, 0.06f, 3f, 9f)) }; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class BaboonHorde : MEvent { public static BaboonHorde Instance; public override string Name() { return "BaboonHorde"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "수적으로 열세인 것 같습니다", "문을 닫아 두십시오.", "그들의 부름을 듣고, 땅을 뒤덮는 그림자를 보십시오.", "왜 안쪽에도 그것들이 있는 거죠??" }; ColorHex = "#800000"; Type = EventType.VeryBad; monstersToSpawn = new List { new MonsterEvent(Assets.EnemyName.BaboonHawk, new Scale(10f, 0.4f, 10f, 50f), new Scale(33f, 0.66f, 33f, 100f), new Scale(2f, 0.04f, 2f, 6f), new Scale(3f, 0.06f, 3f, 9f), new Scale(4f, 0.08f, 4f, 12f), new Scale(5f, 0.1f, 5f, 15f)) }; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class BadProduce : MEvent { public static BadProduce Instance; public override string Name() { return "BadProduce"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "이곳의 모든 건 싸구려로 만들어졌습니다...", "누가 이런 쓰레기를 만든 거야...", "예산 맞춤형 고물들...", "질보다 양" }; ColorHex = "#800000"; Type = EventType.VeryBad; ScaleList.Add(ScaleType.ScrapValue, new Scale(0.6f, 0f, 0.6f, 0.6f)); ScaleList.Add(ScaleType.ScrapAmount, new Scale(2f, 0f, 2f, 2f)); } public override void Execute() { Manager.scrapValueMultiplier *= Getf(ScaleType.ScrapValue); Manager.scrapAmountMultiplier *= Getf(ScaleType.ScrapAmount); } } internal class Barbers : MEvent { public static Barbers Instance; public override string Name() { return "Barbers"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "이발할 시간입니다", "이발사가 불렀어요!", "머리를 다듬을 때가 됐군요" }; ColorHex = "#FF0000"; Type = EventType.Bad; monstersToSpawn = new List { new MonsterEvent("ClaySurgeon", new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(1f, 0.13f, 1f, 4f), new Scale(4f, 0.06f, 4f, 8f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)) }; } public override bool AddEventIfOnly() { return Compatibility.BarberFixesPresent; } public override void Execute() { if (Configuration.enforceEscapeModChecks.Value && !Compatibility.StarLancereNemyEscapePresent) { Instance.monstersToSpawn[0].minOutside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[0].maxOutside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[0].outsideSpawnRarity = new Scale(0f, 0f, 0f, 0f); } ExecuteAllMonsterEvents(); } } internal class Bees : MEvent { public static Bees Instance; public override string Name() { return "Bees"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "벌이다!!", "위이잉", "자연의 건축가들이 열일 중입니다.", "둥근 것들", "벌은 안 돼!" }; ColorHex = "#FF0000"; Type = EventType.Bad; monstersToSpawn = new List { new MonsterEvent(Assets.EnemyName.CircuitBee, new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(2f, 0.04f, 2f, 6f), new Scale(3f, 0.06f, 3f, 9f)) }; ScaleList.Add(ScaleType.DaytimeEnemyRarity, new Scale(20f, 0.8f, 20f, 100f)); } public override void Execute() { ExecuteAllMonsterEvents(); Manager.AddEnemyToPoolWithRarity(ref RoundManager.Instance.currentLevel.DaytimeEnemies, Assets.EnemyName.CircuitBee, Get(ScaleType.DaytimeEnemyRarity)); } } [HarmonyPatch] internal class BerserkTurrets : MEvent { public static BerserkTurrets Instance; public override string Name() { return "BerserkTurrets"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "완전한 지옥", "광기... 그 애니메이션 말고요.", "시야에 들지 마십시오", "아주 끔찍한 하루가 될 겁니다!", "엄청난 소음 주의!" }; ColorHex = "#280000"; Type = EventType.VeryBad; EventsToSpawnWith = new List { "Turrets" }; } public override void Execute() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Expected O, but got Unknown Active = true; GameObject val = new GameObject("BerserkTurretsEvent"); val.AddComponent(); } public override void OnShipLeave() { Active = false; } public override void OnGameStart() { Active = false; } } internal class BigBonus : MEvent { public static BigBonus Instance; public override string Name() { return "BigBonus"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "회사가 매우 기뻐합니다", "기업에서 당신에게 경기 부양금을 보냈습니다", "예삐이이이이!" }; ColorHex = "#00FF00"; Type = EventType.VeryGood; EventsToRemove = new List { "Bonus" }; ScaleList.Add(ScaleType.MinCash, new Scale(330f, 7.7f, 330f, 1100f)); ScaleList.Add(ScaleType.MaxCash, new Scale(400f, 10.5f, 400f, 1450f)); } public override void Execute() { Manager.PayCredits(Random.Range(Get(ScaleType.MinCash), Get(ScaleType.MaxCash) + 1)); } } internal class BigDelivery : MEvent { public static BigDelivery Instance; public override string Name() { return "BigDelivery"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "회사가 이 위성에 대규모 배송을 보냈습니다.", "호화로운 배송품이 떨어집니다.", "회사에서 엄청 큰 소포를 보냈어요." }; ColorHex = "#00FF00"; Type = EventType.VeryGood; EventsToRemove = new List { "SmallDelivery" }; ScaleList.Add(ScaleType.MinItemAmount, new Scale(5f, 0.1f, 5f, 15f)); ScaleList.Add(ScaleType.MaxItemAmount, new Scale(7f, 0.14f, 7f, 21f)); ScaleList.Add(ScaleType.MinValue, new Scale(60f, 0f, 60f, 60f)); ScaleList.Add(ScaleType.MaxValue, new Scale(99999f, 0f, 99999f, 99999f)); } public override void Execute() { Manager.DeliverRandomItems(Random.Range(Get(ScaleType.MinItemAmount), Get(ScaleType.MaxItemAmount) + 1), Get(ScaleType.MinValue), Get(ScaleType.MaxValue)); } } internal class Birds : MEvent { public static Birds Instance; public override string Name() { return "Birds"; } public override void Initalize() { Instance = this; Weight = 8; Descriptions = new List { "철새 이동의 계절입니다", "새공주", "이것들에게 깃털이 있긴 한가요?", "이것들은 총으로 쏠 수 있습니다" }; ColorHex = "#FFFFFF"; Type = EventType.Neutral; monstersToSpawn = new List { new MonsterEvent(Assets.EnemyName.Manticoil, new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(5f, 0f, 5f, 5f), new Scale(8f, 0f, 8f, 8f)) }; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class BlackFriday : MEvent { public static BlackFriday Instance; public override string Name() { return "BlackFriday"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "모든 품목 세일 중!!!!", "할인 열기로 시장이 뜨겁게 달아올랐습니다", "이 기회를 놓치지 마세요!" }; ColorHex = "#00FF00"; Type = EventType.VeryGood; EventsToRemove = new List { "ShipmentFees" }; ScaleList.Add(ScaleType.MinPercentageCut, new Scale(25f, 0.7f, 25f, 95f)); ScaleList.Add(ScaleType.MaxPercentageCut, new Scale(55f, 0.7f, 55f, 95f)); } public override void Execute() { Net.Instance.BlackFridayServerRpc(Get(ScaleType.MinPercentageCut), Get(ScaleType.MaxPercentageCut)); } } internal class Bonus : MEvent { public static Bonus Instance; public override string Name() { return "Bonus"; } public override void Initalize() { Instance = this; Weight = 2; Descriptions = new List { "오늘은 회사의 기분이 좋은 모양입니다.", "기업이 당신의 존재에 대한 대가로 크레딧을 지급합니다", "■ ■ ■", "절대로 충분하지 않습니다." }; ColorHex = "#008000"; Type = EventType.Good; ScaleList.Add(ScaleType.MinCash, new Scale(75f, 2.25f, 75f, 300f)); ScaleList.Add(ScaleType.MaxCash, new Scale(125f, 3.75f, 125f, 400f)); } public override void Execute() { Manager.PayCredits(Random.Range(Get(ScaleType.MinCash), Get(ScaleType.MaxCash) + 1)); } } internal class Bounty : MEvent { public new static bool Active; public static Bounty Instance; public override string Name() { return "Bounty"; } public override void Initalize() { Instance = this; Weight = 2; Descriptions = new List { "이제 기업이 처치 포상금을 지급합니다", "찢고 죽여라", "박멸의 시간", "괴물들이 활보하고 있으며, 그들의 현상금은 그저 그렇습니다", "사냥이 시작되었습니다!" }; ColorHex = "#008000"; Type = EventType.Good; EventsToRemove = new List { "AntiBounty" }; ScaleList.Add(ScaleType.MinValue, new Scale(20f, 0.4f, 20f, 60f)); ScaleList.Add(ScaleType.MaxValue, new Scale(30f, 0.6f, 30f, 90f)); } public override void Execute() { BrutalCompanyMinus.Minus.Handlers.Bounty.enemyObjectIDs.Clear(); Active = true; } public override void OnShipLeave() { Active = false; } public override void OnGameStart() { Active = false; } } internal class Bracken : MEvent { public static Bracken Instance; public override string Name() { return "Bracken"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "목덜미가 따끔거립니다", "당신의 전담 척추 교정사들", "당신에게 어둠 공포증이 있었으면 좋겠군요", "이 눈싸움에서 당신은 결코 이길 수 없을 겁니다" }; ColorHex = "#800000"; Type = EventType.VeryBad; monstersToSpawn = new List { new MonsterEvent(Assets.EnemyName.Bracken, new Scale(20f, 0.8f, 20f, 100f), new Scale(5f, 0.2f, 5f, 25f), new Scale(3f, 0.06f, 3f, 9f), new Scale(4f, 0.08f, 4f, 12f), new Scale(0f, 0.02f, 0f, 1f), new Scale(0f, 0.03f, 0f, 3f)) }; } public override void Execute() { if (Configuration.enforceEscapeModChecks.Value && !Compatibility.StarLancereNemyEscapePresent) { foreach (MonsterEvent item in Instance.monstersToSpawn) { item.outsideSpawnRarity = new Scale(0f, 0f, 0f, 0f); item.maxOutside = new Scale(0f, 0f, 0f, 0f); item.minOutside = new Scale(0f, 0f, 0f, 0f); } } ExecuteAllMonsterEvents(); } } internal class BugHorde : MEvent { public static BugHorde Instance; public override string Name() { return "BugHorde"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "그들의 수가 너무 많습니다...", "단단히 준비하는 게 좋을 겁니다", "어떤 녀석이 터지는 거죠?", "윙윙거리는 파멸이 다가옵니다", "yippeeeee 모드와 함께하면 더욱 좋습니다" }; ColorHex = "#800000"; Type = EventType.VeryBad; EventsToRemove = new List { "HoardingBugs", "KamikazieBugs" }; EventsToSpawnWith = new List { "ScarceOutsideScrap" }; monstersToSpawn = new List { new MonsterEvent(Assets.EnemyName.HoardingBug, new Scale(33f, 0.66f, 33f, 100f), new Scale(10f, 0.4f, 10f, 50f), new Scale(6f, 0.12f, 6f, 18f), new Scale(8f, 0.16f, 8f, 24f), new Scale(2f, 0.04f, 2f, 6f), new Scale(3f, 0.06f, 3f, 9f)), new MonsterEvent(Assets.kamikazieBug, new Scale(33f, 0.66f, 33f, 100f), new Scale(10f, 0.4f, 10f, 50f), new Scale(6f, 0.12f, 6f, 18f), new Scale(8f, 0.16f, 8f, 24f), new Scale(2f, 0.04f, 2f, 6f), new Scale(3f, 0.06f, 3f, 9f)) }; } public override void Execute() { if (Configuration.enforceEscapeModChecks.Value && !Compatibility.StarLancereNemyEscapePresent) { Instance.monstersToSpawn[0].minOutside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[0].maxOutside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[0].outsideSpawnRarity = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[1].minOutside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[1].maxOutside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[1].outsideSpawnRarity = new Scale(0f, 0f, 0f, 0f); } ExecuteAllMonsterEvents(); } } internal class Butlers : MEvent { public static Butlers Instance; public override string Name() { return "Butlers"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "깔끔하게 차려입은 신사들", "팡!", "칼" }; ColorHex = "#FF0000"; Type = EventType.Bad; monstersToSpawn = new List { new MonsterEvent(Assets.EnemyName.Butler, new Scale(10f, 0.4f, 10f, 50f), new Scale(5f, 0.2f, 5f, 25f), new Scale(1f, 0.05f, 1f, 6f), new Scale(1f, 0.07f, 1f, 8f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)) }; } public override void Execute() { if (Configuration.enforceEscapeModChecks.Value && !Compatibility.StarLancereNemyEscapePresent) { Instance.monstersToSpawn[0].minOutside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[0].maxOutside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[0].outsideSpawnRarity = new Scale(0f, 0f, 0f, 0f); } ExecuteAllMonsterEvents(); } } internal class Cadaver : MEvent { public static Cadaver Instance; public override string Name() { return "Cadaver"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "감염의 날", "식물들...", "감염..." }; ColorHex = "#800000"; Type = EventType.VeryBad; monstersToSpawn = new List { new MonsterEvent(Assets.EnemyName.CadaverGrowths, new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(1f, 0f, 1f, 1f), new Scale(1f, 0f, 1f, 1f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)) }; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class CatsAndDogs : MEvent { public static CatsAndDogs Instance; public override string Name() { return "CatsAndDogs"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "누가 개(그리고 고양이)들을 풀어줬어?", "비가 억수같이 쏟아지고 있어요", "개와 고양이가 비처럼 쏟아진다" }; ColorHex = "#000000"; Type = EventType.VeryBad; isBetaEvent = true; EventsToSpawnWith = new List { "Dogs", "Puma" }; } public override void Execute() { } public override void OnShipLeave() { } public override void OnGameStart() { } } internal class Clock : MEvent { public static Clock Instance; public override string Name() { return "Clock"; } public override void Initalize() { //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown Instance = this; Weight = 3; Descriptions = new List { "시계", "당신에게 남은 시간이 얼마 없습니다" }; ColorHex = "#FFFFFF"; Type = EventType.Neutral; scrapTransmutationEvent = new ScrapTransmutationEvent(new Scale(0.5f, 0.008f, 0.5f, 0.9f), new SpawnableItemWithRarity(Assets.GetItem("Clock"), 95)); EventsToRemove = new List { "SID", "RealityShift" }; ScaleList.Add(ScaleType.ScrapAmount, new Scale(1f, 0.005f, 1f, 1.5f)); } public override bool AddEventIfOnly() { if (!Manager.transmuteScrap) { Manager.transmuteScrap = true; return true; } return false; } public override void Execute() { Manager.scrapAmountMultiplier *= Getf(ScaleType.ScrapAmount); scrapTransmutationEvent.Execute(); } } internal class Coilhead : MEvent { public static Coilhead Instance; public override string Name() { return "Coilhead"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "시설 내에서 코일헤드가 탐지되었습니다!", "격리 실패!", "그들에게 등을 돌리지 마십시오...", "잘린 머리가 보통 4~5초 동안은 의식을 유지한다는 사실을 알고 계셨나요?" }; ColorHex = "#800000"; Type = EventType.VeryBad; monstersToSpawn = new List { new MonsterEvent(Assets.EnemyName.CoilHead, new Scale(20f, 0.8f, 20f, 100f), new Scale(5f, 0.2f, 5f, 25f), new Scale(2f, 0.04f, 2f, 6f), new Scale(2f, 0.06f, 2f, 8f), new Scale(0f, 0.02f, 0f, 1f), new Scale(0f, 0.03f, 0f, 3f)) }; } public override void Execute() { if (Configuration.enforceEscapeModChecks.Value && !Compatibility.StarLancereNemyEscapePresent) { Instance.monstersToSpawn[0].minOutside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[0].maxOutside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[0].outsideSpawnRarity = new Scale(0f, 0f, 0f, 0f); } ExecuteAllMonsterEvents(); } } internal class ControlPad : MEvent { public static ControlPad Instance; public override string Name() { return "ControlPad"; } public override void Initalize() { //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown Instance = this; Weight = 2; Descriptions = new List { "제어 패드", "리모컨과 비슷하지만, 훨씬 더 발전된 형태입니다" }; ColorHex = "#e84343"; Type = EventType.Neutral; scrapTransmutationEvent = new ScrapTransmutationEvent(new Scale(0.5f, 0.008f, 0.5f, 0.9f), new SpawnableItemWithRarity(Assets.GetItem("ControlPad"), 95)); EventsToRemove = new List { "SID", "RealityShift" }; ScaleList.Add(ScaleType.ScrapAmount, new Scale(1f, 0.005f, 1f, 1.5f)); } public override bool AddEventIfOnly() { if (!Manager.transmuteScrap) { Manager.transmuteScrap = true; return true; } return false; } public override void Execute() { Manager.scrapAmountMultiplier *= Getf(ScaleType.ScrapAmount); scrapTransmutationEvent.Execute(); } } internal class CruiserFailure : MEvent { public static CruiserFailure Instance; public new static bool Active; public override string Name() { return "CruiserFailure"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "연장 보증에 가입하셨어야죠", "크루저 시스템 오류", "크루저가 고장 났습니다", "요즘 탈것들은 믿을 게 못 되네요!", "시동 구독 서비스가 만료되었습니다", "연장 보증 상담을 위해 방문했습니다" }; ColorHex = "#FF0000"; Type = EventType.Bad; } public override void Execute() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown Net.Instance.SetCruiserOfflineServerRpc(); Active = true; if (Compatibility.ScanVanPresent) { GameObject val = new GameObject("ScanVanFailure"); val.AddComponent(); } } public override void OnShipLeave() { Active = false; } public override void OnGameStart() { Active = false; } } internal class Dentures : MEvent { public static Dentures Instance; public override string Name() { return "Dentures"; } public override void Initalize() { //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Expected O, but got Unknown Instance = this; Weight = 2; Descriptions = new List { "할머니가 틀니를 깜빡하셨네요...", "이빨 요정의 꿈", "구석구석에서 그것이 미소 짓고 있습니다" }; ColorHex = "#008000"; Type = EventType.Good; EventsToRemove = new List { "SID", "RealityShift" }; scrapTransmutationEvent = new ScrapTransmutationEvent(new Scale(0.5f, 0.008f, 0.5f, 0.9f), new SpawnableItemWithRarity(Assets.GetItem(Assets.ItemName.Teeth), 100)); ScaleList.Add(ScaleType.ScrapAmount, new Scale(1f, 0.005f, 1f, 1.5f)); } public override bool AddEventIfOnly() { if (!Manager.transmuteScrap) { Manager.transmuteScrap = true; return true; } return false; } public override void Execute() { Manager.scrapAmountMultiplier *= Getf(ScaleType.ScrapAmount); scrapTransmutationEvent.Execute(); } } internal class Dogs : MEvent { public static Dogs Instance; public override string Name() { return "Dogs"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "그들이 당신의 소리를 들을 수 있습니다", "누가 착한 아이지?", "착한 애들이 아니네요 ;(", "그들의 발바닥 아래서 땅이 진동합니다", "방귀 방석을 꺼내세요!", "뒤에 있는 문을 꼭 닫으십시오" }; ColorHex = "#800000"; Type = EventType.VeryBad; monstersToSpawn = new List { new MonsterEvent(Assets.EnemyName.EyelessDog, new Scale(10f, 0.4f, 10f, 50f), new Scale(20f, 0.8f, 20f, 100f), new Scale(1f, 0.03f, 1f, 4f), new Scale(1f, 0.04f, 1f, 5f), new Scale(1f, 0.03f, 1f, 4f), new Scale(2f, 0.04f, 2f, 6f)) }; } public override void Execute() { if (Configuration.enforceEscapeModChecks.Value && !Compatibility.StarLancereNemyEscapePresent) { Instance.monstersToSpawn[0].minInside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[0].maxInside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[0].insideSpawnRarity = new Scale(0f, 0f, 0f, 0f); } ExecuteAllMonsterEvents(); } } internal class Dustpans : MEvent { public static Dustpans Instance; public override string Name() { return "Dustpans"; } public override void Initalize() { //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Expected O, but got Unknown Instance = this; Weight = 1; Descriptions = new List { "도대체 이건 뭐죠?", "쓰레받기인가요?" }; ColorHex = "#FFA500"; Type = EventType.Bad; EventsToRemove = new List { "SID", "RealityShift" }; scrapTransmutationEvent = new ScrapTransmutationEvent(new Scale(0.5f, 0.008f, 0.5f, 0.9f), new SpawnableItemWithRarity(Assets.GetItem(Assets.ItemName.DustPan), 90)); ScaleList.Add(ScaleType.ScrapAmount, new Scale(1f, 0.005f, 1f, 1.5f)); } public override bool AddEventIfOnly() { if (!Manager.transmuteScrap) { Manager.transmuteScrap = true; return true; } return false; } public override void Execute() { Manager.scrapAmountMultiplier *= Getf(ScaleType.ScrapAmount); scrapTransmutationEvent.Execute(); } } internal class EarlyShip : MEvent { public static EarlyShip Instance; public override string Name() { return "EarlyShip"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "함선이 조금 일찍 도착했습니다.", "워프 드라이브 가동!", "일찍 일어나는 새가 벌레를 잡는 법이죠." }; ColorHex = "#008000"; Type = EventType.Good; EventsToRemove = new List { "LateShip", "VeryEarlyShip", "VeryLateShip", "Hell" }; ScaleList.Add(ScaleType.TimeMax, new Scale(-45f, -0.55f, -100f, -45f)); ScaleList.Add(ScaleType.TimeMin, new Scale(-60f, -0.55f, -100f, -60f)); } public override void Execute() { Net.Instance.MoveTimeServerRpc(Random.Range(Getf(ScaleType.TimeMin), Getf(ScaleType.TimeMax))); } } internal class EasterEggs : MEvent { public static EasterEggs Instance; public override string Name() { return "EasterEggs"; } public override void Initalize() { //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Expected O, but got Unknown Instance = this; Weight = 2; Descriptions = new List { "에그 헌트", "너무 가까이서 던지지 마세요", "전부 다 찾을 수 있을까요?" }; ColorHex = "#FFA500"; Type = EventType.Neutral; EventsToRemove = new List { "SID", "RealityShift" }; scrapTransmutationEvent = new ScrapTransmutationEvent(new Scale(0.5f, 0.1f, 1f, 0.9f), new SpawnableItemWithRarity(Assets.GetItem(Assets.ItemName.EasterEgg), 100)); ScaleList.Add(ScaleType.ScrapAmount, new Scale(1f, 0.005f, 1f, 1.5f)); } public override bool AddEventIfOnly() { if (!Manager.transmuteScrap) { Manager.transmuteScrap = true; return true; } return false; } public override void Execute() { Manager.scrapAmountMultiplier *= Getf(ScaleType.ScrapAmount); scrapTransmutationEvent.Execute(); } } internal class FacilityGhost : MEvent { public new static bool Active; public static FacilityGhost Instance; public override string Name() { return "FacilityGhost"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "시설 안에 유령이 있습니다", "누가 자꾸 전등을 끄는 거죠...", "초자연적 신호가 감지되었습니다", "위자 보드를 챙겨오세요" }; ColorHex = "#FF0000"; Type = EventType.Bad; } public override void Execute() { Active = true; } public override void OnShipLeave() { Active = false; } public override void OnGameStart() { Active = false; } } internal class FlowerSnake : MEvent { public static FlowerSnake Instance; public override string Name() { return "FlowerSnake"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "몸무게가 조금 더 나가면 도움이 될 겁니다", "이게 당신의 머리를 날려버릴지도 모릅니다", "꽃뱀이다!" }; ColorHex = "#FF0000"; Type = EventType.Bad; monstersToSpawn = new List { new MonsterEvent(Assets.EnemyName.FlowerSnake, new Scale(1f, 0.02f, 1f, 3f), new Scale(1f, 0.02f, 1f, 3f), new Scale(3f, 0.06f, 3f, 9f), new Scale(4f, 0.08f, 4f, 12f), new Scale(2f, 0.04f, 2f, 6f), new Scale(3f, 0.06f, 3f, 9f)) }; ScaleList.Add(ScaleType.DaytimeEnemyRarity, new Scale(20f, 0.8f, 20f, 100f)); } public override void Execute() { if (Configuration.enforceEscapeModChecks.Value && !Compatibility.StarLancereNemyEscapePresent) { Instance.monstersToSpawn[0].minInside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[0].maxInside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[0].insideSpawnRarity = new Scale(0f, 0f, 0f, 0f); } ExecuteAllMonsterEvents(); Manager.AddEnemyToPoolWithRarity(ref RoundManager.Instance.currentLevel.DaytimeEnemies, Assets.EnemyName.FlowerSnake, Get(ScaleType.DaytimeEnemyRarity)); } } internal class FootballScrap : MEvent { public static FootballScrap Instance; public override string Name() { return "FootballScrap"; } public override void Initalize() { //IL_0094: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Expected O, but got Unknown Instance = this; Weight = 2; Descriptions = new List { "이건 사커가 아니라 풋볼입니다", "공... 꽤 많네요" }; ColorHex = "#e84343"; Type = EventType.Neutral; Aliases = new List { "SoccerBall", "Soccer" }; scrapTransmutationEvent = new ScrapTransmutationEvent(new Scale(0.5f, 0.008f, 0.5f, 0.9f), new SpawnableItemWithRarity(Assets.GetItem("SoccerBall"), 95)); EventsToRemove = new List { "SID", "RealityShift" }; ScaleList.Add(ScaleType.ScrapAmount, new Scale(1f, 0.005f, 1f, 1.5f)); } public override bool AddEventIfOnly() { if (!Manager.transmuteScrap) { Manager.transmuteScrap = true; return true; } return false; } public override void Execute() { Manager.scrapAmountMultiplier *= Getf(ScaleType.ScrapAmount); scrapTransmutationEvent.Execute(); } } internal class ForestGiant : MEvent { public static ForestGiant Instance; public override string Name() { return "ForestGiant"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "시설 안에 최홍만이 있나요?", "안 될 거 없죠", "시설 내부에서 쿵쾅거리는 발소리가 들립니다." }; ColorHex = "#800000"; Type = EventType.VeryBad; monstersToSpawn = new List { new MonsterEvent(Assets.EnemyName.ForestKeeper, new Scale(1f, 0.09f, 1f, 10f), new Scale(20f, 0.8f, 20f, 100f), new Scale(1f, 0.03f, 1f, 3f), new Scale(1f, 0.04f, 1f, 4f), new Scale(0f, 0.02f, 0f, 1f), new Scale(0f, 0.03f, 0f, 3f)) }; } public override bool AddEventIfOnly() { return Compatibility.StarLancereNemyEscapePresent; } public override void Execute() { if (Configuration.enforceEscapeModChecks.Value && !Compatibility.StarLancereNemyEscapePresent) { Instance.monstersToSpawn[0].minInside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[0].maxInside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[0].insideSpawnRarity = new Scale(0f, 0f, 0f, 0f); } ExecuteAllMonsterEvents(); } } internal class FragileEnemies : MEvent { public static FragileEnemies Instance; public override string Name() { return "FragileEnemies"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "이곳의 적들은 평소보다 조금 더 연약합니다.", "몽둥이질 한 번 정도는 덜 해도 되겠네요", "의문의 질병이 적들을 연약하게 만들고 있습니다..." }; ColorHex = "#008000"; Type = EventType.Good; EventsToRemove = new List { "StrongEnemies" }; ScaleList.Add(ScaleType.MinHp, new Scale(-2f, -0.04f, -6f, -2f)); ScaleList.Add(ScaleType.MaxHp, new Scale(-1f, -0.03f, -4f, -1f)); } public override void Execute() { Manager.AddEnemyHp(Random.Range(Get(ScaleType.MinHp), Get(ScaleType.MaxHp) + 1)); } } internal class FullAccess : MEvent { public static FullAccess Instance; public new static bool Active; public override string Name() { return "FullAccess"; } public override void Initalize() { Instance = this; Weight = 2; Descriptions = new List { "모든 것이 열려 있습니다!", "누군가 문을 열어두었네요", "모든 도둑들의 꿈", "진정한 탐험을 경험하십시오", "여기선 열쇠가 필요 없을 겁니다" }; ColorHex = "#008000"; Type = EventType.Good; EventsToRemove = new List { "FacilityGhost" }; } public override void Execute() { Active = true; } public override void OnShipLeave() { Active = false; } public override void OnGameStart() { Active = false; } } internal class GarbageLid : MEvent { public static GarbageLid Instance; public override string Name() { return "GarbageLid"; } public override void Initalize() { //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown Instance = this; Weight = 2; Descriptions = new List { "쓰레기", "쓰레기통 뚜껑... 정말 많네요" }; ColorHex = "#e84343"; Type = EventType.Neutral; scrapTransmutationEvent = new ScrapTransmutationEvent(new Scale(0.5f, 0.008f, 0.5f, 0.9f), new SpawnableItemWithRarity(Assets.GetItem("GarbageLid"), 95)); EventsToRemove = new List { "SID", "RealityShift", "Pickles", "SussyPaintings", "Dustpans", "Clock", "ControlPad", "ZedDog", "PlasticCup", "ToiletPaper", "FootballScrap" }; ScaleList.Add(ScaleType.ScrapAmount, new Scale(1f, 0.005f, 1f, 1.5f)); } public override bool AddEventIfOnly() { if (!Manager.transmuteScrap) { Manager.transmuteScrap = true; return true; } return false; } public override void Execute() { Manager.scrapAmountMultiplier *= Getf(ScaleType.ScrapAmount); scrapTransmutationEvent.Execute(); } } internal class GiantsOutside : MEvent { public static GiantsOutside Instance; public override string Name() { return "GiantsOutside"; } public override void Initalize() { Instance = this; Weight = 2; Descriptions = new List { "진격의 거인!!", "거인들의 전쟁", "내기를 시작하세요..." }; ColorHex = "#800000"; Type = EventType.VeryBad; monstersToSpawn = new List { new MonsterEvent(Assets.EnemyName.ForestKeeper, new Scale(1f, 0f, 1f, 1f), new Scale(33f, 0.66f, 33f, 100f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(4f, 0.04f, 4f, 8f), new Scale(4f, 0.04f, 4f, 12f)) }; EventsToRemove = new List { "GiantShowdown" }; } public override bool AddEventIfOnly() { return !Compatibility.theGiantSpecimensPresent; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class Gloomy : MEvent { public static Gloomy Instance; public override string Name() { return "Gloomy"; } public override void Initalize() { Instance = this; Weight = 8; Descriptions = new List { "밖이 어둑어둑하네요", "안개가 자욱합니다", "누가 안개 제조기를 틀어놨죠?" }; ColorHex = "#FFFFFF"; Type = EventType.Neutral; } public override bool AddEventIfOnly() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected I4, but got Unknown LevelWeatherType currentWeather = RoundManager.Instance.currentLevel.currentWeather; LevelWeatherType val = currentWeather; return (val - 2) switch { 3 => false, 0 => false, 2 => false, 1 => false, _ => true, }; } public override void Execute() { Manager.SetAtmosphere(Assets.AtmosphereName.Foggy, state: true); } } internal class GoldenBars : MEvent { public static GoldenBars Instance; public override string Name() { return "GoldenBars"; } public override void Initalize() { //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Expected O, but got Unknown Instance = this; Weight = 1; Descriptions = new List { "블링블링!", "마치 은행을 터는 것 같군요", "이게 행운의 징조이길 바랍니다", "몸무게가 300파운드 이상 늘어날 준비는 되셨나요?" }; ColorHex = "#00FF00"; Type = EventType.VeryGood; EventsToRemove = new List { "RealityShift", "SID" }; scrapTransmutationEvent = new ScrapTransmutationEvent(new Scale(0.5f, 0.008f, 0.5f, 0.9f), new SpawnableItemWithRarity(Assets.GetItem(Assets.ItemName.GoldBar), 100)); ScaleList.Add(ScaleType.ScrapAmount, new Scale(1f, 0.005f, 1f, 1.5f)); } public override bool AddEventIfOnly() { if (!Manager.transmuteScrap) { Manager.transmuteScrap = true; return true; } return false; } public override void Execute() { Manager.scrapAmountMultiplier *= Getf(ScaleType.ScrapAmount); scrapTransmutationEvent.Execute(); } } internal class GoldenFacility : MEvent { public static GoldenFacility Instance; public override string Name() { return "GoldenFacility"; } public override void Initalize() { //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Expected O, but got Unknown //IL_00ad: Unknown result type (might be due to invalid IL or missing references) //IL_00b3: Expected O, but got Unknown //IL_00bd: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Expected O, but got Unknown //IL_00ce: Unknown result type (might be due to invalid IL or missing references) //IL_00d4: Expected O, but got Unknown //IL_00df: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Expected O, but got Unknown //IL_00f0: Unknown result type (might be due to invalid IL or missing references) //IL_00f6: Expected O, but got Unknown //IL_0100: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Expected O, but got Unknown Instance = this; Weight = 2; Descriptions = new List { "고철이 반짝거리네요", "앞에 가치 있는 고철이 있습니다", "이 시설은 노다지군요" }; ColorHex = "#008000"; Type = EventType.Good; EventsToRemove = new List { "RealityShift", "SID" }; scrapTransmutationEvent = new ScrapTransmutationEvent(new Scale(0.5f, 0.008f, 0.5f, 0.9f), new SpawnableItemWithRarity(Assets.GetItem(Assets.ItemName.GoldenCup), 25), new SpawnableItemWithRarity(Assets.GetItem(Assets.ItemName.Ring), 20), new SpawnableItemWithRarity(Assets.GetItem(Assets.ItemName.GoldBar), 1), new SpawnableItemWithRarity(Assets.GetItem(Assets.ItemName.FancyLamp), 10), new SpawnableItemWithRarity(Assets.GetItem(Assets.ItemName.PerfumeBottle), 26), new SpawnableItemWithRarity(Assets.GetItem(Assets.ItemName.Painting), 15), new SpawnableItemWithRarity(Assets.GetItem(Assets.ItemName.CashRegister), 3)); ScaleList.Add(ScaleType.ScrapAmount, new Scale(1f, 0.005f, 1f, 1.5f)); } public override bool AddEventIfOnly() { if (!Manager.transmuteScrap) { Manager.transmuteScrap = true; return true; } return false; } public override void Execute() { Manager.scrapAmountMultiplier *= Getf(ScaleType.ScrapAmount); scrapTransmutationEvent.Execute(); } } internal class GrabbableLandmines : MEvent { public new static bool Active; public static bool LandmineDisabled; public static GrabbableLandmines Instance; public override string Name() { return "GrabbableLandmines"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "지뢰 몇 개가 고철로 변했습니다...", "이건 정말 멋진 생각이었어요", "삐, 삐, 삐.", "이제 지뢰 중 일부를 팔 수 있습니다." }; ColorHex = "#FF0000"; Type = EventType.Bad; ScaleList.Add(ScaleType.Rarity, new Scale(0.33f, 0.0066f, 0.33f, 1f)); ScaleList.Add(ScaleType.MinAmount, new Scale(2f, 0.08f, 2f, 10f)); ScaleList.Add(ScaleType.MaxAmount, new Scale(3f, 0.12f, 3f, 15f)); } public override bool AddEventIfOnly() { return RoundManager.Instance.currentLevel.spawnableMapObjects.ToList().Exists((SpawnableMapObject x) => ((Object)x.prefabToSpawn).name == Assets.ObjectNameList[Assets.ObjectName.Landmine]); } public override void Execute() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Expected O, but got Unknown //IL_0014: Unknown result type (might be due to invalid IL or missing references) //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_002d: Unknown result type (might be due to invalid IL or missing references) //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003b: 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_0049: Unknown result type (might be due to invalid IL or missing references) //IL_0055: Expected O, but got Unknown //IL_006c: 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_0086: 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_0090: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Expected O, but got Unknown Active = true; LandmineDisabled = false; IndoorMapHazard val = new IndoorMapHazard(); val.hazardType = new IndoorMapHazardType { prefabToSpawn = Assets.GetObject(Assets.ObjectName.Landmine), spawnFacingAwayFromWall = true, spawnFacingWall = false, spawnWithBackToWall = false, spawnWithBackFlushAgainstWall = false, requireDistanceBetweenSpawns = false, disallowSpawningNearEntrances = false }; val.numberToSpawn = new AnimationCurve((Keyframe[])(object)new Keyframe[2] { new Keyframe(0f, (float)Get(ScaleType.MinAmount)), new Keyframe(1f, (float)Get(ScaleType.MaxAmount)) }); IndoorMapHazard val2 = val; EventManager.hazards.Add(val2); RoundManager.Instance.currentLevel.indoorMapHazards = CollectionExtensions.AddToArray(RoundManager.Instance.currentLevel.indoorMapHazards, val2); } public override void OnShipLeave() { Active = false; LandmineDisabled = true; } public override void OnGameStart() { Active = false; LandmineDisabled = false; } } internal class GrabbableTurrets : MEvent { public new static bool Active; public static GrabbableTurrets Instance; public override string Name() { return "GrabbableTurrets"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "포탑 몇 개가 고철로 변했습니다...", "이제 포탑 중 일부를 공식적으로 팔 수 있습니다. 즐기세요!", "침입자 방어용 자동 방어 시스템으로 집에 가져가도 되겠네요." }; ColorHex = "#FF0000"; Type = EventType.Bad; ScaleList.Add(ScaleType.Rarity, new Scale(0.33f, 0.0066f, 0.33f, 1f)); ScaleList.Add(ScaleType.MinAmount, new Scale(2f, 0.06f, 2f, 8f)); ScaleList.Add(ScaleType.MaxAmount, new Scale(3f, 0.09f, 3f, 12f)); } public override bool AddEventIfOnly() { return RoundManager.Instance.currentLevel.spawnableMapObjects.ToList().Exists((SpawnableMapObject x) => ((Object)x.prefabToSpawn).name == Assets.ObjectNameList[Assets.ObjectName.Turret]); } public override void Execute() { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Expected O, but got Unknown //IL_000e: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0043: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected O, but got Unknown //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Expected O, but got Unknown Active = true; IndoorMapHazard val = new IndoorMapHazard(); val.hazardType = new IndoorMapHazardType { prefabToSpawn = Assets.GetObject(Assets.ObjectName.Turret), spawnFacingAwayFromWall = true, spawnFacingWall = false, spawnWithBackToWall = false, spawnWithBackFlushAgainstWall = false, requireDistanceBetweenSpawns = false, disallowSpawningNearEntrances = false }; val.numberToSpawn = new AnimationCurve((Keyframe[])(object)new Keyframe[2] { new Keyframe(0f, (float)Get(ScaleType.MinAmount)), new Keyframe(1f, (float)Get(ScaleType.MaxAmount)) }); IndoorMapHazard val2 = val; EventManager.hazards.Add(val2); RoundManager.Instance.currentLevel.indoorMapHazards = CollectionExtensions.AddToArray(RoundManager.Instance.currentLevel.indoorMapHazards, val2); } public override void OnShipLeave() { Active = false; } public override void OnGameStart() { Active = false; } } internal class HeavyRain : MEvent { public static HeavyRain Instance; public override string Name() { return "HeavyRain"; } public override void Initalize() { Instance = this; Weight = 8; Descriptions = new List { "그냥 안에 머무르는 게 낫겠어요", "우산으로도 이건 못 막습니다", "폭풍우가 몰아칩니다!" }; ColorHex = "#FFFFFF"; Type = EventType.Neutral; EventsToRemove = new List { "Raining", "Gloomy" }; } public override void Execute() { Manager.SetAtmosphere(Assets.AtmosphereName.Rainy, state: true); Manager.SetAtmosphere(Assets.AtmosphereName.Flooded, state: true); Manager.SetAtmosphere(Assets.AtmosphereName.Stormy, state: true); } } internal class Hell : MEvent { public static Hell Instance; public static EnemySpawnCycle.SpawnCycle insideHellSpawnCycle; public static EnemySpawnCycle.SpawnCycle outsideHellSpawnCycle; public new static bool Active; public static bool SpawnCycle; private string currentIngameWeather; public override string Name() { return "Hell"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "큰 보상이지만, 그 대가는 무엇일까...", "모든 것 중 최악이군요..", "이 일에는 예수님의 도움이 필요할 겁니다.", "네 목숨을 앗아가기 전에, 내 힘이 얼마나 대단한지 보여주지!" }; ColorHex = "#8B008B"; Type = EventType.Insane; EventsToRemove = new List { "Trees", "LeaflessBrownTrees", "Gloomy", "Raining", "HeavyRain", "Warzone", "EarlyShip", "LateShip", "VeryEarlyShip", "VeryLateShip", "MajoraMoon" }; EventsToSpawnWith = new List { "LeaflessTrees", "FacilityGhost", "Spiders", "Thumpers", "Landmines" }; monstersToSpawn = new List { new MonsterEvent(Assets.EnemyName.Bracken, new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(1f, 0f, 1f, 1f), new Scale(2f, 0f, 2f, 2f), new Scale(1f, 0f, 1f, 1f), new Scale(1f, 0f, 1f, 1f)), new MonsterEvent(Assets.antiCoilHead, new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(1f, 0f, 1f, 1f), new Scale(1f, 0f, 1f, 1f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)), new MonsterEvent(Assets.EnemyName.CoilHead, new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(1f, 0f, 1f, 1f), new Scale(1f, 0f, 1f, 1f)), new MonsterEvent(Assets.kamikazieBug, new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(3f, 0f, 3f, 3f), new Scale(3f, 0f, 3f, 3f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)) }; ScaleList.Add(ScaleType.ScrapValue, new Scale(1.75f, 0.0225f, 1.75f, 4f)); ScaleList.Add(ScaleType.ScrapAmount, new Scale(1.75f, 0.0225f, 1.75f, 4f)); ScaleList.Add(ScaleType.SpawnMultiplier, new Scale(1f, 0.02f, 1f, 3f)); ScaleList.Add(ScaleType.FactorySize, new Scale(1.5f, 0.01f, 1.5f, 2.5f)); ScaleList.Add(ScaleType.TimeMin, new Scale(860f, 0f, 860f, 860f)); ScaleList.Add(ScaleType.TimeMax, new Scale(860f, 0f, 860f, 860f)); ScaleList.Add(ScaleType.TimeSettings, new Scale(0.13953489f, 0.13953489f, 0.13953489f, 0.13953489f)); insideHellSpawnCycle = new EnemySpawnCycle.SpawnCycle { nothingWeight = 100f, spawnAttemptInterval = 30f, spawnCycleDuration = 2000f, multiplyBySpawnCurve = false, enemies = new List { new EnemySpawnCycle.EnemySpawnInfo { enemy = Assets.GetEnemy(Assets.EnemyName.SnareFlea).enemyPrefab, enemyWeight = 12f, spawnCap = 5, spawnLocation = EnemySpawnCycle.SpawnLocation.Inside }, new EnemySpawnCycle.EnemySpawnInfo { enemy = Assets.GetEnemy(Assets.EnemyName.BunkerSpider).enemyPrefab, enemyWeight = 18f, spawnCap = 5, spawnLocation = EnemySpawnCycle.SpawnLocation.Inside }, new EnemySpawnCycle.EnemySpawnInfo { enemy = Assets.GetEnemy(Assets.EnemyName.HoardingBug).enemyPrefab, enemyWeight = 12f, spawnCap = 5, spawnLocation = EnemySpawnCycle.SpawnLocation.Inside }, new EnemySpawnCycle.EnemySpawnInfo { enemy = Assets.GetEnemy(Assets.EnemyName.Bracken).enemyPrefab, enemyWeight = 35f, spawnCap = 10, spawnLocation = EnemySpawnCycle.SpawnLocation.Inside }, new EnemySpawnCycle.EnemySpawnInfo { enemy = Assets.GetEnemy(Assets.EnemyName.Thumper).enemyPrefab, enemyWeight = 24f, spawnCap = 5, spawnLocation = EnemySpawnCycle.SpawnLocation.Inside }, new EnemySpawnCycle.EnemySpawnInfo { enemy = Assets.GetEnemy(Assets.EnemyName.Hygrodere).enemyPrefab, enemyWeight = 2f, spawnCap = 5, spawnLocation = EnemySpawnCycle.SpawnLocation.Inside }, new EnemySpawnCycle.EnemySpawnInfo { enemy = Assets.GetEnemy(Assets.EnemyName.GhostGirl).enemyPrefab, enemyWeight = 60f, spawnCap = 20, spawnLocation = EnemySpawnCycle.SpawnLocation.Inside }, new EnemySpawnCycle.EnemySpawnInfo { enemy = Assets.GetEnemy(Assets.EnemyName.NutCracker).enemyPrefab, enemyWeight = 40f, spawnCap = 10, spawnLocation = EnemySpawnCycle.SpawnLocation.Inside }, new EnemySpawnCycle.EnemySpawnInfo { enemy = Assets.GetEnemy(Assets.EnemyName.CoilHead).enemyPrefab, enemyWeight = 30f, spawnCap = 10, spawnLocation = EnemySpawnCycle.SpawnLocation.Inside }, new EnemySpawnCycle.EnemySpawnInfo { enemy = Assets.GetEnemy(Assets.EnemyName.Jester).enemyPrefab, enemyWeight = 10f, spawnCap = 5, spawnLocation = EnemySpawnCycle.SpawnLocation.Inside }, new EnemySpawnCycle.EnemySpawnInfo { enemy = Assets.GetEnemy(Assets.EnemyName.Lasso).enemyPrefab, enemyWeight = 1f, spawnCap = 1, spawnLocation = EnemySpawnCycle.SpawnLocation.Inside }, new EnemySpawnCycle.EnemySpawnInfo { enemy = Assets.GetEnemy(Assets.EnemyName.Masked).enemyPrefab, enemyWeight = 25f, spawnCap = 10, spawnLocation = EnemySpawnCycle.SpawnLocation.Inside }, new EnemySpawnCycle.EnemySpawnInfo { enemy = Assets.GetEnemy(Assets.EnemyName.Butler).enemyPrefab, enemyWeight = 35f, spawnCap = 10, spawnLocation = EnemySpawnCycle.SpawnLocation.Inside }, new EnemySpawnCycle.EnemySpawnInfo { enemy = Assets.GetEnemy(Assets.EnemyName.EyelessDog).enemyPrefab, enemyWeight = 10f, spawnCap = 3, spawnLocation = EnemySpawnCycle.SpawnLocation.Inside }, new EnemySpawnCycle.EnemySpawnInfo { enemy = Assets.nutSlayer.enemyPrefab, enemyWeight = 1f, spawnCap = 1, spawnLocation = EnemySpawnCycle.SpawnLocation.Inside }, new EnemySpawnCycle.EnemySpawnInfo { enemy = Assets.kamikazieBug.enemyPrefab, enemyWeight = 12f, spawnCap = 5, spawnLocation = EnemySpawnCycle.SpawnLocation.Inside }, new EnemySpawnCycle.EnemySpawnInfo { enemy = Assets.antiCoilHead.enemyPrefab, enemyWeight = 15f, spawnCap = 10, spawnLocation = EnemySpawnCycle.SpawnLocation.Inside } } }; outsideHellSpawnCycle = new EnemySpawnCycle.SpawnCycle { nothingWeight = 100f, spawnAttemptInterval = 30f, spawnCycleDuration = 2000f, multiplyBySpawnCurve = false, enemies = new List { new EnemySpawnCycle.EnemySpawnInfo { enemy = Assets.GetEnemy(Assets.EnemyName.EyelessDog).enemyPrefab, enemyWeight = 25f, spawnCap = 15, spawnLocation = EnemySpawnCycle.SpawnLocation.Outside }, new EnemySpawnCycle.EnemySpawnInfo { enemy = Assets.GetEnemy(Assets.EnemyName.ForestKeeper).enemyPrefab, enemyWeight = 15f, spawnCap = 10, spawnLocation = EnemySpawnCycle.SpawnLocation.Outside }, new EnemySpawnCycle.EnemySpawnInfo { enemy = Assets.GetEnemy(Assets.EnemyName.EarthLeviathan).enemyPrefab, enemyWeight = 5f, spawnCap = 5, spawnLocation = EnemySpawnCycle.SpawnLocation.Outside }, new EnemySpawnCycle.EnemySpawnInfo { enemy = Assets.GetEnemy(Assets.EnemyName.OldBird).enemyPrefab, enemyWeight = 5f, spawnCap = 5, spawnLocation = EnemySpawnCycle.SpawnLocation.Outside }, new EnemySpawnCycle.EnemySpawnInfo { enemy = Assets.GetEnemy(Assets.EnemyName.BaboonHawk).enemyPrefab, enemyWeight = 50f, spawnCap = 25, spawnLocation = EnemySpawnCycle.SpawnLocation.Outside }, new EnemySpawnCycle.EnemySpawnInfo { enemy = Assets.GetEnemy(Assets.EnemyName.Bracken).enemyPrefab, enemyWeight = 15f, spawnCap = 5, spawnLocation = EnemySpawnCycle.SpawnLocation.Outside }, new EnemySpawnCycle.EnemySpawnInfo { enemy = Assets.GetEnemy(Assets.EnemyName.Jester).enemyPrefab, enemyWeight = 3f, spawnCap = 1, spawnLocation = EnemySpawnCycle.SpawnLocation.Outside }, new EnemySpawnCycle.EnemySpawnInfo { enemy = Assets.GetEnemy(Assets.EnemyName.NutCracker).enemyPrefab, enemyWeight = 10f, spawnCap = 5, spawnLocation = EnemySpawnCycle.SpawnLocation.Outside }, new EnemySpawnCycle.EnemySpawnInfo { enemy = Assets.GetEnemy(Assets.EnemyName.BunkerSpider).enemyPrefab, enemyWeight = 10f, spawnCap = 3, spawnLocation = EnemySpawnCycle.SpawnLocation.Outside } } }; foreach (EnemyType value in Assets.EnemyList.Values) { if (!((Object)(object)value == (Object)null) && !((Object)(object)value.enemyPrefab == (Object)null) && !value.isDaytimeEnemy && !insideHellSpawnCycle.enemies.Select((EnemySpawnCycle.EnemySpawnInfo x) => ((Object)x.enemy).name).Contains(((Object)value).name)) { if (value.isOutsideEnemy) { outsideHellSpawnCycle.enemies.Add(new EnemySpawnCycle.EnemySpawnInfo { enemy = value.enemyPrefab, enemyWeight = 8f, spawnCap = 2, spawnLocation = EnemySpawnCycle.SpawnLocation.Outside }); } else { insideHellSpawnCycle.enemies.Add(new EnemySpawnCycle.EnemySpawnInfo { enemy = value.enemyPrefab, enemyWeight = 8f, spawnCap = 2, spawnLocation = EnemySpawnCycle.SpawnLocation.Inside }); } } } } public override void Execute() { //IL_0119: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_012f: Unknown result type (might be due to invalid IL or missing references) //IL_0134: Unknown result type (might be due to invalid IL or missing references) //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_0143: Expected O, but got Unknown //IL_015f: 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_0175: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Unknown result type (might be due to invalid IL or missing references) //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0189: Expected O, but got Unknown if (Configuration.enforceEscapeModChecks.Value && !Compatibility.StarLancereNemyEscapePresent) { outsideHellSpawnCycle.enemies.RemoveAll((EnemySpawnCycle.EnemySpawnInfo x) => (Object)(object)x.enemy == (Object)(object)Assets.GetEnemy(Assets.EnemyName.Jester).enemyPrefab); outsideHellSpawnCycle.enemies.RemoveAll((EnemySpawnCycle.EnemySpawnInfo x) => (Object)(object)x.enemy == (Object)(object)Assets.GetEnemy(Assets.EnemyName.Bracken).enemyPrefab); outsideHellSpawnCycle.enemies.RemoveAll((EnemySpawnCycle.EnemySpawnInfo x) => (Object)(object)x.enemy == (Object)(object)Assets.GetEnemy(Assets.EnemyName.BunkerSpider).enemyPrefab); insideHellSpawnCycle.enemies.RemoveAll((EnemySpawnCycle.EnemySpawnInfo x) => (Object)(object)x.enemy == (Object)(object)Assets.GetEnemy(Assets.EnemyName.EyelessDog).enemyPrefab); } currentIngameWeather = ((object)(LevelWeatherType)(ref StartOfRound.Instance.currentLevel.currentWeather)).ToString(); RoundManager.Instance.currentLevel.enemySpawnChanceThroughoutDay = new AnimationCurve((Keyframe[])(object)new Keyframe[2] { new Keyframe(0f, -100f), new Keyframe(1f, -100f) }); RoundManager.Instance.currentLevel.outsideEnemySpawnChanceThroughDay = new AnimationCurve((Keyframe[])(object)new Keyframe[2] { new Keyframe(0f, -100f), new Keyframe(1f, -100f) }); Manager.scrapValueMultiplier *= Getf(ScaleType.ScrapValue); Manager.scrapAmountMultiplier *= Getf(ScaleType.ScrapAmount); Manager.factorySizeMultiplier *= Getf(ScaleType.FactorySize); insideHellSpawnCycle.nothingWeight = 100f / Getf(ScaleType.SpawnMultiplier); outsideHellSpawnCycle.nothingWeight = 100f / Getf(ScaleType.SpawnMultiplier); currentIngameWeather = ((object)(LevelWeatherType)(ref StartOfRound.Instance.currentLevel.currentWeather)).ToString(); if (currentIngameWeather != "Majora Moon") { Net.Instance.MoveTimeServerRpc(Random.Range(Getf(ScaleType.TimeMin), Getf(ScaleType.TimeMax)), Getf(ScaleType.TimeSettings)); } Manager.SetAtmosphere("bloodyrain", state: true); Manager.SetAtmosphere(Assets.AtmosphereNameList[Assets.AtmosphereName.Eclipsed], state: true); ExecuteAllMonsterEvents(); Active = true; SpawnCycle = true; } public override void OnShipLeave() { Active = false; } public override void OnGameStart() { Active = false; } } internal class HigherScrapValue : MEvent { public static HigherScrapValue Instance; public override string Name() { return "HigherScrapValue"; } public override void Initalize() { Instance = this; Weight = 2; Descriptions = new List { "모든 것이 평소보다 조금 더 가치가 있습니다!", "프리미엄 고철", "명품 고철" }; ColorHex = "#008000"; Type = EventType.Good; ScaleList.Add(ScaleType.ScrapValue, new Scale(1.1f, 0.007f, 1.1f, 1.8f)); } public override void Execute() { Manager.scrapValueMultiplier *= Getf(ScaleType.ScrapValue); } } internal class HoardingBugs : MEvent { public static HoardingBugs Instance; public override string Name() { return "HoardingBugs"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "귀엽게 생겼네요.", "두들겨 팰 때가 제맛이죠", "꽤나 무해해 보입니다" }; ColorHex = "#FF0000"; Type = EventType.Bad; EventsToSpawnWith = new List { "ScarceOutsideScrap" }; monstersToSpawn = new List { new MonsterEvent(Assets.EnemyName.HoardingBug, new Scale(10f, 0.4f, 10f, 50f), new Scale(4f, 0.08f, 4f, 12f), new Scale(2f, 0.08f, 2f, 10f), new Scale(3f, 0.12f, 3f, 15f), new Scale(1f, 0.02f, 1f, 3f), new Scale(1f, 0.02f, 1f, 3f)) }; } public override bool AddEventIfOnly() { if (!Manager.transmuteScrap) { Manager.transmuteScrap = true; return true; } return false; } public override void Execute() { if (Configuration.enforceEscapeModChecks.Value && !Compatibility.StarLancereNemyEscapePresent) { Instance.monstersToSpawn[0].minOutside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[0].maxOutside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[0].outsideSpawnRarity = new Scale(0f, 0f, 0f, 0f); } ExecuteAllMonsterEvents(); } } internal class HolidaySeason : MEvent { public static HolidaySeason Instance; public override string Name() { return "HolidaySeason"; } public override void Initalize() { //IL_0207: Unknown result type (might be due to invalid IL or missing references) //IL_020d: Expected O, but got Unknown //IL_0218: Unknown result type (might be due to invalid IL or missing references) //IL_021e: Expected O, but got Unknown Instance = this; Weight = 3; Descriptions = new List { "연말연시 축제 분위기네요", "모든 명절이 모였습니다!", "부활절, 할로윈, 크리스마스가 하루에 다 들어있군요." }; ColorHex = "#FF0000"; Type = EventType.Bad; monstersToSpawn = new List { new MonsterEvent(Assets.EnemyName.NutCracker, new Scale(7f, 0.28f, 7f, 35f), new Scale(2f, 0.08f, 2f, 10f), new Scale(1f, 0.02f, 1f, 3f), new Scale(1f, 0.03f, 1f, 4f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)), new MonsterEvent(Assets.EnemyName.HoardingBug, new Scale(5f, 0.2f, 5f, 25f), new Scale(2f, 0.04f, 2f, 6f), new Scale(1f, 0.04f, 1f, 5f), new Scale(2f, 0.05f, 2f, 7f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)) }; EventsToRemove = new List { "SID", "Trees", "LeaflessTrees", "LeaflessBrownTrees" }; scrapTransmutationEvent = new ScrapTransmutationEvent(new Scale(0.5f, 0.008f, 0.5f, 0.9f), new SpawnableItemWithRarity(Assets.GetItem(Assets.ItemName.EasterEgg), 40), new SpawnableItemWithRarity(Assets.GetItem(Assets.ItemName.Gift), 60)); ScaleList.Add(ScaleType.ScrapAmount, new Scale(1f, 0.005f, 1f, 1.5f)); ScaleList.Add(ScaleType.MinDensity, new Scale(0.0018f, 0f, 0.0018f, 0.0018f)); ScaleList.Add(ScaleType.MaxDensity, new Scale(0.0025f, 0f, 0.0025f, 0.0025f)); } public override bool AddEventIfOnly() { if (!Manager.transmuteScrap) { Manager.transmuteScrap = true; return true; } return false; } public override void Execute() { Manager.scrapAmountMultiplier *= Getf(ScaleType.ScrapAmount); ExecuteAllMonsterEvents(); scrapTransmutationEvent.Execute(); Net.Instance.outsideObjectsToSpawn.Add(new Net.OutsideObjectsToSpawnMethod(Random.Range(Getf(ScaleType.MinDensity), Getf(ScaleType.MaxDensity)), 5)); } } internal class Honk : MEvent { public static Honk Instance; public override string Name() { return "Honk"; } public override void Initalize() { //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Expected O, but got Unknown //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Expected O, but got Unknown Instance = this; Weight = 2; Descriptions = new List { "빵빵!", "난장판이네요", "경적 소리" }; ColorHex = "#008000"; Type = EventType.Good; EventsToRemove = new List { "SID", "RealityShift", "MaskItem" }; scrapTransmutationEvent = new ScrapTransmutationEvent(new Scale(0.5f, 0.008f, 0.5f, 0.9f), new SpawnableItemWithRarity(Assets.GetItem(Assets.ItemName.AirHorn), 50), new SpawnableItemWithRarity(Assets.GetItem(Assets.ItemName.ClownHorn), 50)); ScaleList.Add(ScaleType.ScrapAmount, new Scale(1f, 0.005f, 1f, 1.5f)); } public override bool AddEventIfOnly() { if (!Manager.transmuteScrap) { Manager.transmuteScrap = true; return true; } return false; } public override void Execute() { Manager.scrapAmountMultiplier *= Getf(ScaleType.ScrapAmount); scrapTransmutationEvent.Execute(); } } internal class InsideBees : MEvent { public static InsideBees Instance; public override string Name() { return "InsideBees"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "벌이다!! 잠깐만...", "시설이 윙윙거리는 소리로 가득합니다!", "벌을 '벌'벌 떨며 조심하세요", "내부가 아주 달콤하군요", "벌이 왜 미용실에서 해고당했는지 아세요? '삭발(Buzz cut)'밖에 할 줄 몰랐거든요." }; ColorHex = "#800000"; Type = EventType.VeryBad; EventsToRemove = new List { "Bees" }; monstersToSpawn = new List { new MonsterEvent(Assets.EnemyName.CircuitBee, new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(3f, 0.05f, 2f, 9f), new Scale(4f, 0.084f, 3f, 12f), new Scale(3f, 0.06f, 3f, 9f), new Scale(5f, 0.1f, 5f, 15f)) }; ScaleList.Add(ScaleType.DaytimeEnemyRarity, new Scale(20f, 0.8f, 20f, 100f)); } public override void Execute() { EnemyType enemy = Assets.GetEnemy(Assets.EnemyName.CircuitBee); Manager.AddEnemyToPoolWithRarity(ref RoundManager.Instance.currentLevel.Enemies, enemy, monstersToSpawn[0].insideSpawnRarity.Compute(Type)); Manager.AddEnemyToPoolWithRarity(ref RoundManager.Instance.currentLevel.OutsideEnemies, enemy, monstersToSpawn[0].outsideSpawnRarity.Compute(Type)); Manager.AddEnemyToPoolWithRarity(ref RoundManager.Instance.currentLevel.DaytimeEnemies, enemy, Get(ScaleType.DaytimeEnemyRarity)); Manager.Spawn.InsideEnemies(enemy, Random.Range(monstersToSpawn[0].minInside.Compute(Type), monstersToSpawn[0].maxInside.Compute(Type) + 1), 30f); Manager.Spawn.OutsideEnemies(enemy, Random.Range(monstersToSpawn[0].minOutside.Compute(Type), monstersToSpawn[0].maxOutside.Compute(Type) + 1)); } } public class IsMetal : MEvent { public static IsMetal Instance; public new static bool Active; public override string Name() { return "IsMetal"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "어쩐 일인지 모든 물건이 번개의 영향을 받네요?", "폭풍의 신들에게 저주받았네요!" }; ColorHex = "#FF0000"; Type = EventType.Bad; EventsToRemove = new List { "MetalSwitch", "NotMetal" }; } public override void Execute() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown Net.Instance.SetMetalOnNetServerRpc(active: true); GameObject val = new GameObject("IsMetalObj"); val.AddComponent(); } public override void OnShipLeave() { AllMetalPatches.RestoreOriginalStates(); Active = false; } public override void OnGameStart() { Active = false; } public override void OnLocalDisconnect() { try { AllMetalPatches.RestoreOriginalStates(); } catch (Exception ex) { Debug.LogError((object)("Error restoring original states on disconnect: " + ex.Message)); } } } internal class Jester : MEvent { public static Jester Instance; public override string Name() { return "Jester"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "집에 가고 싶어요", "사랑스럽기도 해라...", "자유로운 영혼(Free Bird)!" }; ColorHex = "#800000"; Type = EventType.VeryBad; monstersToSpawn = new List { new MonsterEvent(Assets.EnemyName.Jester, new Scale(10f, 0.34f, 10f, 50f), new Scale(5f, 0.167f, 5f, 25f), new Scale(2f, 0.03f, 2f, 5f), new Scale(2f, 0.05f, 2f, 7f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0.02f, 0f, 1f)) }; } public override void Execute() { if (Configuration.enforceEscapeModChecks.Value && !Compatibility.StarLancereNemyEscapePresent) { Instance.monstersToSpawn[0].minOutside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[0].maxOutside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[0].outsideSpawnRarity = new Scale(0f, 0f, 0f, 0f); } ExecuteAllMonsterEvents(); } } internal class KamikazieBugs : MEvent { public static KamikazieBugs Instance; public override string Name() { return "KamikazieBugs"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "내가 당신이라면 굳이 쟤들을 화나게 하지 않을 거예요.", "비축 벌레한테 장기가 있다는 사실을 아시나요? 글쎄, 얘들은 장기 대신 '폭탄'을 갖고 있네요...", "이 녀석들의 군단과 마주치길 기원합니다.", "자폭하는 해충들이 시설 내부를 침공했습니다." }; ColorHex = "#FF0000"; Type = EventType.Bad; monstersToSpawn = new List { new MonsterEvent(Assets.kamikazieBug, new Scale(10f, 0.4f, 10f, 50f), new Scale(4f, 0.08f, 4f, 12f), new Scale(2f, 0.08f, 2f, 10f), new Scale(3f, 0.12f, 3f, 15f), new Scale(1f, 0.02f, 1f, 3f), new Scale(1f, 0.02f, 1f, 3f)) }; } public override void Execute() { if (Configuration.enforceEscapeModChecks.Value && !Compatibility.StarLancereNemyEscapePresent) { Instance.monstersToSpawn[0].minOutside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[0].maxOutside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[0].outsideSpawnRarity = new Scale(0f, 0f, 0f, 0f); } ExecuteAllMonsterEvents(); } } internal class KidnapperFox : MEvent { public static KidnapperFox Instance; public new static bool Active; public override string Name() { return "KidnapperFox"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "그가 돌아왔고, 기분이 썩 좋지는 않네요.." }; ColorHex = "#FF0000"; Type = EventType.Bad; monstersToSpawn = new List { new MonsterEvent(Assets.EnemyName.BushWolf, new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(1f, 0f, 1f, 1f), new Scale(1f, 0.1f, 1f, 4f)) }; ScaleList.Add(ScaleType.minMold, new Scale(10f, 1f, 10f, 15f)); ScaleList.Add(ScaleType.maxMold, new Scale(30f, 2f, 30f, 40f)); } public override void Execute() { //IL_00c7: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Expected O, but got Unknown if (Configuration.enforceEscapeModChecks.Value && !Compatibility.StarLancereNemyEscapePresent) { Instance.monstersToSpawn[0].minInside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[0].minInside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[0].insideSpawnRarity = new Scale(0f, 0f, 0f, 0f); } Net.Instance.SaveOriginalMoldPreviousDataServerRpc(); Net.Instance.SetKidnapperFoxNetServerRpc(active: true); GameObject val = new GameObject("KidnapperFoxNet"); val.AddComponent(); Net.Instance.SetMoldServerRpc(canSpawnMold: true, (int)Random.Range(Getf(ScaleType.minMold), Getf(ScaleType.maxMold))); ExecuteAllMonsterEvents(); } public override void OnShipLeave() { RestoreOriginalStates(); Active = false; } public override void OnGameStart() { Active = false; } public override void OnLocalDisconnect() { try { RestoreOriginalStatesOnDisconnect(); } catch (Exception ex) { Debug.LogError((object)("Error restoring original states on disconnect: " + ex.Message)); } } public void RestoreOriginalStates() { SelectableLevel currentLevel = RoundManager.Instance.currentLevel; if ((Object)(object)currentLevel != (Object)null && Manager.originalMoonMoldData.TryGetValue(currentLevel.PlanetName, out var value)) { Log.LogInfo("Resetting the moon mold data for " + currentLevel.PlanetName); (currentLevel.canSpawnMold, currentLevel.moldSpreadIterations) = value; } Manager.originalMoonMoldData.Clear(); } public void RestoreOriginalStatesOnDisconnect() { foreach (KeyValuePair originalMoonMoldDatum in Manager.originalMoonMoldData) { string planetName = originalMoonMoldDatum.Key; (bool, int) value = originalMoonMoldDatum.Value; bool item = value.Item1; int item2 = value.Item2; SelectableLevel val = ((IEnumerable)StartOfRound.Instance.levels).FirstOrDefault((Func)((SelectableLevel l) => l.PlanetName == planetName)); if ((Object)(object)val != (Object)null) { Log.LogInfo("Resetting the moon mold data for " + planetName); val.canSpawnMold = item; val.moldSpreadIterations = item2; } } Manager.originalMoonMoldData.Clear(); } } internal class KiwiBird : MEvent { public static KiwiBird Instance; public override string Name() { return "KiwiBird"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "아침 식사로 계란은 어때요!", "살살 부추기는 중입니다", "그만한 가치가 있을까요?", "거대 키위를 조심하세요", "저 쪼아대는 소리는 뭐죠?", "딱따구리 같긴 한데..." }; ColorHex = "#800000"; Type = EventType.VeryBad; isSpecialEvent = true; isBetaEvent = false; } public override void Execute() { //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_0039: Unknown result type (might be due to invalid IL or missing references) //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_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) GameObject hangarShip = Assets.hangarShip; if ((Object)(object)hangarShip == (Object)null) { return; } try { Vector3 position = hangarShip.transform.position; Vector3 randomNavMeshPositionInRadiusSpherical = RoundManager.Instance.GetRandomNavMeshPositionInRadiusSpherical(position, 170f, default(NavMeshHit)); EnemyType enemy = Assets.GetEnemy(Assets.EnemyName.GiantKiwi); RoundManager.Instance.SpawnEnemyGameObject(randomNavMeshPositionInRadiusSpherical, 0f, 1, enemy); if ((Object)(object)Object.FindObjectOfType() == (Object)null) { Log.LogWarning("A nest was not found. Spawning Next"); GiantKiwiAI val = Object.FindObjectOfType(); try { val.SpawnBirdNest(); return; } catch (Exception ex) { Log.LogError("Error while spawning GiantKiwiAI nest: " + ex.Message); return; } } } catch (Exception ex2) { Log.LogError("Error while spawning GiantKiwiAI: " + ex2.Message); } } } internal class Landmines : MEvent { public static Landmines Instance; public override string Name() { return "Landmines"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "발밑 조심하세요", "이 시설은 함정투성이군요", "지뢰밭입니다, 네", "+지뢰 추가" }; ColorHex = "#FF0000"; Type = EventType.Bad; ScaleList.Add(ScaleType.MinAmount, new Scale(5f, 0.2f, 5f, 25f)); ScaleList.Add(ScaleType.MaxAmount, new Scale(7f, 0.28f, 7f, 35f)); ScaleList.Add(ScaleType.MinPercentSelected, new Scale(0f, 0f, 0f, 0f)); ScaleList.Add(ScaleType.MaxPercentSelected, new Scale(1f, 0f, 1f, 1f)); } public override bool AddEventIfOnly() { return RoundManager.Instance.currentLevel.spawnableMapObjects.ToList().Exists((SpawnableMapObject x) => ((Object)x.prefabToSpawn).name == Assets.ObjectNameList[Assets.ObjectName.Landmine]); } public override void Execute() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0036: 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_0049: Expected O, but got Unknown //IL_0063: 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_0080: Unknown result type (might be due to invalid IL or missing references) //IL_0085: Unknown result type (might be due to invalid IL or missing references) //IL_008a: Unknown result type (might be due to invalid IL or missing references) //IL_0094: Expected O, but got Unknown IndoorMapHazard val = new IndoorMapHazard(); val.hazardType = new IndoorMapHazardType { prefabToSpawn = Assets.GetObject(Assets.ObjectName.Landmine), spawnFacingAwayFromWall = true, spawnFacingWall = false, spawnWithBackToWall = false, spawnWithBackFlushAgainstWall = false, requireDistanceBetweenSpawns = false, disallowSpawningNearEntrances = false }; val.numberToSpawn = new AnimationCurve((Keyframe[])(object)new Keyframe[2] { new Keyframe(Getf(ScaleType.MinPercentSelected), (float)Get(ScaleType.MinAmount)), new Keyframe(Getf(ScaleType.MaxPercentSelected), (float)Get(ScaleType.MaxAmount)) }); IndoorMapHazard val2 = val; EventManager.hazards.Add(val2); RoundManager.Instance.currentLevel.indoorMapHazards = CollectionExtensions.AddToArray(RoundManager.Instance.currentLevel.indoorMapHazards, val2); } } internal class LateShip : MEvent { public static LateShip Instance; private string currentIngameWeather; private string currentSelectableLevel; public override string Name() { return "LateShip"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "함선이 조금 늦게 도착했습니다.", "워프 드라이브 가동 실패!", "예정보다 늦어졌습니다." }; ColorHex = "#FF0000"; Type = EventType.Bad; EventsToRemove = new List { "VeryEarlyShip", "EarlyShip", "VeryLateShip", "Hell", "MajoraMoon" }; ScaleList.Add(ScaleType.TimeMin, new Scale(50f, 1f, 50f, 150f)); ScaleList.Add(ScaleType.TimeMax, new Scale(60f, 1.2f, 60f, 180f)); } public override bool AddEventIfOnly() { currentIngameWeather = ((object)(LevelWeatherType)(ref StartOfRound.Instance.currentLevel.currentWeather)).ToString(); currentSelectableLevel = ((object)(LevelWeatherType)(ref Manager.currentLevel.currentWeather)).ToString(); if (currentIngameWeather == "Majora Moon" || currentSelectableLevel == "Majora Moon") { if (Configuration.ExtraLogging.Value) { Log.LogInfo("Event not added due to Majora Moon weather."); } return false; } return true; } public override void Execute() { Net.Instance.MoveTimeServerRpc(Random.Range(Getf(ScaleType.TimeMin), Getf(ScaleType.TimeMax))); } } internal class LeaflessBrownTrees : MEvent { public static LeaflessBrownTrees Instance; public override string Name() { return "LeaflessBrownTrees"; } public override void Initalize() { Instance = this; Weight = 4; Descriptions = new List { "이 나무들, 좀 으스스하네요", "잎사귀 하나 없는 갈색 나무들", "오케이" }; ColorHex = "#FFFFFF"; Type = EventType.Neutral; EventsToRemove = new List { "Trees", "LeaflessTrees" }; ScaleList.Add(ScaleType.MinDensity, new Scale(0.018f, 0f, 0.018f, 0.018f)); ScaleList.Add(ScaleType.MaxDensity, new Scale(0.025f, 0f, 0.025f, 0.025f)); } public override void Execute() { if (!LeaflessTrees.Instance.Executed && !Trees.Instance.Executed) { Net.Instance.outsideObjectsToSpawn.Add(new Net.OutsideObjectsToSpawnMethod(Random.Range(Getf(ScaleType.MinDensity) * 0.5f, Getf(ScaleType.MaxDensity) * 0.5f), 4)); } } } internal class LeaflessTrees : MEvent { public static LeaflessTrees Instance; public override string Name() { return "LeaflessTrees"; } public override void Initalize() { Instance = this; Weight = 4; Descriptions = new List { "이 나무들은 죽은 것 같네요", "이 나무들도 이제 예전 같지 않군요", "겨울입니다" }; ColorHex = "#FFFFFF"; Type = EventType.Neutral; EventsToRemove = new List { "Trees", "LeaflessBrownTrees" }; ScaleList.Add(ScaleType.MinDensity, new Scale(0.018f, 0f, 0.018f, 0.018f)); ScaleList.Add(ScaleType.MaxDensity, new Scale(0.025f, 0f, 0.025f, 0.025f)); } public override void Execute() { if (!LeaflessBrownTrees.Instance.Executed && !Trees.Instance.Executed) { Net.Instance.outsideObjectsToSpawn.Add(new Net.OutsideObjectsToSpawnMethod(Random.Range(Getf(ScaleType.MinDensity) * 0.25f, Getf(ScaleType.MaxDensity) * 0.25f), 9)); Net.Instance.outsideObjectsToSpawn.Add(new Net.OutsideObjectsToSpawnMethod(Random.Range(Getf(ScaleType.MinDensity) * 0.25f, Getf(ScaleType.MaxDensity) * 0.25f), 10)); } } } internal class LittleGirl : MEvent { public static LittleGirl Instance; public override string Name() { return "LittleGirl"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "그저 당신을 만지고 싶을 뿐이에요", "머리가 터지고 싶나요?", "그저 당신과 놀고 싶을 뿐입니다", "죽은 아이들의 유치원" }; ColorHex = "#800000"; Type = EventType.VeryBad; monstersToSpawn = new List { new MonsterEvent(Assets.EnemyName.GhostGirl, new Scale(20f, 0.8f, 20f, 100f), new Scale(0f, 0f, 0f, 0f), new Scale(3f, 0.06f, 3f, 9f), new Scale(3f, 0.09f, 3f, 12f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)) }; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class Lizard : MEvent { public static Lizard Instance; public override string Name() { return "Lizard"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "안 물어요... 진짜로요", "성가신 녀석들...", "비켜!!!!!!!!", "이 녀석들이 당신에게 방귀를 뀔 텐데, 전혀 유쾌하지 않을 겁니다." }; ColorHex = "#FF0000"; Type = EventType.Bad; monstersToSpawn = new List { new MonsterEvent(Assets.EnemyName.SporeLizard, new Scale(10f, 0.4f, 10f, 50f), new Scale(5f, 0.1f, 5f, 15f), new Scale(1f, 0.02f, 1f, 3f), new Scale(2f, 0.04f, 2f, 6f), new Scale(0f, 0.02f, 0f, 1f), new Scale(0f, 0.03f, 0f, 3f)) }; } public override void Execute() { if (Configuration.enforceEscapeModChecks.Value && !Compatibility.StarLancereNemyEscapePresent) { Instance.monstersToSpawn[0].minOutside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[0].maxOutside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[0].outsideSpawnRarity = new Scale(0f, 0f, 0f, 0f); } ExecuteAllMonsterEvents(); } } internal class LockedDoors : MEvent { public static LockedDoors Instance; public new static bool Active; public override string Name() { return "LockedDoors"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "마치 던전 같네요!", "모든 문을 열어야해요", "열쇠들이 스폰되길 빌어요.." }; ColorHex = "#8B008B"; Type = EventType.Insane; isSpecialEvent = true; isBetaEvent = true; ScaleList.Add(ScaleType.ScrapAmount, new Scale(2.35f, 0.0115f, 2.35f, 3.5f)); } public override bool AddEventIfOnly() { return Assets.ReadSettingEarly(Paths.ConfigPath + "\\BrutalCompanyMinusExtraReborn\\CoreProperties.cfg", "Enable Beta Events?"); } public override void Execute() { //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0067: Expected O, but got Unknown float num = Random.Range(0f, 1f); if (num <= 0.93f) { Manager.scrapAmountMultiplier *= Getf(ScaleType.ScrapAmount); scrapTransmutationEvent = new ScrapTransmutationEvent(new Scale(1f, 1f, 1f, 1f), new SpawnableItemWithRarity(Assets.GetItem("Key"), 100)); scrapTransmutationEvent.Execute(); } Active = true; } public override void OnShipLeave() { Active = false; } public override void OnGameStart() { Active = false; } } [HarmonyPatch] internal class LockedEntrance : MEvent { public static LockedEntrance Instance; public new static bool Active; public override string Name() { return "LockedEntrance"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "정문이 잠겼습니다", "입구가 막혔습니다", "비상구로 갈 시간이네요" }; ColorHex = "#000000"; Type = EventType.VeryBad; isSpecialEvent = true; } public override void Execute() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown Net.Instance.SetEntranceServerRpc(active: true); GameObject val = new GameObject("LockEntranceObject"); val.AddComponent(); } public override void OnShipLeave() { Active = false; } public override void OnGameStart() { Active = false; } public override void OnLocalDisconnect() { } [HarmonyPrefix] [HarmonyPatch(typeof(InteractTrigger), "Interact")] public static bool InterruptEntranceTeleport(Transform playerTransform, InteractTrigger __instance) { if (Active) { PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if ((Object)(object)localPlayerController != (Object)null) { Transform transform = ((Component)__instance).transform; if (((Object)transform).name.Contains("EntranceTeleportA")) { __instance.interactable = false; switch (Random.Range(0, 3)) { case 0: ((TMP_Text)HUDManager.Instance.globalNotificationText).text = "The entrance is locked!"; break; case 1: ((TMP_Text)HUDManager.Instance.globalNotificationText).text = "You can't go through here!"; break; case 2: ((TMP_Text)HUDManager.Instance.globalNotificationText).text = "The door is blocked!"; break; default: ((TMP_Text)HUDManager.Instance.globalNotificationText).text = "DOOR IS LOCKED!!!!"; break; } HUDManager.Instance.globalNotificationAnimator.SetTrigger("TriggerNotif"); HUDManager.Instance.UIAudio.PlayOneShot(HUDManager.Instance.radiationWarningAudio, 1f); return false; } } } return true; } } internal class Locusts : MEvent { public static Locusts Instance; public override string Name() { return "Locusts"; } public override void Initalize() { Instance = this; Weight = 8; Descriptions = new List { "메뚜기 철이 왔습니다", "메뚜기 떼", "공기가 날갯짓 소리로 가득 찹니다." }; ColorHex = "#FFFFFF"; Type = EventType.Neutral; monstersToSpawn = new List { new MonsterEvent(Assets.EnemyName.RoamingLocust, new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(5f, 0f, 5f, 5f), new Scale(8f, 0f, 8f, 8f)) }; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class Masked : MEvent { public static Masked Instance; public override string Name() { return "Masked"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "친구들!!", "새로운 친구들에게 인사하세요", "참 사랑스러운 녀석들이네요", "이 일이 끝나면 불신지옥에 빠질지도 모릅니다", "이 신입은 누구죠???" }; ColorHex = "#FF0000"; Type = EventType.Bad; monstersToSpawn = new List { new MonsterEvent(Assets.EnemyName.Masked, new Scale(10f, 0.4f, 10f, 50f), new Scale(0f, 0f, 0f, 0f), new Scale(1f, 0.03f, 1f, 4f), new Scale(1f, 0.05f, 1f, 6f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)) }; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class MaskItem : MEvent { public static MaskItem Instance; public override string Name() { return "MaskItem"; } public override void Initalize() { //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Expected O, but got Unknown //IL_00ba: Unknown result type (might be due to invalid IL or missing references) //IL_00c0: Expected O, but got Unknown Instance = this; Weight = 2; Descriptions = new List { "웃긴 얼굴들이 사방에 있네요", "쓰지만 않는다면 괜찮아요", "익살스러운 가면들, 코믹한 재미 보장", "이걸로 '그들' 중 하나가 되지만 마세요..." }; ColorHex = "#FFFFFF"; Type = EventType.Neutral; EventsToRemove = new List { "SID", "RealityShift" }; scrapTransmutationEvent = new ScrapTransmutationEvent(new Scale(1f, 0f, 1f, 1f), new SpawnableItemWithRarity(Assets.GetItem(Assets.ItemName.Comedy), 50), new SpawnableItemWithRarity(Assets.GetItem(Assets.ItemName.Tragedy), 50)); ScaleList.Add(ScaleType.ScrapAmount, new Scale(1f, 0.005f, 1f, 1.5f)); } public override bool AddEventIfOnly() { if (!Manager.transmuteScrap) { Manager.transmuteScrap = true; return true; } return false; } public override void Execute() { Manager.scrapAmountMultiplier *= Getf(ScaleType.ScrapAmount); scrapTransmutationEvent.Execute(); } } public class MetalSwitch : MEvent { public static MetalSwitch Instance; public new static bool Active; public override string Name() { return "MetalSwitch"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "번개의 전도 방향이 바뀌었습니다!", "금속 물건은 이제 금속이 아니고, 비금속 물건은 이제 금속이 되었습니다!" }; ColorHex = "#CF9FFF"; Type = EventType.Neutral; EventsToRemove = new List { "IsMetal", "NotMetal" }; } public override void Execute() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown Net.Instance.SetMetalSwitchNetServerRpc(active: true); GameObject val = new GameObject("MetalSwitch"); val.AddComponent(); } public override void OnShipLeave() { AllMetalPatches.RestoreOriginalStates(); Active = false; } public override void OnGameStart() { Active = false; } public override void OnLocalDisconnect() { try { AllMetalPatches.RestoreOriginalStates(); } catch (Exception ex) { Debug.LogError((object)("Error restoring original states on disconnect: " + ex.Message)); } } } internal class Meteors : MEvent { public static Meteors Instance; public override string Name() { return "Meteors"; } public override void Initalize() { Instance = this; Weight = 2; Descriptions = new List { "가끔은 하늘을 올려다보는 것도 나쁘지 않겠네요", "유성우다, 대피하세요!", "낙석이라니... 참 잘 돌아가네요" }; ColorHex = "#FF0000"; Type = EventType.Bad; EventsToRemove = new List { "Raining", "Gloomy", "HeavyRain" }; } public override void Execute() { TimeOfDay.Instance.overrideMeteorChance = 1000; TimeOfDay.Instance.meteorShowerAtTime = 6f; } public override void OnShipLeave() { TimeOfDay.Instance.overrideMeteorChance = -1; TimeOfDay.Instance.meteorShowerAtTime = -1f; } public override void OnGameStart() { TimeOfDay.Instance.overrideMeteorChance = -1; TimeOfDay.Instance.meteorShowerAtTime = -1f; } } internal class MoreExits : MEvent { public static MoreExits Instance; public override string Name() { return "MoreExits"; } public override void Initalize() { Instance = this; Weight = 2; Descriptions = new List { "입구가 더 많아졌어요!", "출구가 더 많아졌어요!", "여긴 어디로 연결되는 거죠?" }; ColorHex = "#008000"; Type = EventType.Good; ScaleList.Add(ScaleType.MinAmount, new Scale(2f, 0.03f, 2f, 5f)); ScaleList.Add(ScaleType.MaxAmount, new Scale(3f, 0.05f, 3f, 8f)); } public override void Execute() { Passage.SpawnBunkerPassage(Random.Range(Get(ScaleType.MinAmount), Get(ScaleType.MaxAmount) + 1)); } } internal class MoreScrap : MEvent { public static MoreScrap Instance; public override string Name() { return "MoreScrap"; } public override void Initalize() { Instance = this; Weight = 2; Descriptions = new List { "시설 내부에 고철이 아주 조금 더 많아졌네요!", "이 시설은 다른 곳보다 생산성이 약간 더 높았습니다.", "고철, 그런데 이제 좀 더 많은." }; ColorHex = "#008000"; Type = EventType.Good; ScaleList.Add(ScaleType.ScrapAmount, new Scale(1.1f, 0.007f, 1.1f, 1.8f)); } public override void Execute() { Manager.scrapAmountMultiplier *= Getf(ScaleType.ScrapAmount); } } internal class NoBaboons : MEvent { public static NoBaboons Instance; public override string Name() { return "NoBaboons"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "패거리 금지", "절도 금지", "이건 이제 제 겁니다" }; ColorHex = "#008000"; Type = EventType.Remove; EventsToRemove = new List { "BaboonHorde", "Hell" }; } public override bool AddEventIfOnly() { return Manager.SpawnExists(Assets.EnemyName.BaboonHawk); } public override void Execute() { Manager.RemoveSpawn(Assets.EnemyName.BaboonHawk); } } internal class NoBirds : MEvent { public static NoBirds Instance; public override string Name() { return "NoBirds"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "새 금지", "짹짹이 금지", "꽃뱀 금지!" }; ColorHex = "#008000"; Type = EventType.Remove; EventsToRemove = new List { "Birds", "Hell", "FlowerSnake" }; } public override bool AddEventIfOnly() { return Manager.SpawnExists(Assets.EnemyName.Manticoil) || Manager.SpawnExists(Assets.EnemyName.FlowerSnake); } public override void Execute() { Manager.RemoveSpawn(Assets.EnemyName.Manticoil); Manager.RemoveSpawn(Assets.EnemyName.FlowerSnake); } } internal class NoBracken : MEvent { public static NoBracken Instance; public override string Name() { return "NoBracken"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "스토커 금지", "척추 교정사 금지", "이제 실종될 일은 없습니다." }; ColorHex = "#008000"; Type = EventType.Remove; EventsToRemove = new List { "Bracken", "Hell" }; } public override bool AddEventIfOnly() { return Manager.SpawnExists(Assets.EnemyName.Bracken); } public override void Execute() { Manager.RemoveSpawn(Assets.EnemyName.Bracken); } } internal class NoButlers : MEvent { public static NoButlers Instance; public override string Name() { return "NoButlers"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "집사 금지", "뽁뽁이 금지", "터뜨리기 금지", "이 시설에는 칼이 부족하네요.", "이 시설은 지저분합니다." }; ColorHex = "#008000"; Type = EventType.Remove; EventsToRemove = new List { "Butlers", "Hell" }; } public override bool AddEventIfOnly() { return Manager.SpawnExists(Assets.EnemyName.Butler); } public override void Execute() { Manager.RemoveSpawn(Assets.EnemyName.Butler); } } internal class NoCoilhead : MEvent { public static NoCoilhead Instance; public override string Name() { return "NoCoilhead"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "오늘은 빤히 쳐다볼 게 없네요", "오늘은 목이 잘릴 일은 없겠군요, 제발요", "이제 스프링은 그만." }; ColorHex = "#008000"; Type = EventType.Remove; EventsToRemove = new List { "Coilhead", "AntiCoilhead", "ToilHead", "Hell" }; } public override bool AddEventIfOnly() { return Manager.SpawnExists(Assets.EnemyName.CoilHead); } public override void Execute() { Manager.RemoveSpawn(Assets.EnemyName.CoilHead); } } internal class NoDogs : MEvent { public static NoDogs Instance; public override string Name() { return "NoDogs"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "짖기 금지", "초대받지 않은 손님 없이 파티를 즐길 수 있습니다", "댕댕이들은 이제 안녕" }; ColorHex = "#008000"; Type = EventType.Remove; EventsToRemove = new List { "Dogs", "Hell", "Shrimp" }; } public override bool AddEventIfOnly() { return Manager.SpawnExists(Assets.EnemyName.EyelessDog) || Manager.SpawnExists("ShrimpEnemy") || Manager.SpawnExists("Football"); } public override void Execute() { Manager.RemoveSpawn(Assets.EnemyName.EyelessDog); Manager.RemoveSpawn("ShrimpEnemy"); Manager.RemoveSpawn("Football"); } } internal class NoGhosts : MEvent { public static NoGhosts Instance; public override string Name() { return "NoGhosts"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "유령 없음", "더 이상의 초자연적 현상은 없습니다", "고스트버스터즈가 이 시설의 유령들을 소탕했습니다." }; ColorHex = "#008000"; Type = EventType.Remove; EventsToRemove = new List { "LittleGirl", "FacilityGhost", "Hell", "Walkers", "Herobrine", "SlenderMan" }; } public override bool AddEventIfOnly() { return Manager.SpawnExists(Assets.EnemyName.GhostGirl) || Manager.SpawnExists("WalkerType") || Manager.SpawnExists("Herobrine") || Manager.SpawnExists("Football"); } public override void Execute() { Manager.RemoveSpawn(Assets.EnemyName.GhostGirl); Manager.RemoveSpawn("WalkerType"); Manager.RemoveSpawn("Herobrine"); Manager.RemoveSpawn("Football"); } } internal class NoGiants : MEvent { public static NoGiants Instance; public override string Name() { return "NoGiants"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "쿵쿵대지 마세요", "에디 홀은 출입 금지입니다", "유아 수준의 지능을 가진 생물은 없길 바랍니다." }; ColorHex = "#008000"; Type = EventType.Remove; EventsToRemove = new List { "ForestGiant", "Hell", "SirenHead", "RollingGiants" }; } public override bool AddEventIfOnly() { return Manager.SpawnExists(Assets.EnemyName.ForestKeeper) || Manager.SpawnExists("PinkGiantObj") || Manager.SpawnExists("RollingGiant_EnemyType") || Manager.SpawnExists("RollingGiant_EnemyType_Outside") || Manager.SpawnExists("RollingGiant_EnemyType_Outside_Daytime") || Manager.SpawnExists("SirenHead"); } public override void Execute() { Manager.RemoveSpawn(Assets.EnemyName.ForestKeeper); Manager.RemoveSpawn("PinkGiantObj"); Manager.RemoveSpawn("RollingGiant_EnemyType"); Manager.RemoveSpawn("RollingGiant_EnemyType_Outside"); Manager.RemoveSpawn("RollingGiant_EnemyType_Outside_Daytime"); Manager.RemoveSpawn("SirenHead"); } } internal class NoHoardingBugs : MEvent { public static NoHoardingBugs Instance; public override string Name() { return "NoHoardingBugs"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "작은 생물들 없음", "귀요미들 없음", "왜 다 사라진 거야? :(" }; ColorHex = "#008000"; Type = EventType.Remove; EventsToRemove = new List { "HoardingBugs", "BugHorde", "KamikazieBugs", "Hell", "HolidaySeason" }; } public override bool AddEventIfOnly() { return Manager.SpawnExists(Assets.EnemyName.HoardingBug); } public override void Execute() { Manager.RemoveSpawn(Assets.EnemyName.HoardingBug); } } internal class NoJester : MEvent { public static NoJester Instance; public override string Name() { return "NoJester"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "더 이상의 제스터는 없습니다", "태엽 감기 금지", "오늘은 집에 안 가셔도 됩니다" }; ColorHex = "#008000"; Type = EventType.Remove; EventsToRemove = new List { "Jester", "Hell" }; } public override bool AddEventIfOnly() { return Manager.SpawnExists(Assets.EnemyName.Jester); } public override void Execute() { Manager.RemoveSpawn(Assets.EnemyName.Jester); } } internal class NoLandmines : MEvent { public static NoLandmines Instance; public override string Name() { return "NoLandmines"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "지뢰 없음", "오늘은 바닥을 경계할 필요가 없겠네요.", "지뢰는 기대하지 마세요" }; ColorHex = "#008000"; Type = EventType.Remove; EventsToRemove = new List { "Landmines", "OutsideLandmines", "Warzone", "GrabbableLandmines", "Hell", "Roomba" }; } public override bool AddEventIfOnly() { return RoundManager.Instance.currentLevel.spawnableMapObjects.ToList().Exists((SpawnableMapObject x) => ((Object)x.prefabToSpawn).name == Assets.ObjectNameList[Assets.ObjectName.Landmine]) || Manager.SpawnExists("Boomba"); } public override void Execute() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Expected O, but got Unknown AnimationCurve numberToSpawn = new AnimationCurve((Keyframe[])(object)new Keyframe[1] { new Keyframe(0f, 0f) }); SpawnableMapObject[] spawnableMapObjects = RoundManager.Instance.currentLevel.spawnableMapObjects; foreach (SpawnableMapObject val in spawnableMapObjects) { if (((Object)val.prefabToSpawn).name == Assets.ObjectNameList[Assets.ObjectName.Landmine]) { val.numberToSpawn = numberToSpawn; } } Manager.RemoveSpawn("Boomba"); } } internal class NoLizards : MEvent { public static NoLizards Instance; public override string Name() { return "NoLizards"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "도마뱀 없음", "이유는 모르겠지만 불사신도 없음", "가스 가스 가스 금지" }; ColorHex = "#008000"; Type = EventType.Remove; EventsToRemove = new List { "Lizard" }; } public override bool AddEventIfOnly() { return Manager.SpawnExists(Assets.EnemyName.SporeLizard); } public override void Execute() { Manager.RemoveSpawn(Assets.EnemyName.SporeLizard); } } internal class NoMasks : MEvent { public static NoMasks Instance; public override string Name() { return "NoMasks"; } public override void Initalize() { Instance = this; EventsToRemove = new List { "Hell", "Masked", "NutSlayer" }; Weight = 1; Descriptions = new List { "친구 없음 :(", "이제 포옹은 그만", "더 이상의 불신지옥은 없습니다" }; ColorHex = "#008000"; Type = EventType.Remove; } public override bool AddEventIfOnly() { return Manager.SpawnExists(Assets.EnemyName.Masked); } public override void Execute() { Manager.RemoveSpawn(Assets.EnemyName.Masked); } } internal class NoNutcracker : MEvent { public static NoNutcracker Instance; public override string Name() { return "NoNutcracker"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "병정이 없네요", "움직이는 걸 허락받았어요", "여기서는 낭심 보호대를 가져올 필요가 없습니다." }; ColorHex = "#008000"; Type = EventType.Remove; EventsToRemove = new List { "Nutcracker", "NutSlayer", "Hell", "HolidaySeason" }; } public override bool AddEventIfOnly() { return Manager.SpawnExists(Assets.EnemyName.NutCracker); } public override void Execute() { Manager.RemoveSpawn(Assets.EnemyName.NutCracker); } } internal class NoOldBird : MEvent { public static NoOldBird Instance; public override string Name() { return "NoOldBird"; } public override void Initalize() { Instance = this; EventsToRemove = new List { "OldBirds", "Hell" }; Weight = 1; Descriptions = new List { "로봇 없음", "미친 어린애들 없음", "거대 살인마는 이제 그만" }; ColorHex = "#008000"; Type = EventType.Remove; } public override bool AddEventIfOnly() { return Manager.SpawnExists(Assets.EnemyName.OldBird); } public override void Execute() { Manager.RemoveSpawn(Assets.EnemyName.OldBird); } } internal class NoSlimes : MEvent { public static NoSlimes Instance; public override string Name() { return "NoSlimes"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "끈적이 없음", "슬라임 없음", "신비로운 힘이 슬라임을 밀어내고 있습니다", "슬라임이 사라지자 이 행성에 평화가 찾아왔습니다." }; ColorHex = "#008000"; Type = EventType.Remove; EventsToRemove = new List { "Slimes", "Hell" }; } public override bool AddEventIfOnly() { return Manager.SpawnExists(Assets.EnemyName.Hygrodere); } public override void Execute() { Manager.RemoveSpawn(Assets.EnemyName.Hygrodere); } } internal class NoSnareFleas : MEvent { public static NoSnareFleas Instance; public override string Name() { return "NoSnareFleas"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "천장 캠핑족 금지!", "머리는 무사할 겁니다, 아마도...", "고급 식사 금지" }; ColorHex = "#008000"; Type = EventType.Remove; EventsToRemove = new List { "SnareFleas", "Worms" }; } public override bool AddEventIfOnly() { return Manager.SpawnExists(Assets.EnemyName.SnareFlea); } public override void Execute() { Manager.RemoveSpawn(Assets.EnemyName.SnareFlea); } } internal class NoSpiders : MEvent { public static NoSpiders Instance; public override string Name() { return "NoSpiders"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "다리 8개 달린 생물 없음", "거미 공포증 주의보 해제", "시설 안에 진공청소기를 들고 올 필요가 없습니다." }; ColorHex = "#008000"; Type = EventType.Remove; EventsToRemove = new List { "Spiders", "Arachnophobia", "Hell", "NutSlayer" }; } public override bool AddEventIfOnly() { return Manager.SpawnExists(Assets.EnemyName.BunkerSpider); } public override void Execute() { Manager.RemoveSpawn(Assets.EnemyName.BunkerSpider); } } internal class NoSpikeTraps : MEvent { public static NoSpikeTraps Instance; public override string Name() { return "NoSpikeTraps"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "가시 금지!", "천장 함정 없음", "돈까스망치 금지" }; ColorHex = "#008000"; Type = EventType.Remove; EventsToRemove = new List { "SpikeTraps", "Hell" }; } public override bool AddEventIfOnly() { return RoundManager.Instance.currentLevel.spawnableMapObjects.ToList().Exists((SpawnableMapObject x) => ((Object)x.prefabToSpawn).name == Assets.ObjectNameList[Assets.ObjectName.SpikeRoofTrap]); } public override void Execute() { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001d: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Expected O, but got Unknown AnimationCurve numberToSpawn = new AnimationCurve((Keyframe[])(object)new Keyframe[1] { new Keyframe(0f, 0f) }); SpawnableMapObject[] spawnableMapObjects = RoundManager.Instance.currentLevel.spawnableMapObjects; foreach (SpawnableMapObject val in spawnableMapObjects) { if (((Object)val.prefabToSpawn).name == Assets.ObjectNameList[Assets.ObjectName.SpikeRoofTrap]) { val.numberToSpawn = numberToSpawn; } } } } internal class Nothing : MEvent { public static Nothing Instance; public override string Name() { return "Nothing"; } public override void Initalize() { Instance = this; Weight = 8; Descriptions = new List { "--없음--", "진짜 아무것도 없음", "와, 정말 아무것도 없네요", "---", "구름들이 행복해 보입니다", "놀랍게도, 아무 일도 일어나지 않았습니다.", "이걸 다행이라고 생각하세요" }; ColorHex = "#FFFFFF"; Type = EventType.Neutral; } } internal class NoThumpers : MEvent { public static NoThumpers Instance; public override string Name() { return "NoThumpers"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "덤퍼 없음", "드리프트 금지", "더 이상 도망칠 필요 없습니다", "상어는 이제 그만", "다리 없는 것들 없음" }; ColorHex = "#008000"; Type = EventType.Remove; EventsToRemove = new List { "Thumpers", "Hell", "NutSlayer" }; } public override bool AddEventIfOnly() { return Manager.SpawnExists(Assets.EnemyName.Thumper); } public override void Execute() { Manager.RemoveSpawn(Assets.EnemyName.Thumper); } } public class NotMetal : MEvent { public static NotMetal Instance; public new static bool Active; public override string Name() { return "NotMetal"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "물건들이 번개의 영향을 받지 않습니다!", "폭풍의 신들에게 축복받았습니다!" }; ColorHex = "#008000"; Type = EventType.Good; EventsToRemove = new List { "MetalSwitch", "IsMetal" }; } public override void Execute() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown Net.Instance.SetMetalOffNetServerRpc(active: true); GameObject val = new GameObject("NotMetal"); val.AddComponent(); } public override void OnShipLeave() { AllMetalPatches.RestoreOriginalStates(); Active = false; } public override void OnGameStart() { Active = false; } public override void OnLocalDisconnect() { try { AllMetalPatches.RestoreOriginalStates(); } catch (Exception ex) { Debug.LogError((object)("Error restoring original states on disconnect: " + ex.Message)); } } } internal class NoTurrets : MEvent { public static NoTurrets Instance; public override string Name() { return "NoTurrets"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "터렛 없음", "더 이상 가정 보안 시스템이 필요 없습니다.", "이 행성은 그 폭정으로부터 안전합니다." }; ColorHex = "#008000"; Type = EventType.Remove; EventsToRemove = new List { "Turrets", "OutsideTurrets", "Warzone", "GrabbableTurrets", "Hell", "MobileTurrets" }; } public override bool AddEventIfOnly() { return RoundManager.Instance.currentLevel.spawnableMapObjects.ToList().Exists((SpawnableMapObject x) => ((Object)x.prefabToSpawn).name == Assets.ObjectNameList[Assets.ObjectName.Turret]); } public override void Execute() { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Expected O, but got Unknown Manager.RemoveSpawn("WalkerTurret"); AnimationCurve numberToSpawn = new AnimationCurve((Keyframe[])(object)new Keyframe[1] { new Keyframe(0f, 0f) }); SpawnableMapObject[] spawnableMapObjects = RoundManager.Instance.currentLevel.spawnableMapObjects; foreach (SpawnableMapObject val in spawnableMapObjects) { if (((Object)val.prefabToSpawn).name == Assets.ObjectNameList[Assets.ObjectName.Turret]) { val.numberToSpawn = numberToSpawn; } } } } internal class NoWorm : MEvent { public static NoWorm Instance; public override string Name() { return "NoWorm"; } public override void Initalize() { Instance = this; EventsToRemove = new List { "Hell", "Worms" }; Weight = 1; Descriptions = new List { "바닥벌레 없음", "레비아탄 없음", "대지는 안전합니다", "별미 없음" }; ColorHex = "#008000"; Type = EventType.Remove; } public override bool AddEventIfOnly() { return Manager.SpawnExists(Assets.EnemyName.EarthLeviathan); } public override void Execute() { Manager.RemoveSpawn(Assets.EnemyName.EarthLeviathan); } } internal class Nutcracker : MEvent { public static Nutcracker Instance; public override string Name() { return "Nutcracker"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "이 시설은 무장 상태입니다.", "낭심 가리개를 챙겨오는 게 좋을 겁니다", "움직여 보시지, 감히..." }; ColorHex = "#800000"; Type = EventType.VeryBad; EventsToSpawnWith = new List { "Turrets" }; monstersToSpawn = new List { new MonsterEvent(Assets.EnemyName.NutCracker, new Scale(33f, 0.66f, 33f, 100f), new Scale(10f, 0.4f, 10f, 50f), new Scale(2f, 0.04f, 2f, 6f), new Scale(3f, 0.06f, 3f, 9f), new Scale(0f, 0.02f, 0f, 1f), new Scale(0f, 0.03f, 0f, 3f)) }; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class NutSlayer : MEvent { public static NutSlayer Instance; public override string Name() { return "NutSlayer"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "호두 살인마가 시설 내부에 있습니다...", "즐거운 시간 되시길", "이 녀석한테 둠(DOOM) 브금을 깔아줘야겠는데.", "신조차 그로부터 당신을 구하지 못할 겁니다." }; ColorHex = "#280000"; Type = EventType.VeryBad; EventsToSpawnWith = new List { "Gloomy", "Thumpers", "Spiders", "Masked" }; EventsToRemove = new List { "HeavyRain", "Raining" }; monstersToSpawn = new List { new MonsterEvent(Assets.nutSlayer, new Scale(1f, 0.04f, 1f, 5f), new Scale(1f, 0.02f, 1f, 3f), new Scale(1f, 0f, 1f, 1f), new Scale(1f, 0f, 1f, 1f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)) }; ScaleList.Add(ScaleType.SpawnMultiplier, new Scale(1.25f, 0.0075f, 1.25f, 2f)); ScaleList.Add(ScaleType.SpawnCapMultiplier, new Scale(1.4f, 0.016f, 1.4f, 3f)); } public override void Execute() { ExecuteAllMonsterEvents(); Manager.MultiplySpawnChance(RoundManager.Instance.currentLevel, Getf(ScaleType.SpawnMultiplier)); Manager.MultiplySpawnCap(Getf(ScaleType.SpawnCapMultiplier)); } } internal class OldBirds : MEvent { public static OldBirds Instance; public override string Name() { return "OldBirds"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "누가 저딴 걸 저기다 뒀어??", "정신 나간 꼬마 녀석들", "번개 맞으면 쟤네도 죽나?" }; ColorHex = "#800000"; Type = EventType.VeryBad; EventsToSpawnWith = new List { "Landmines", "OutsideLandmines" }; monstersToSpawn = new List { new MonsterEvent(Assets.EnemyName.OldBird, new Scale(1f, 0.4f, 1f, 5f), new Scale(33f, 0.66f, 33f, 100f), new Scale(1f, 0.02f, 1f, 3f), new Scale(1f, 0.02f, 1f, 3f), new Scale(1f, 0.02f, 1f, 3f), new Scale(2f, 0.04f, 2f, 6f)) }; } public override void Execute() { if (Configuration.enforceEscapeModChecks.Value && !Compatibility.StarLancereNemyEscapePresent) { Instance.monstersToSpawn[0].minInside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[0].maxInside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[0].insideSpawnRarity = new Scale(0f, 0f, 0f, 0f); } ExecuteAllMonsterEvents(); } } internal class OutsideLandmines : MEvent { public static OutsideLandmines Instance; public override string Name() { return "OutsideLandmines"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "외부에 지뢰가 매설되어 있습니다.", "이 시설은 건물 밖에도 자체적인 부비트랩을 설치해 뒀군요.", "발밑 조심하세요... 밖에서도 말이죠", "밖으로 발을 내딛는 순간, 파멸을 맞이할 겁니다!" }; ColorHex = "#FF0000"; Type = EventType.Bad; ScaleList.Add(ScaleType.MinDensity, new Scale(0.003f, 0.00012f, 0.003f, 0.015f)); ScaleList.Add(ScaleType.MaxDensity, new Scale(0.0042f, 0.000168f, 0.0042f, 0.021f)); } public override void Execute() { Manager.insideObjectsToSpawnOutside.Add(new Manager.ObjectInfo(Assets.GetObject(Assets.ObjectName.Landmine), Random.Range(Getf(ScaleType.MinDensity), Getf(ScaleType.MaxDensity)))); } } internal class OutsideTurrets : MEvent { public static OutsideTurrets Instance; public override string Name() { return "OutsideTurrets"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "포탑들이 나무들 사이에 숨어 있습니다...", "총알 세례를 즐기시길 바랍니다", "밖으로 나가기 참 좋은 날이네요." }; ColorHex = "#FF0000"; Type = EventType.Bad; EventsToSpawnWith = new List { "Trees" }; EventsToRemove = new List { "LeaflessBrownTrees", "LeaflessTrees" }; ScaleList.Add(ScaleType.MinDensity, new Scale(0.0008f, 2.4E-05f, 0.0008f, 0.0032f)); ScaleList.Add(ScaleType.MaxDensity, new Scale(0.0012f, 3.6E-05f, 0.0012f, 0.0048f)); } public override void Execute() { Manager.insideObjectsToSpawnOutside.Add(new Manager.ObjectInfo(Assets.GetObject(Assets.ObjectName.Turret), Random.Range(Getf(ScaleType.MinDensity), Getf(ScaleType.MaxDensity)))); } } internal class Pickles : MEvent { public static Pickles Instance; public override string Name() { return "Pickles"; } public override void Initalize() { //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Expected O, but got Unknown Instance = this; Weight = 2; Descriptions = new List { "짭짤한 맛이 나네요...", "할머니가 생각나는 맛입니다", "이 지하실은 정말 거대하군요" }; ColorHex = "#008000"; Type = EventType.Good; EventsToRemove = new List { "SID", "RealityShift" }; scrapTransmutationEvent = new ScrapTransmutationEvent(new Scale(0.5f, 0.008f, 0.5f, 0.9f), new SpawnableItemWithRarity(Assets.GetItem(Assets.ItemName.JarOfPickles), 100)); ScaleList.Add(ScaleType.ScrapAmount, new Scale(1f, 0.005f, 1f, 1.5f)); } public override bool AddEventIfOnly() { if (!Manager.transmuteScrap) { Manager.transmuteScrap = true; return true; } return false; } public override void Execute() { Manager.scrapAmountMultiplier *= Getf(ScaleType.ScrapAmount); scrapTransmutationEvent.Execute(); } } internal class PlasticCup : MEvent { public static PlasticCup Instance; public override string Name() { return "PlasticCup"; } public override void Initalize() { //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown Instance = this; Weight = 3; Descriptions = new List { "컵들... 그게 전부입니다", "플라스틱 컵들" }; ColorHex = "#FFFFFF"; Type = EventType.Neutral; scrapTransmutationEvent = new ScrapTransmutationEvent(new Scale(0.5f, 0.008f, 0.5f, 0.9f), new SpawnableItemWithRarity(Assets.GetItem("PlasticCup"), 95)); EventsToRemove = new List { "SID", "RealityShift", "Pickles", "SussyPaintings", "Dustpans", "Clock", "ControlPad", "ZedDog" }; ScaleList.Add(ScaleType.ScrapAmount, new Scale(1f, 0.005f, 1f, 1.5f)); } public override bool AddEventIfOnly() { if (!Manager.transmuteScrap) { Manager.transmuteScrap = true; return true; } return false; } public override void Execute() { Manager.scrapAmountMultiplier *= Getf(ScaleType.ScrapAmount); scrapTransmutationEvent.Execute(); } } internal class PlentyOutsideScrap : MEvent { public static PlentyOutsideScrap Instance; public override string Name() { return "PlentyOutsideScrap"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "외부에서도 고철을 찾을 수 있습니다.", "이 시설은 폐기물 처리 규정을 전혀 안 지키나 보군요", "와아, 밖에도 고철이 있네요" }; ColorHex = "#00FF00"; Type = EventType.VeryGood; EventsToRemove = new List { "ScarceOutsideScrap" }; ScaleList.Add(ScaleType.MinItemAmount, new Scale(9f, 0.09f, 9f, 18f)); ScaleList.Add(ScaleType.MaxItemAmount, new Scale(12f, 0.12f, 12f, 24f)); } public override void Execute() { Manager.Spawn.OutsideScrap(Random.Range(Get(ScaleType.MinItemAmount), Get(ScaleType.MaxItemAmount) + 1)); } } internal class Puma : MEvent { public static Puma Instance; public override string Name() { return "Puma"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "고양이들", "걔네들은 널 사냥하려고 존재하는 거야...", "퓨마... 브랜드 퓨마 말고." }; ColorHex = "#FF0000"; Type = EventType.Bad; MoonMode = true; Whitelist = new List { "Vow", "March" }; isBetaEvent = true; monstersToSpawn = new List { new MonsterEvent(Assets.EnemyName.Puma, new Scale(0f, 0f, 0f, 0f), new Scale(5f, 0.2f, 5f, 25f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(1f, 0f, 1f, 1f), new Scale(2f, 0.6f, 2f, 6f)) }; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class Raining : MEvent { public static Raining Instance; public override string Name() { return "Raining"; } public override void Initalize() { Instance = this; Weight = 8; Descriptions = new List { "여기는 비가 내리고 있네요", "비...", "아일랜드에서 볼 수 있는 유일한 풍경" }; ColorHex = "#FFFFFF"; Type = EventType.Neutral; } public override bool AddEventIfOnly() { //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0011: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Expected I4, but got Unknown LevelWeatherType currentWeather = RoundManager.Instance.currentLevel.currentWeather; LevelWeatherType val = currentWeather; return (val - 1) switch { 0 => false, 1 => false, 3 => false, _ => true, }; } public override void Execute() { Manager.SetAtmosphere(Assets.AtmosphereName.Rainy, state: true); } } internal class RealityShift : MEvent { public new static bool Active; public static RealityShift Instance; public override string Name() { return "RealityShift"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "현실은 보이는 게 전부가 아닙니다", "고철이 지뢰로 변할지도 모릅니다", "울 준비나 하시는 게 좋을 겁니다", "운이 좋을 수도 있겠네요" }; ColorHex = "#FF0000"; Type = EventType.Bad; } public override void Execute() { Net.Instance.SetRealityShiftActiveServerRpc(state: true); } public override void OnShipLeave() { Net.Instance.SetRealityShiftActiveServerRpc(state: false); } public override void OnGameStart() { Active = false; } } internal class SafeOutside : MEvent { public static SafeOutside Instance; public new static bool Active; public override string Name() { return "SafeOutside"; } public override void Initalize() { Instance = this; EventsToRemove = new List { "NoOldBird", "NoDogs", "NoGiants", "NoBaboons", "NoWorm", "NoMasks", "NoBirds", "Warzone", "OutsideTurrets", "OutsideLandmines", "Masked", "AllWeather" }; Weight = 1; Descriptions = new List { "밖은 안전합니다!", "바깥이 이상할 정도로 조용하네요", "벌이 좀 있을 수도 있지만 그게 전부일 겁니다", "밖을 걷다 보면 자신의 발소리가 메아리치는 게 들릴 정도입니다." }; ColorHex = "#00FF00"; Type = EventType.VeryGood; } public override bool AddEventIfOnly() { return !Compatibility.lethalEscapePresent; } public override void Execute() { Active = true; Manager.RemoveSpawn(Assets.EnemyName.Masked); } public override void OnShipLeave() { Active = false; } public override void OnGameStart() { Active = false; } } internal class ScarceOutsideScrap : MEvent { public static ScarceOutsideScrap Instance; public override string Name() { return "ScarceOutsideScrap"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "외부에 고철이 아주 소량 흩어져 있습니다.", "누군가 여기에 고철들을 버려둔 모양이군요...", "개코원숭이들이 가로채기 전에 얼른 챙기세요" }; ColorHex = "#008000"; Type = EventType.Good; ScaleList.Add(ScaleType.MinItemAmount, new Scale(3f, 0.06f, 3f, 9f)); ScaleList.Add(ScaleType.MaxItemAmount, new Scale(4f, 0.08f, 4f, 12f)); } public override void Execute() { Manager.Spawn.OutsideScrap(Random.Range(Get(ScaleType.MinItemAmount), Get(ScaleType.MaxItemAmount) + 1)); } } internal class ScrapGalore : MEvent { public static ScrapGalore Instance; public override string Name() { return "ScrapGalore"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "이곳의 고철은 양이 풍부하고 품질도 뛰어납니다.", "이 행성은 고철의 축복을 받았군요", "이번 수거가 끝나면 당신은 부자가 될 겁니다" }; ColorHex = "#00FF00"; Type = EventType.VeryGood; ScaleList.Add(ScaleType.ScrapValue, new Scale(1.35f, 0.0115f, 1.35f, 2.5f)); ScaleList.Add(ScaleType.ScrapAmount, new Scale(1.35f, 0.0115f, 1.35f, 2.5f)); EventsToRemove = new List { "HigherScrapValue", "MoreScrap" }; } public override void Execute() { Manager.scrapValueMultiplier *= Getf(ScaleType.ScrapValue); Manager.scrapAmountMultiplier *= Getf(ScaleType.ScrapAmount); } } internal class SeveredBits : MEvent { public static SeveredBits Instance; public override string Name() { return "SeveredBits"; } public override void Initalize() { //IL_009d: Unknown result type (might be due to invalid IL or missing references) //IL_00a3: Expected O, but got Unknown //IL_00ae: Unknown result type (might be due to invalid IL or missing references) //IL_00b4: Expected O, but got Unknown //IL_00bf: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Expected O, but got Unknown //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d6: Expected O, but got Unknown //IL_00e1: Unknown result type (might be due to invalid IL or missing references) //IL_00e7: Expected O, but got Unknown //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00f8: Expected O, but got Unknown //IL_0103: Unknown result type (might be due to invalid IL or missing references) //IL_0109: Expected O, but got Unknown //IL_0114: Unknown result type (might be due to invalid IL or missing references) //IL_011a: Expected O, but got Unknown Instance = this; Weight = 3; Descriptions = new List { "키라 요시카게", "자잘한 모든 조각들", "회사의 취향이 참 독특하군요", "이게 진짜가 아니길 바랍니다" }; ColorHex = "#FFFFFF"; Type = EventType.Neutral; EventsToRemove = new List { "SID" }; scrapTransmutationEvent = new ScrapTransmutationEvent(new Scale(0.5f, 0.008f, 0.5f, 0.9f), new SpawnableItemWithRarity(Assets.GetItem(Assets.ItemName.SeveredBone), 13), new SpawnableItemWithRarity(Assets.GetItem(Assets.ItemName.SeveredBoneRib), 12), new SpawnableItemWithRarity(Assets.GetItem(Assets.ItemName.SeveredEar), 12), new SpawnableItemWithRarity(Assets.GetItem(Assets.ItemName.SeveredFoot), 12), new SpawnableItemWithRarity(Assets.GetItem(Assets.ItemName.SeveredHand), 13), new SpawnableItemWithRarity(Assets.GetItem(Assets.ItemName.SeveredHeart), 13), new SpawnableItemWithRarity(Assets.GetItem(Assets.ItemName.SeveredThigh), 12), new SpawnableItemWithRarity(Assets.GetItem(Assets.ItemName.SeveredTongue), 13)); ScaleList.Add(ScaleType.ScrapAmount, new Scale(1f, 0.005f, 1f, 1.1f)); } public override bool AddEventIfOnly() { if (!Manager.transmuteScrap) { Manager.transmuteScrap = true; return true; } return false; } public override void Execute() { Manager.scrapAmountMultiplier *= Getf(ScaleType.ScrapAmount); scrapTransmutationEvent.Execute(); } } [HarmonyPatch] internal class ShipLightsFailure : MEvent { public static ShipLightsFailure Instance; public override string Name() { return "ShipLightsFailure"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "조명 시스템: 오프라인", "조명이 박살 났습니다!" }; ColorHex = "#FF0000"; Type = EventType.Bad; } public override void Execute() { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Expected O, but got Unknown Net.Instance.LightsOffServerRpc(); Active = true; GameObject val = new GameObject("ShipLightsFailureEvent"); val.AddComponent(); } public override void OnShipLeave() { Net.Instance.LightsOnServerRpc(); } public override void OnLocalDisconnect() { } } internal class ShipmentFees : MEvent { public new static bool Active; public static ShipmentFees Instance; public override string Name() { return "ShipmentFees"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "회사가 이제 배송비를 부과하기 시작했습니다!", "모든 배송물에 세금이 붙을 예정입니다...", "오늘은 아무것도 사지 않는 걸 추천합니다.", "빚더미에 앉을 수도 있으니 조심하세요" }; ColorHex = "#FF0000"; Type = EventType.Bad; ScaleList.Add(ScaleType.MinCut, new Scale(0.2f, 0.004f, 0.2f, 0.6f)); ScaleList.Add(ScaleType.MaxCut, new Scale(0.3f, 0.006f, 0.3f, 0.9f)); } public override void Execute() { Active = true; } public override void OnShipLeave() { Active = false; } public override void OnGameStart() { Active = false; } } internal class SID : MEvent { public static SID Instance; public override string Name() { return "SID"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "하나뿐인 아이템 날", "매우 특별한 하루" }; ColorHex = "#00FFFF"; Type = EventType.Rare; isBetaEvent = true; ScaleList.Add(ScaleType.ScrapValue, new Scale(1.35f, 0.0115f, 1.35f, 2.5f)); ScaleList.Add(ScaleType.ScrapAmount, new Scale(1.35f, 0.0115f, 1.35f, 2.5f)); EventsToRemove = new List { "Clock", "ControlPad", "Dentures", "Dustpans", "FootballScrap", "EasterEggs", "GarbageLid", "GoldenBars", "GoldenFacility", "Honk", "HolidaySeason", "MaskItem", "SeveredBits", "SussyPaintings", "ToiletPaper", "Train", "ZedDog", "CityOfGold", "Bellcrab", "Dice", "BadDice", "TakeyGokuBracken", "TakeyGokuPlush", "TakeyGokuPlushBig", "TakeyPlush", "Pickles" }; } public override void Execute() { //IL_0059: Unknown result type (might be due to invalid IL or missing references) //IL_005f: Expected O, but got Unknown Assets.ItemName[] array = new Assets.ItemName[65] { Assets.ItemName.LargeAxle, Assets.ItemName.V_TypeEngine, Assets.ItemName.PlasticFish, Assets.ItemName.MetalSheet, Assets.ItemName.LaserPointer, Assets.ItemName.BigBolt, Assets.ItemName.Bottles, Assets.ItemName.Ring, Assets.ItemName.SteeringWheel, Assets.ItemName.CookieMoldPan, Assets.ItemName.EggBeater, Assets.ItemName.JarOfPickles, Assets.ItemName.DustPan, Assets.ItemName.AirHorn, Assets.ItemName.ClownHorn, Assets.ItemName.CashRegister, Assets.ItemName.Candy, Assets.ItemName.GoldBar, Assets.ItemName.YieldSign, Assets.ItemName.HomemadeFlashbang, Assets.ItemName.Gift, Assets.ItemName.Flask, Assets.ItemName.ToyCube, Assets.ItemName.Remote, Assets.ItemName.ToyRobot, Assets.ItemName.MagnifyingGlass, Assets.ItemName.StopSign, Assets.ItemName.TeaKettle, Assets.ItemName.Mug, Assets.ItemName.RedSoda, Assets.ItemName.OldPhone, Assets.ItemName.HairDryer, Assets.ItemName.Brush, Assets.ItemName.Bell, Assets.ItemName.WhoopieCushion, Assets.ItemName.Comedy, Assets.ItemName.Tragedy, Assets.ItemName.RubberDucky, Assets.ItemName.ChemicalJug, Assets.ItemName.FancyLamp, Assets.ItemName.GoldenCup, Assets.ItemName.Painting, Assets.ItemName.Toothpaste, Assets.ItemName.PillBottle, Assets.ItemName.PerfumeBottle, Assets.ItemName.Teeth, Assets.ItemName.Magic7Ball, Assets.ItemName.EasterEgg, Assets.ItemName.ToyTrain, Assets.ItemName.ToiletPaper, Assets.ItemName.SoccerBall, Assets.ItemName.PlasticCup, Assets.ItemName.GarbageLid, Assets.ItemName.ControlPad, Assets.ItemName.Clock, Assets.ItemName.ZedDog, Assets.ItemName.BabyKiwiEgg, Assets.ItemName.SeveredThigh, Assets.ItemName.SeveredHand, Assets.ItemName.SeveredEar, Assets.ItemName.SeveredBone, Assets.ItemName.SeveredTongue, Assets.ItemName.SeveredHeart, Assets.ItemName.SeveredFoot, Assets.ItemName.SeveredBoneRib }; Assets.ItemName name = array[new Random(StartOfRound.Instance.randomMapSeed).Next(0, array.Length)]; scrapTransmutationEvent = new ScrapTransmutationEvent(new Scale(1f, 1f, 1f, 1f), new SpawnableItemWithRarity(Assets.GetItem(name), 100)); Manager.scrapValueMultiplier *= Getf(ScaleType.ScrapValue); Manager.scrapAmountMultiplier *= Getf(ScaleType.ScrapAmount); scrapTransmutationEvent.Execute(); } } internal class Slimes : MEvent { public static Slimes Instance; public override string Name() { return "Slimes"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "바닥이 끈적거립니다", "때리지 않으면 정말 느릿느릿하군요", "소스 속에 파묻히지 않게 조심하세요", "대부분은 물과 고통으로 이루어져 있습니다", "액체 괴물" }; ColorHex = "#FF0000"; Type = EventType.Bad; monstersToSpawn = new List { new MonsterEvent(Assets.EnemyName.Hygrodere, new Scale(10f, 0.4f, 10f, 50f), new Scale(5f, 0.2f, 5f, 25f), new Scale(1f, 0.03f, 1f, 4f), new Scale(1f, 0.06f, 1f, 7f), new Scale(1f, 0.02f, 1f, 3f), new Scale(1f, 0.02f, 1f, 3f)) }; } public override void Execute() { Instance.monstersToSpawn[0].minOutside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[0].maxOutside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[0].outsideSpawnRarity = new Scale(0f, 0f, 0f, 0f); ExecuteAllMonsterEvents(); } } internal class SmallDelivery : MEvent { public static SmallDelivery Instance; public override string Name() { return "SmallDelivery"; } public override void Initalize() { Instance = this; Weight = 2; Descriptions = new List { "회사가 당신에게 선물을 주기로 결정했습니다.", "소소한 업무를 위한 소소한 보급품", "축하합니다, 보상이 지급되었습니다." }; ColorHex = "#008000"; Type = EventType.Good; ScaleList.Add(ScaleType.MinItemAmount, new Scale(2f, 0.06f, 2f, 8f)); ScaleList.Add(ScaleType.MaxItemAmount, new Scale(3f, 0.09f, 3f, 12f)); ScaleList.Add(ScaleType.MinValue, new Scale(0f, 0f, 0f, 0f)); ScaleList.Add(ScaleType.MaxValue, new Scale(30f, 2.7f, 30f, 300f)); } public override void Execute() { Manager.DeliverRandomItems(Random.Range(Get(ScaleType.MinItemAmount), Get(ScaleType.MaxItemAmount) + 1), Get(ScaleType.MinValue), Get(ScaleType.MaxValue)); } } internal class SmallerMap : MEvent { public static SmallerMap Instance; public override string Name() { return "SmallerMap"; } public override void Initalize() { Instance = this; Weight = 2; Descriptions = new List { "이 시설은 규모가 작습니다.", "뛰어다니는 시간이 줄어들겠네요", "시설 구조가 훨씬 조밀합니다" }; ColorHex = "#008000"; Type = EventType.Good; ScaleList.Add(ScaleType.FactorySize, new Scale(0.75f, 0f, 0.75f, 0.75f)); } public override void Execute() { SelectableLevel currentLevel = Manager.currentLevel; currentLevel.factorySizeMultiplier *= Getf(ScaleType.FactorySize); } } internal class SnareFleas : MEvent { public static SnareFleas Instance; public override string Name() { return "SnareFleas"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "천장에 캠핑족이 있군요!", "최고의 별미", "가장 기품 있는 생명체", "위만 보세요", "아래만 보세요" }; ColorHex = "#FF0000"; Type = EventType.Bad; monstersToSpawn = new List { new MonsterEvent(Assets.EnemyName.SnareFlea, new Scale(10f, 0.4f, 10f, 50f), new Scale(2f, 0.08f, 2f, 10f), new Scale(1f, 0.05f, 1f, 6f), new Scale(2f, 0.08f, 2f, 10f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)) }; } public override void Execute() { if (Configuration.enforceEscapeModChecks.Value && !Compatibility.StarLancereNemyEscapePresent) { Instance.monstersToSpawn[0].minOutside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[0].maxOutside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[0].outsideSpawnRarity = new Scale(0f, 0f, 0f, 0f); } ExecuteAllMonsterEvents(); } } internal class Spiders : MEvent { public static Spiders Instance; public override string Name() { return "Spiders"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "소름이 돋네요...", "거미 공포증이 있는 분들에겐 비추천입니다", "진공청소기를 챙겨오세요" }; ColorHex = "#FF0000"; Type = EventType.Bad; EventsToRemove = new List { "Trees", "LeaflessTrees" }; EventsToSpawnWith = new List { "LeaflessBrownTrees" }; monstersToSpawn = new List { new MonsterEvent(Assets.EnemyName.BunkerSpider, new Scale(10f, 0.4f, 10f, 50f), new Scale(4f, 0.134f, 4f, 12f), new Scale(1f, 0.04f, 1f, 5f), new Scale(2f, 0.05f, 2f, 7f), new Scale(1f, 0.02f, 1f, 3f), new Scale(1f, 0.02f, 1f, 3f)) }; } public override void Execute() { if (Configuration.enforceEscapeModChecks.Value && !Compatibility.StarLancereNemyEscapePresent) { Instance.monstersToSpawn[0].minOutside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[0].maxOutside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[0].outsideSpawnRarity = new Scale(0f, 0f, 0f, 0f); } ExecuteAllMonsterEvents(); } } internal class SpikeTraps : MEvent { public static SpikeTraps Instance; public override string Name() { return "SpikeTraps"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "가시 함정!!!", "위를 보시는 걸 추천합니다", "유압 프레스!" }; ColorHex = "#FF0000"; Type = EventType.Bad; ScaleList.Add(ScaleType.MinAmount, new Scale(3f, 0.09f, 3f, 12f)); ScaleList.Add(ScaleType.MaxAmount, new Scale(4f, 0.12f, 4f, 16f)); } public override bool AddEventIfOnly() { return RoundManager.Instance.currentLevel.spawnableMapObjects.ToList().Exists((SpawnableMapObject x) => ((Object)x.prefabToSpawn).name == Assets.ObjectNameList[Assets.ObjectName.SpikeRoofTrap]); } public override void Execute() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0063: 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_0072: Expected O, but got Unknown SelectableLevel currentLevel = RoundManager.Instance.currentLevel; SpawnableMapObject[] spawnableMapObjects = RoundManager.Instance.currentLevel.spawnableMapObjects; SpawnableMapObject val = new SpawnableMapObject(); val.prefabToSpawn = Assets.GetObject(Assets.ObjectName.SpikeRoofTrap); val.numberToSpawn = new AnimationCurve((Keyframe[])(object)new Keyframe[2] { new Keyframe(0f, (float)Get(ScaleType.MinAmount)), new Keyframe(1f, (float)Get(ScaleType.MaxAmount)) }); val.spawnFacingAwayFromWall = false; val.spawnFacingWall = true; val.spawnWithBackToWall = true; val.spawnWithBackFlushAgainstWall = true; val.requireDistanceBetweenSpawns = true; val.disallowSpawningNearEntrances = false; currentLevel.spawnableMapObjects = spawnableMapObjects.Add(val); } } internal class Stingray : MEvent { public static Stingray Instance; public override string Name() { return "Stingray"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "끈적끈적 액체!", "끈적끈적한 액체가 당신을 향해 다가오고 있어요!" }; ColorHex = "#FF0000"; Type = EventType.Bad; isBetaEvent = true; monstersToSpawn = new List { new MonsterEvent(Assets.EnemyName.Stingray, new Scale(7f, 1f, 7f, 12f), new Scale(0f, 0f, 0f, 0f), new Scale(1f, 0.44f, 1f, 2f), new Scale(4f, 0.2f, 4f, 9f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)) }; } public override void Execute() { if (Configuration.enforceEscapeModChecks.Value && !Compatibility.StarLancereNemyEscapePresent) { Instance.monstersToSpawn[0].minOutside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[0].maxOutside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[0].outsideSpawnRarity = new Scale(0f, 0f, 0f, 0f); } ExecuteAllMonsterEvents(); } } internal class StrongEnemies : MEvent { public static StrongEnemies Instance; public override string Name() { return "StrongEnemies"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "이곳의 적들은 평소보다 조금 더 끈질깁니다.", "한두 대는 더 때려야 할 겁니다", "괴물들이 약이라도 빤 모양이군요" }; ColorHex = "#FF0000"; Type = EventType.Bad; ScaleList.Add(ScaleType.MinHp, new Scale(1f, 0.03f, 1f, 4f)); ScaleList.Add(ScaleType.MaxHp, new Scale(2f, 0.04f, 2f, 6f)); } public override void Execute() { Manager.AddEnemyHp(Random.Range(Get(ScaleType.MinHp), Get(ScaleType.MaxHp) + 1)); } } internal class SussyPaintings : MEvent { public static SussyPaintings Instance; public override string Name() { return "SussyPaintings"; } public override void Initalize() { //IL_00b7: Unknown result type (might be due to invalid IL or missing references) //IL_00bd: Expected O, but got Unknown Instance = this; Weight = 3; Descriptions = new List { "수상쩍은 그림들뿐이네요", "69 (어머나)" }; ColorHex = "#FFA500"; Type = EventType.Neutral; Aliases = new List { "Paintings", "Painting" }; EventsToRemove = new List { "SID", "RealityShift" }; scrapTransmutationEvent = new ScrapTransmutationEvent(new Scale(0.5f, 0.008f, 0.5f, 0.9f), new SpawnableItemWithRarity(Assets.GetItem("FancyPainting"), 95)); EventsToRemove = new List { "RealityShift", "Pickles", "Dustpans" }; ScaleList.Add(ScaleType.ScrapAmount, new Scale(1f, 0.005f, 1f, 1.5f)); ScaleList.Add(ScaleType.MaxValue, new Scale(30f, 0.1f, 25f, 39f)); } public override bool AddEventIfOnly() { if (!Manager.transmuteScrap) { Manager.transmuteScrap = true; return true; } return false; } public override void Execute() { Manager.scrapAmountMultiplier *= Getf(ScaleType.ScrapAmount); scrapTransmutationEvent.Execute(); } } internal class TeleportIn : MEvent { public static TeleportIn Instance; private float startTime; private bool teleportStarted; public override string Name() { return "TeleportIn"; } public override void Initalize() { Instance = this; Weight = 2; Descriptions = new List { "강제 진입", "돌아오는 길을 찾길 바랍니다...", "갇힌 방에 계신 게 아니길...", "어디 갇혔다고 상상해 보세요..." }; ColorHex = "#800000"; Type = EventType.VeryBad; } public override void Execute() { //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_002e: Expected O, but got Unknown startTime = Time.fixedTime; teleportStarted = false; TimeOfDay.Instance.onTimeSync.AddListener(new UnityAction(teleportTime)); } public override void OnShipLeave() { //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(teleportTime)); teleportStarted = false; startTime = 0f; } public void teleportTime() { //IL_0093: 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_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) if (teleportStarted || !(Time.fixedTime - startTime > 19f)) { return; } Random random = new Random(); teleportStarted = true; GameObject[] allPlayerObjects = StartOfRound.Instance.allPlayerObjects; foreach (GameObject val in allPlayerObjects) { PlayerControllerB component = val.GetComponent(); if ((Object)(object)component != (Object)null && !component.isPlayerDead) { Vector3 position = RoundManager.Instance.insideAINodes[random.Next(RoundManager.Instance.insideAINodes.Length)].transform.position; Net.Instance.TeleportPlayerServerRPC(NetworkObjectReference.op_Implicit(val), position); } } } } internal class Thumpers : MEvent { public static Thumpers Instance; public override string Name() { return "Thumpers"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "당장 뛰어야 합니다", "떠돌이들", "상어다!", "다리가 없군요" }; ColorHex = "#FF0000"; Type = EventType.Bad; monstersToSpawn = new List { new MonsterEvent(Assets.EnemyName.Thumper, new Scale(10f, 0.4f, 10f, 50f), new Scale(5f, 0.1f, 5f, 15f), new Scale(1f, 0.03f, 1f, 4f), new Scale(1f, 0.05f, 1f, 6f), new Scale(0f, 0.0075f, 0f, 1f), new Scale(0f, 0.02f, 0f, 2f)) }; } public override void Execute() { if (Configuration.enforceEscapeModChecks.Value && !Compatibility.StarLancereNemyEscapePresent) { Instance.monstersToSpawn[0].minOutside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[0].maxOutside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[0].outsideSpawnRarity = new Scale(0f, 0f, 0f, 0f); } ExecuteAllMonsterEvents(); } } [HarmonyPatch] internal class TimeChaos : MEvent { public static TimeChaos Instance; public static float timeMultiplier; public override string Name() { return "TimeChaos"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "메이드 인 헤븐", "시간이 완전히 엉망진창입니다!", "하늘을 좀 보세요" }; ColorHex = "#CF9FFF"; Type = EventType.Insane; isSpecialEvent = true; Aliases = new List { "FastDay", "MadeInHeaven" }; EventsToRemove = new List { "VeryEarlyShip", "EarlyShip", "LateShip", "VeryLateShip", "Hell" }; ScaleList.Add(ScaleType.TimeSettings, new Scale(1.0001f, 1E-05f, 1.0001f, 1.001f)); } public override void Execute() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown Active = true; timeMultiplier = Getf(ScaleType.TimeSettings); GameObject val = new GameObject("TimeChaosEvent"); val.AddComponent(); } public override void OnShipLeave() { Active = false; Manager.timeSpeedMultiplier = 1f; } public override void OnGameStart() { Active = false; } } internal class ToiletPaper : MEvent { public static ToiletPaper Instance; public override string Name() { return "ToiletPaper"; } public override void Initalize() { //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown Instance = this; Weight = 2; Descriptions = new List { "저급 종이 뭉치들", "두루마리 휴지 묶음" }; ColorHex = "#e84343"; Type = EventType.Neutral; scrapTransmutationEvent = new ScrapTransmutationEvent(new Scale(0.5f, 0.008f, 0.5f, 0.9f), new SpawnableItemWithRarity(Assets.GetItem("ToiletPaperRolls"), 95)); EventsToRemove = new List { "SID", "RealityShift", "Pickles", "SussyPaintings", "Dustpans", "Clock", "ControlPad", "ZedDog", "PlasticCup" }; ScaleList.Add(ScaleType.ScrapAmount, new Scale(1f, 0.005f, 1f, 1.5f)); } public override bool AddEventIfOnly() { if (!Manager.transmuteScrap) { Manager.transmuteScrap = true; return true; } return false; } public override void Execute() { Manager.scrapAmountMultiplier *= Getf(ScaleType.ScrapAmount); scrapTransmutationEvent.Execute(); } } internal class Train : MEvent { public static Train Instance; public override string Name() { return "Train"; } public override void Initalize() { //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown Instance = this; Weight = 3; Descriptions = new List { "기차가 좋아요", "열차 공장 같군요" }; ColorHex = "#FFFFFF"; Type = EventType.Neutral; scrapTransmutationEvent = new ScrapTransmutationEvent(new Scale(0.5f, 0.008f, 0.5f, 0.9f), new SpawnableItemWithRarity(Assets.GetItem("ToyTrain"), 95)); EventsToRemove = new List { "SID", "RealityShift", "Pickles", "SussyPaintings", "Dustpans", "Clock" }; ScaleList.Add(ScaleType.ScrapAmount, new Scale(1f, 0.005f, 1f, 1.5f)); } public override bool AddEventIfOnly() { if (!Manager.transmuteScrap) { Manager.transmuteScrap = true; return true; } return false; } public override void Execute() { Manager.scrapAmountMultiplier *= Getf(ScaleType.ScrapAmount); scrapTransmutationEvent.Execute(); } } internal class TransmuteScrapBig : MEvent { public static TransmuteScrapBig Instance; public override string Name() { return "TransmuteScrapBig"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "대부분의 고철이 거대한 무언가로 변질되었습니다...", "모든 게 무겁군요...", "수레를 꼭 챙겨오세요!!!", "이번엔 양손을 다 써야 할 겁니다" }; ColorHex = "#800000"; Type = EventType.VeryBad; ScaleList.Add(ScaleType.ScrapAmount, new Scale(1f, 0.005f, 1f, 1.5f)); ScaleList.Add(ScaleType.Percentage, new Scale(0.5f, 0.005f, 0.5f, 0.75f)); EventsToRemove = new List { "SID", "RealityShift" }; } public override bool AddEventIfOnly() { foreach (SpawnableItemWithRarity item in RoundManager.Instance.currentLevel.spawnableScrap) { if (!item.spawnableItem.twoHanded || Manager.transmuteScrap) { continue; } Manager.transmuteScrap = true; return true; } return false; } public override void Execute() { //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown Manager.scrapAmountMultiplier *= Getf(ScaleType.ScrapAmount); SpawnableItemWithRarity chosenScrap = Helper.GetChosenScrap((SpawnableItemWithRarity ss) => ss.spawnableItem.twoHanded); if (chosenScrap != null) { chosenScrap.spawnableItem = Assets.GetItem(((Object)chosenScrap.spawnableItem).name); Manager.TransmuteScrap(Getf(ScaleType.Percentage), new SpawnableItemWithRarity(chosenScrap.spawnableItem, 100)); float num = (float)(chosenScrap.spawnableItem.minValue + chosenScrap.spawnableItem.maxValue) * 0.25f; if (num <= 0f) { num = 40f; } Manager.scrapAmountMultiplier *= Mathf.Clamp(Mathf.Log(Assets.averageScrapValueList[Manager.GetLevelIndex()] / num, 5f) + 1f, 1f, 2f); } } } internal class TransmuteScrapSmall : MEvent { public static TransmuteScrapSmall Instance; public override string Name() { return "TransmuteScrapSmall"; } public override void Initalize() { Instance = this; Weight = 2; Descriptions = new List { "대부분의 고철이 작은 무언가로 변질되었습니다...", "이번엔 한 손으로도 충분하겠군요", "전부 가벼운 물건들뿐입니다" }; ColorHex = "#008000"; Type = EventType.Good; ScaleList.Add(ScaleType.ScrapAmount, new Scale(1f, 0.005f, 1f, 1.5f)); ScaleList.Add(ScaleType.Percentage, new Scale(0.5f, 0.008f, 0.5f, 0.9f)); EventsToRemove = new List { "SID", "RealityShift" }; } public override bool AddEventIfOnly() { foreach (SpawnableItemWithRarity item in RoundManager.Instance.currentLevel.spawnableScrap) { if (item.spawnableItem.twoHanded || Manager.transmuteScrap) { continue; } Manager.transmuteScrap = true; return true; } return false; } public override void Execute() { //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0079: Expected O, but got Unknown Manager.scrapAmountMultiplier *= Getf(ScaleType.ScrapAmount); SpawnableItemWithRarity chosenScrap = Helper.GetChosenScrap((SpawnableItemWithRarity ss) => !ss.spawnableItem.twoHanded); if (chosenScrap != null) { chosenScrap.spawnableItem = Assets.GetItem(((Object)chosenScrap.spawnableItem).name); Manager.TransmuteScrap(Getf(ScaleType.Percentage), new SpawnableItemWithRarity(chosenScrap.spawnableItem, 100)); float num = (float)(chosenScrap.spawnableItem.minValue + chosenScrap.spawnableItem.maxValue) * 0.25f; if (num <= 0f) { num = 40f; } Manager.scrapAmountMultiplier *= Mathf.Clamp(Mathf.Log(Assets.averageScrapValueList[Manager.GetLevelIndex()] / num, 5f) + 1f, 1f, 2f); } } } [HarmonyPatch] internal class TrapsFailure : MEvent { public static TrapsFailure Instance; public override string Name() { return "TrapsFailure"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "고장 난 함정들", "오늘은 함정이 전혀 문제가 되지 않습니다", "함정이 있더라도 오늘은 걱정 마세요!" }; ColorHex = "#00FF00"; Type = EventType.VeryGood; EventsToRemove = new List { "BerserkTurrets" }; } public override void Execute() { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Expected O, but got Unknown GameObject val = new GameObject("TrapsFailureEvent"); val.AddComponent(); } public override void OnShipLeave() { Active = false; } public override void OnGameStart() { Active = false; } public override void OnLocalDisconnect() { } [HarmonyPrefix] [HarmonyPatch(typeof(Landmine), "OnTriggerEnter")] public static bool InterruptLandmine() { if (Instance.Active) { return false; } return true; } [HarmonyPrefix] [HarmonyPatch(typeof(Landmine), "TriggerOtherMineDelayed")] public static bool InterruptLandmineOther() { if (Instance.Active) { return false; } return true; } [HarmonyPrefix] [HarmonyPatch(typeof(Landmine), "OnTriggerExit")] public static bool InterruptLandmineExit() { if (Instance.Active) { return false; } return true; } [HarmonyPrefix] [HarmonyPatch(typeof(Landmine), "Detonate")] public static bool InterruptLandmineAttack() { if (Instance.Active) { return false; } return true; } [HarmonyPrefix] [HarmonyPatch(typeof(Turret), "Update")] public static bool InterruptTurret() { if (Instance.Active) { return false; } return true; } [HarmonyPrefix] [HarmonyPatch(typeof(SpikeRoofTrap), "Update")] public static bool InterruptSpikeRoofTrap() { if (Instance.Active) { return false; } return true; } } internal class Trees : MEvent { public static Trees Instance; public override string Name() { return "Trees"; } public override void Initalize() { Instance = this; Weight = 4; Descriptions = new List { "나무들", "더 많은 나무들", "나무가 나무처럼 생겼군요" }; ColorHex = "#FFFFFF"; Type = EventType.Neutral; EventsToRemove = new List { "LeaflessBrownTrees", "LeaflessTrees" }; ScaleList.Add(ScaleType.MinDensity, new Scale(0.018f, 0f, 0.018f, 0.018f)); ScaleList.Add(ScaleType.MaxDensity, new Scale(0.025f, 0f, 0.025f, 0.025f)); } public override void Execute() { if (!LeaflessTrees.Instance.Executed && !LeaflessBrownTrees.Instance.Executed) { Net.Instance.outsideObjectsToSpawn.Add(new Net.OutsideObjectsToSpawnMethod(Random.Range(Getf(ScaleType.MinDensity) * 0.5f, Getf(ScaleType.MaxDensity) * 0.5f), 8)); } } } internal class Turrets : MEvent { public static Turrets Instance; public override string Name() { return "Turrets"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "포탑이다!!", "집 방범 시스템", "당황해서 비명 지르기", "추가 터렛" }; ColorHex = "#FF0000"; Type = EventType.Bad; ScaleList.Add(ScaleType.MinAmount, new Scale(3f, 0.12f, 3f, 15f)); ScaleList.Add(ScaleType.MaxAmount, new Scale(4f, 0.16f, 4f, 20f)); } public override bool AddEventIfOnly() { return RoundManager.Instance.currentLevel.spawnableMapObjects.ToList().Exists((SpawnableMapObject x) => ((Object)x.prefabToSpawn).name == Assets.ObjectNameList[Assets.ObjectName.Turret]); } public override void Execute() { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Expected O, but got Unknown //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_002f: Unknown result type (might be due to invalid IL or missing references) //IL_0036: 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_0049: Expected O, but got Unknown //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0065: 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_007f: 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_008e: Expected O, but got Unknown IndoorMapHazard val = new IndoorMapHazard(); val.hazardType = new IndoorMapHazardType { prefabToSpawn = Assets.GetObject(Assets.ObjectName.Turret), spawnFacingAwayFromWall = true, spawnFacingWall = false, spawnWithBackToWall = false, spawnWithBackFlushAgainstWall = false, requireDistanceBetweenSpawns = false, disallowSpawningNearEntrances = false }; val.numberToSpawn = new AnimationCurve((Keyframe[])(object)new Keyframe[2] { new Keyframe(0f, (float)Get(ScaleType.MinAmount)), new Keyframe(1f, (float)Get(ScaleType.MaxAmount)) }); IndoorMapHazard val2 = val; EventManager.hazards.Add(val2); RoundManager.Instance.currentLevel.indoorMapHazards = CollectionExtensions.AddToArray(RoundManager.Instance.currentLevel.indoorMapHazards, val2); } } internal class TurretsEverywhere : MEvent { public static TurretsEverywhere Instance; public override string Name() { return "TurretsEverywhere"; } public override void Initalize() { Instance = this; Weight = 2; Descriptions = new List { "외부가 위험합니다", "밖은 온통 포탑뿐입니다" }; ColorHex = "#FF0000"; Type = EventType.Bad; EventsToRemove = new List { "RealityShift", "NoMantitoil", "SafeOutside" }; EventsToSpawnWith = new List { "OutsideTurrets", "Trees", "Mantitoil" }; } public override bool AddEventIfOnly() { return Compatibility.toilheadPresent; } } internal class VeryEarlyShip : MEvent { public static VeryEarlyShip Instance; public override string Name() { return "VeryEarlyShip"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "함선이 아주 적절한 시간에 도착했습니다.", "평소보다 일찍 도착했군요!", "일출 전입니다!" }; ColorHex = "#00FF00"; Type = EventType.VeryGood; EventsToRemove = new List { "LateShip", "EarlyShip", "VeryLateShip", "Hell" }; ScaleList.Add(ScaleType.TimeMin, new Scale(-480f, -0.55f, -480f, -240f)); ScaleList.Add(ScaleType.TimeMax, new Scale(-342f, -0.55f, -342f, -300f)); } public override void Execute() { Net.Instance.MoveTimeServerRpc(Random.Range(Getf(ScaleType.TimeMin), Getf(ScaleType.TimeMax))); } } internal class VeryLateShip : MEvent { public static VeryLateShip Instance; private string currentIngameWeather; private string currentSelectableLevel; public override string Name() { return "VeryLateShip"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "예정보다 한참 늦었습니다.", "퇴근 시간!!", "이제 정말 떠나야 할 것 같군요!" }; ColorHex = "#800000"; Type = EventType.VeryBad; ScaleList.Add(ScaleType.TimeMin, new Scale(780f, 0f, 780f, 780f)); ScaleList.Add(ScaleType.TimeMax, new Scale(860f, 0f, 860f, 860f)); ScaleList.Add(ScaleType.TimeSettings, new Scale(0.13953489f, 0.13953489f, 0.13953489f, 0.13953489f)); EventsToRemove = new List { "VeryEarlyShip", "EarlyShip", "LateShip", "Hell", "MajoraMoon" }; } public override bool AddEventIfOnly() { currentIngameWeather = ((object)(LevelWeatherType)(ref StartOfRound.Instance.currentLevel.currentWeather)).ToString(); currentSelectableLevel = ((object)(LevelWeatherType)(ref Manager.currentLevel.currentWeather)).ToString(); if (currentIngameWeather == "Majora Moon" || currentSelectableLevel == "Majora Moon") { if (Configuration.ExtraLogging.Value) { Log.LogInfo("Event not added due to Majora Moon weather."); } return false; } return true; } public override void Execute() { int num = (int)Random.Range(Getf(ScaleType.TimeMin), Getf(ScaleType.TimeMax)); Net.Instance.MoveTimeServerRpc(num, Getf(ScaleType.TimeSettings)); } } internal class Warzone : MEvent { public new static bool Active; public static Warzone Instance; public override string Name() { return "Warzone"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "지뢰? 포탑? 전부 다 있습니다", "디데이(D-Day)가 왔군요", "폭격 세례를 즐겨보시길" }; ColorHex = "#800000"; Type = EventType.VeryBad; EventsToRemove = new List { "LeaflessBrownTrees", "LeaflessTrees" }; EventsToSpawnWith = new List { "Turrets", "Landmines", "OutsideTurrets", "OutsideLandmines", "Trees" }; } public override bool AddEventIfOnly() { return RoundManager.Instance.currentLevel.spawnableMapObjects.ToList().Exists((SpawnableMapObject x) => ((Object)x.prefabToSpawn).name == Assets.ObjectNameList[Assets.ObjectName.Turret]) || RoundManager.Instance.currentLevel.spawnableMapObjects.ToList().Exists((SpawnableMapObject x) => ((Object)x.prefabToSpawn).name == Assets.ObjectNameList[Assets.ObjectName.Landmine]); } public override void Execute() { Active = true; } public override void OnShipLeave() { Active = false; DDay.DestroyInstance(); } public override void OnGameStart() { Active = false; } } internal class WelcomeToTheFactory : MEvent { public static WelcomeToTheFactory Instance; public override string Name() { return "WelcomeToTheFactory"; } public override void Initalize() { //IL_00a8: Unknown result type (might be due to invalid IL or missing references) //IL_00ae: Expected O, but got Unknown //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_00bf: Expected O, but got Unknown //IL_00c9: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Expected O, but got Unknown //IL_00da: Unknown result type (might be due to invalid IL or missing references) //IL_00e0: Expected O, but got Unknown //IL_00eb: Unknown result type (might be due to invalid IL or missing references) //IL_00f1: Expected O, but got Unknown //IL_00fc: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Expected O, but got Unknown //IL_010d: Unknown result type (might be due to invalid IL or missing references) //IL_0113: Expected O, but got Unknown //IL_011d: Unknown result type (might be due to invalid IL or missing references) //IL_0123: Expected O, but got Unknown //IL_012d: Unknown result type (might be due to invalid IL or missing references) //IL_0133: Expected O, but got Unknown //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0144: Expected O, but got Unknown Instance = this; Weight = 3; Descriptions = new List { "공장에 오신 것을 환영합니다!", "온통 금속뿐인가요??" }; ColorHex = "#FF0000"; Type = EventType.Bad; EventsToSpawnWith = new List { "HeavyRain" }; EventsToRemove = new List { "SID", "RealityShift" }; scrapTransmutationEvent = new ScrapTransmutationEvent(new Scale(0.5f, 0.008f, 0.5f, 0.9f), new SpawnableItemWithRarity(Assets.GetItem(Assets.ItemName.BigBolt), 10), new SpawnableItemWithRarity(Assets.GetItem(Assets.ItemName.CashRegister), 10), new SpawnableItemWithRarity(Assets.GetItem(Assets.ItemName.MetalSheet), 10), new SpawnableItemWithRarity(Assets.GetItem(Assets.ItemName.TeaKettle), 10), new SpawnableItemWithRarity(Assets.GetItem(Assets.ItemName.CookieMoldPan), 10), new SpawnableItemWithRarity(Assets.GetItem(Assets.ItemName.StopSign), 10), new SpawnableItemWithRarity(Assets.GetItem(Assets.ItemName.EggBeater), 10), new SpawnableItemWithRarity(Assets.GetItem(Assets.ItemName.V_TypeEngine), 10), new SpawnableItemWithRarity(Assets.GetItem(Assets.ItemName.LargeAxle), 10), new SpawnableItemWithRarity(Assets.GetItem(Assets.ItemName.SteeringWheel), 10)); ScaleList.Add(ScaleType.ScrapAmount, new Scale(1f, 0.005f, 1f, 1.5f)); } public override bool AddEventIfOnly() { if (!Manager.transmuteScrap) { Manager.transmuteScrap = true; return true; } return false; } public override void Execute() { Manager.scrapAmountMultiplier *= Getf(ScaleType.ScrapAmount); scrapTransmutationEvent.Execute(); } } internal class Worms : MEvent { public static Worms Instance; public override string Name() { return "Worms"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "벌레 침입 감지", "궁극의 파인 다이닝 경험", "그것들이랑 입 맞추지 마세요" }; ColorHex = "#800000"; Type = EventType.VeryBad; EventsToRemove = new List { "SnareFleas" }; monstersToSpawn = new List { new MonsterEvent(Assets.EnemyName.EarthLeviathan, new Scale(2f, 0.08f, 2f, 10f), new Scale(33f, 0.66f, 33f, 100f), new Scale(1f, 0f, 1f, 1f), new Scale(1f, 0f, 1f, 1f), new Scale(1f, 0.02f, 1f, 3f), new Scale(1f, 0.02f, 1f, 3f)), new MonsterEvent(Assets.EnemyName.SnareFlea, new Scale(20f, 0.8f, 20f, 100f), new Scale(0f, 0f, 0f, 0f), new Scale(9f, 0.14f, 9f, 31f), new Scale(10f, 0.2f, 10f, 30f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)) }; } public override void Execute() { if (Configuration.enforceEscapeModChecks.Value && !Compatibility.StarLancereNemyEscapePresent) { Instance.monstersToSpawn[0].minInside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[0].maxInside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[0].insideSpawnRarity = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[1].minOutside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[1].maxOutside = new Scale(0f, 0f, 0f, 0f); Instance.monstersToSpawn[1].outsideSpawnRarity = new Scale(0f, 0f, 0f, 0f); } ExecuteAllMonsterEvents(); } } internal class ZedDog : MEvent { public static ZedDog Instance; public override string Name() { return "ZedDog"; } public override void Initalize() { //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown Instance = this; Weight = 3; Descriptions = new List { "눈 먼 개 봉제인형", "개들이긴 한데... 무해하네요" }; ColorHex = "#008000"; Type = EventType.Good; scrapTransmutationEvent = new ScrapTransmutationEvent(new Scale(0.5f, 0.008f, 0.5f, 0.9f), new SpawnableItemWithRarity(Assets.GetItem("Zeddog"), 95)); EventsToRemove = new List { "SID", "RealityShift", "Pickles", "SussyPaintings", "Dustpans", "Clock", "ControlPad" }; ScaleList.Add(ScaleType.ScrapAmount, new Scale(1f, 0.005f, 1f, 1.5f)); } public override bool AddEventIfOnly() { if (!Manager.transmuteScrap) { Manager.transmuteScrap = true; return true; } return false; } public override void Execute() { Manager.scrapAmountMultiplier *= Getf(ScaleType.ScrapAmount); scrapTransmutationEvent.Execute(); } } internal class AllSlayers : MEvent { public static AllSlayers Instance; public override string Name() { return "AllSlayers"; } public override void Initalize() { Instance = this; Weight = 2; Descriptions = new List { "미니건 좋아하시길 바랍니다, 사방에 깔렸거든요", "맨티슬레이어와 토일슬레이어들.... 행운을 빕니다!" }; ColorHex = "#800000"; Type = EventType.VeryBad; EventsToRemove = new List { "Coilhead", "AntiCoilhead", "ToilHead", "Mantitoil", "ToilSlayer", "MantiToilSlayer", "NoSlayers", "NoMantitoil" }; monstersToSpawn = new List { new MonsterEvent(Assets.EnemyName.Manticoil, new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(5f, 0f, 5f, 5f), new Scale(10f, 0f, 10f, 10f)), new MonsterEvent(Assets.EnemyName.CoilHead, new Scale(30f, 1f, 30f, 90f), new Scale(10f, 0.34f, 10f, 30f), new Scale(1f, 0.034f, 1f, 3f), new Scale(2f, 0.034f, 1f, 4f), new Scale(1f, 1f, 1f, 1f), new Scale(2f, 2f, 2f, 2f)) }; } public override bool AddEventIfOnly() { return Compatibility.toilheadPresent; } public override void Execute() { if (Compatibility.toilheadPresent) { ExecuteAllMonsterEvents(); Api.ForceMantiSlayerMaxSpawnCount = 10; Api.ForceMantiSlayerSpawns = true; Api.ForceToilSlayerSpawns = true; Api.ForceToilSlayerMaxSpawnCount = 25; Api.ForceToilHeadMaxSpawnCount = 0; } } } internal class BadDice : MEvent { public static BadDice Instance; public override string Name() { return "BadDice"; } public override void Initalize() { //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Expected O, but got Unknown //IL_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0097: Expected O, but got Unknown Instance = this; Weight = 2; Descriptions = new List { "최악의 주사위!!!!", "오늘 대박 터지긴 글렀군요", "끔찍한 불운이 당신에게 내려졌습니다!" }; ColorHex = "#800000"; Type = EventType.VeryBad; scrapTransmutationEvent = new ScrapTransmutationEvent(new Scale(0.5f, 0.008f, 0.5f, 0.9f), new SpawnableItemWithRarity(Assets.GetItem("GamblerItem"), 80), new SpawnableItemWithRarity(Assets.GetItem("SacrificerItem"), 20)); EventsToRemove = new List { "SID", "RealityShift" }; ScaleList.Add(ScaleType.ScrapAmount, new Scale(1f, 0.005f, 1f, 1.5f)); } public override bool AddEventIfOnly() { if (!Compatibility.emergencyDicePresent) { return false; } if (!Manager.transmuteScrap) { Manager.transmuteScrap = true; return true; } return false; } public override void Execute() { Manager.scrapAmountMultiplier *= Getf(ScaleType.ScrapAmount); scrapTransmutationEvent.Execute(); } } internal class Baldi : MEvent { public static Baldi Instance; public override string Name() { return "Baldi"; } public override void Initalize() { Instance = this; Weight = 2; Descriptions = new List { "도망칠 수 있을 때 당장 나가세요!!!", "근접 경보: 자(Ruler)가 감지되었습니다.", "찰싹!", "수학 소리가 들려요!" }; ColorHex = "#FF0000"; Type = EventType.Bad; monstersToSpawn = new List { new MonsterEvent("Baldi", new Scale(100f, 0f, 100f, 100f), new Scale(0f, 0f, 0f, 0f), new Scale(1f, 0f, 1f, 1f), new Scale(1f, 0f, 1f, 1f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)) }; } public override bool AddEventIfOnly() { return Compatibility.BaldiPresent; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class Bellcrab : MEvent { public static Bellcrab Instance; public override string Name() { return "Bellcrab"; } public override void Initalize() { Instance = this; Weight = 2; Descriptions = new List { "종소리들.. 그런데 진짜일까요?", "그걸 믿으시나요?", "집히지 않게 조심하세요!" }; ColorHex = "#FF0000"; Type = EventType.Bad; EventsToRemove = new List { "SID" }; monstersToSpawn = new List { new MonsterEvent("BellCrabAsset", new Scale(100f, 0f, 100f, 100f), new Scale(0f, 0f, 0f, 0f), new Scale(1f, 0.09f, 1f, 4f), new Scale(4f, 0.07f, 4f, 10f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)) }; } public override bool AddEventIfOnly() { return Compatibility.SurfacedPresent; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class Bertha : MEvent { public static Bertha Instance; public override string Name() { return "Bertha"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "건드리면 어떻게 될까요?", "네모바지", "할당량에 작별 인사를 하세요", "쾅 하고 터질 겁니다" }; ColorHex = "#800000"; Type = EventType.VeryBad; isBetaEvent = true; ScaleList.Add(ScaleType.MinDensity, new Scale(0.0025f, 0.0001f, 0.004f, 0.0215f)); ScaleList.Add(ScaleType.MaxDensity, new Scale(0.0042f, 0.00148f, 0.0032f, 0.045f)); } public override bool AddEventIfOnly() { return Compatibility.SurfacedPresent; } public override void Execute() { Manager.insideObjectsToSpawnOutside.Add(new Manager.ObjectInfo(Assets.GetObject("Bertha"), Random.Range(Getf(ScaleType.MinDensity), Getf(ScaleType.MaxDensity)))); } } internal class BloodMoon : MEvent { public static BloodMoon Instance; public override string Name() { return "BloodMoon"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "고철을 하나도 못 챙겨오더라도 화내지 않을게요", "무슨 수를 써서라도 괴물들을 피하세요", "지금이 '블러드 문'이라는 사실을 알고 계셨나요?", "왠지 '일식(Eclipsed)'보다 더 최악인 것 같군요", "그 어디도 안전하지 않을 겁니다", "블러드 문을 찬양하라!" }; ColorHex = "#800000"; Type = EventType.VeryBad; EventsToRemove = new List { "Hurricane", "Hallowed", "Forsaken", "SolarFlare", "Windy", "Gloomy", "Raining", "AllWeather", "MajoraMoon" }; } public override bool AddEventIfOnly() { return Compatibility.LegendWeathersPresent && Compatibility.WeatherRegistryPresent; } public override void Execute() { if (Compatibility.LegendWeathersPresent) { CustomWeather.SetCustomWeather("Blood Moon"); } } } internal class CityOfGold : MEvent { public static CityOfGold Instance; public override string Name() { return "CityOfGold"; } public override void Initalize() { //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Expected O, but got Unknown //IL_00b3: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Expected O, but got Unknown //IL_00c6: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Expected O, but got Unknown //IL_00d9: Unknown result type (might be due to invalid IL or missing references) //IL_00df: Expected O, but got Unknown //IL_00ec: Unknown result type (might be due to invalid IL or missing references) //IL_00f2: Expected O, but got Unknown //IL_00ff: Unknown result type (might be due to invalid IL or missing references) //IL_0105: Expected O, but got Unknown //IL_0112: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown //IL_0125: Unknown result type (might be due to invalid IL or missing references) //IL_012b: Expected O, but got Unknown //IL_0138: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Expected O, but got Unknown //IL_014c: Unknown result type (might be due to invalid IL or missing references) //IL_0152: Expected O, but got Unknown //IL_0160: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Expected O, but got Unknown //IL_0174: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Expected O, but got Unknown //IL_0188: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Expected O, but got Unknown //IL_019c: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Expected O, but got Unknown //IL_01b0: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Expected O, but got Unknown //IL_01c4: Unknown result type (might be due to invalid IL or missing references) //IL_01ca: Expected O, but got Unknown //IL_01d8: Unknown result type (might be due to invalid IL or missing references) //IL_01de: Expected O, but got Unknown //IL_01ec: Unknown result type (might be due to invalid IL or missing references) //IL_01f2: Expected O, but got Unknown //IL_0200: Unknown result type (might be due to invalid IL or missing references) //IL_0206: Expected O, but got Unknown //IL_0214: Unknown result type (might be due to invalid IL or missing references) //IL_021a: Expected O, but got Unknown //IL_0228: Unknown result type (might be due to invalid IL or missing references) //IL_022e: Expected O, but got Unknown //IL_023c: Unknown result type (might be due to invalid IL or missing references) //IL_0242: Expected O, but got Unknown //IL_0250: Unknown result type (might be due to invalid IL or missing references) //IL_0256: Expected O, but got Unknown //IL_0264: Unknown result type (might be due to invalid IL or missing references) //IL_026a: Expected O, but got Unknown //IL_0278: Unknown result type (might be due to invalid IL or missing references) //IL_027e: Expected O, but got Unknown //IL_028c: Unknown result type (might be due to invalid IL or missing references) //IL_0292: Expected O, but got Unknown //IL_02a0: Unknown result type (might be due to invalid IL or missing references) //IL_02a6: Expected O, but got Unknown //IL_02b4: Unknown result type (might be due to invalid IL or missing references) //IL_02ba: Expected O, but got Unknown //IL_02c8: Unknown result type (might be due to invalid IL or missing references) //IL_02ce: Expected O, but got Unknown //IL_02dc: Unknown result type (might be due to invalid IL or missing references) //IL_02e2: Expected O, but got Unknown Instance = this; Weight = 2; Descriptions = new List { "모든 게 황금빛입니다!!", "골드 러시!", "숨겨진 황금 더미!" }; ColorHex = "#00FF00"; Type = EventType.VeryGood; EventsToRemove = new List { "SID", "GoldenBars" }; scrapTransmutationEvent = new ScrapTransmutationEvent(new Scale(0.5f, 0.008f, 0.5f, 0.9f), new SpawnableItemWithRarity(Assets.GetItem("GoldenEggbeaterLCGoldScrapMod"), 1), new SpawnableItemWithRarity(Assets.GetItem("GoldMugLCGoldScrapMod"), 1), new SpawnableItemWithRarity(Assets.GetItem("GoldJugLCGoldScrapMod"), 1), new SpawnableItemWithRarity(Assets.GetItem("PurifiedMaskLCGoldScrapMod"), 1), new SpawnableItemWithRarity(Assets.GetItem("GoldenBellLCGoldScrapMod"), 1), new SpawnableItemWithRarity(Assets.GetItem("GoldenHornLCGoldScrapMod"), 1), new SpawnableItemWithRarity(Assets.GetItem("GolderBarLCGoldScrapMod"), 1), new SpawnableItemWithRarity(Assets.GetItem("TalkativeGoldBarLCGoldScrapMod"), 1), new SpawnableItemWithRarity(Assets.GetItem("JacobsLadderLCGoldScrapMod"), 1), new SpawnableItemWithRarity(Assets.GetItem("GoldRegisterLCGoldScrapMod"), 1), new SpawnableItemWithRarity(Assets.GetItem("GoldAxleLCGoldScrapMod"), 1), new SpawnableItemWithRarity(Assets.GetItem("CuddlyGoldLCGoldScrapMod"), 1), new SpawnableItemWithRarity(Assets.GetItem("GoldenGruntLCGoldScrapMod"), 1), new SpawnableItemWithRarity(Assets.GetItem("GoldNuggetGoldScrapShop"), 1), new SpawnableItemWithRarity(Assets.GetItem("TiltControlsLCGoldScrapMod"), 1), new SpawnableItemWithRarity(Assets.GetItem("GoldenGlassLCGoldScrapMod"), 1), new SpawnableItemWithRarity(Assets.GetItem("CookieGoldPanLCGoldScrapMod"), 1), new SpawnableItemWithRarity(Assets.GetItem("GoldSignLCGoldScrapMod"), 1), new SpawnableItemWithRarity(Assets.GetItem("GoldSpringLCGoldScrapMod"), 1), new SpawnableItemWithRarity(Assets.GetItem("GoldkeeperLCGoldScrapMod"), 1), new SpawnableItemWithRarity(Assets.GetItem("GoldenFlaskLCGoldScrapMod"), 1), new SpawnableItemWithRarity(Assets.GetItem("GoldToyRobotLCGoldScrapMod"), 1), new SpawnableItemWithRarity(Assets.GetItem("GoldenBootsLCGoldScrapMod"), 1), new SpawnableItemWithRarity(Assets.GetItem("GoldTypeEngineLCGoldScrapMod"), 1), new SpawnableItemWithRarity(Assets.GetItem("GoldenGuardianLCGoldScrapMod"), 1), new SpawnableItemWithRarity(Assets.GetItem("ComedyGoldLCGoldScrapMod"), 1), new SpawnableItemWithRarity(Assets.GetItem("GoldPuzzleLCGoldScrapMod"), 1), new SpawnableItemWithRarity(Assets.GetItem("GoldBoltLCGoldScrapMod"), 1), new SpawnableItemWithRarity(Assets.GetItem("GoldenAirhornLCGoldScrapMod"), 1), new SpawnableItemWithRarity(Assets.GetItem("DuckOfGoldLCGoldScrapMod"), 1)); EventsToRemove = new List { "RealityShift" }; ScaleList.Add(ScaleType.ScrapAmount, new Scale(1f, 0.005f, 1f, 1.5f)); } public override bool AddEventIfOnly() { if (!Compatibility.goldScrapPresent) { return false; } if (!Manager.transmuteScrap) { Manager.transmuteScrap = true; return true; } return false; } public override void Execute() { Manager.scrapAmountMultiplier *= Getf(ScaleType.ScrapAmount); scrapTransmutationEvent.Execute(); } } internal class Cleaners : MEvent { public static Cleaners Instance; public override string Name() { return "Cleaners"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "해충 박멸", "연기 발생기", "코로나 청정 구역", "청소부들!" }; ColorHex = "#FF0000"; Type = EventType.Bad; monstersToSpawn = new List { new MonsterEvent("EnemyCleaningDrone", new Scale(10f, 0.4f, 10f, 50f), new Scale(5f, 0.1f, 5f, 15f), new Scale(3f, 0.06f, 3f, 9f), new Scale(3f, 0.09f, 3f, 12f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)) }; } public override bool AddEventIfOnly() { return Compatibility.moonsweptPresent; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class Critters : MEvent { public static Critters Instance; public override string Name() { return "Critters"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "그들은 떼로 몰려옵니다", "커다란 미소", "정말 귀엽네요.. 아님 말고?!" }; ColorHex = "#800000"; Type = EventType.VeryBad; monstersToSpawn = new List { new MonsterEvent("KickinRuinedEnemyType", new Scale(45f, 3f, 45f, 90f), new Scale(0f, 0f, 0f, 0f), new Scale(1f, 0.017f, 1f, 2f), new Scale(1f, 0.0045f, 1f, 3f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)), new MonsterEvent("HoppyRuinedEnemyType", new Scale(45f, 3f, 45f, 90f), new Scale(0f, 0f, 0f, 0f), new Scale(1f, 0.017f, 1f, 2f), new Scale(1f, 0.0045f, 1f, 3f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)), new MonsterEvent("BobbyRuinedEnemyType", new Scale(45f, 3f, 45f, 90f), new Scale(0f, 0f, 0f, 0f), new Scale(1f, 0.017f, 1f, 2f), new Scale(1f, 0.0045f, 1f, 3f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)), new MonsterEvent("PickyRuinedEnemyType", new Scale(45f, 3f, 45f, 90f), new Scale(0f, 0f, 0f, 0f), new Scale(1f, 0.017f, 1f, 2f), new Scale(1f, 0.0045f, 1f, 3f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)), new MonsterEvent("BubbaRuinedEnemyType", new Scale(45f, 3f, 45f, 90f), new Scale(0f, 0f, 0f, 0f), new Scale(1f, 0.017f, 1f, 2f), new Scale(1f, 0.0045f, 1f, 3f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)), new MonsterEvent("CraftyRuinedEnemyType", new Scale(45f, 3f, 45f, 90f), new Scale(0f, 0f, 0f, 0f), new Scale(1f, 0.017f, 1f, 2f), new Scale(1f, 0.0045f, 1f, 3f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)), new MonsterEvent("CatnapRuinedEnemyType", new Scale(45f, 3f, 45f, 90f), new Scale(0f, 0f, 0f, 0f), new Scale(1f, 0.017f, 1f, 2f), new Scale(1f, 0.0045f, 1f, 4f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)), new MonsterEvent("DogdayRuinedEnemyType", new Scale(45f, 3f, 45f, 90f), new Scale(0f, 0f, 0f, 0f), new Scale(1f, 0.017f, 1f, 2f), new Scale(1f, 0.0045f, 1f, 3f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)) }; } public override bool AddEventIfOnly() { return Compatibility.CrittersPresent; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class Dice : MEvent { public static Dice Instance; public override string Name() { return "Dice"; } public override void Initalize() { //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Expected O, but got Unknown //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00a2: Expected O, but got Unknown //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Expected O, but got Unknown //IL_00c4: Unknown result type (might be due to invalid IL or missing references) //IL_00ca: Expected O, but got Unknown //IL_00d8: Unknown result type (might be due to invalid IL or missing references) //IL_00de: Expected O, but got Unknown Instance = this; Weight = 2; Descriptions = new List { "주사위!!!!", "도박꾼의 90%가 대박 터지기 직전에 그만둔다는 사실을 알고 계셨나요?", "50 대 50", "의심스러운 운" }; ColorHex = "#008000"; Type = EventType.Good; scrapTransmutationEvent = new ScrapTransmutationEvent(new Scale(0.5f, 0.008f, 0.5f, 0.9f), new SpawnableItemWithRarity(Assets.GetItem("Saint"), 4), new SpawnableItemWithRarity(Assets.GetItem("Chronos"), 10), new SpawnableItemWithRarity(Assets.GetItem("RustyItem"), 45), new SpawnableItemWithRarity(Assets.GetItem("GamblerItem"), 25), new SpawnableItemWithRarity(Assets.GetItem("SacrificerItem"), 16)); EventsToRemove = new List { "SID", "RealityShift" }; ScaleList.Add(ScaleType.ScrapAmount, new Scale(1f, 0.005f, 1f, 1.5f)); } public override bool AddEventIfOnly() { if (!Compatibility.emergencyDicePresent) { return false; } if (!Manager.transmuteScrap) { Manager.transmuteScrap = true; return true; } return false; } public override void Execute() { Manager.scrapAmountMultiplier *= Getf(ScaleType.ScrapAmount); scrapTransmutationEvent.Execute(); } } internal class DoorCircuitFailure : MEvent { public static DoorCircuitFailure Instance; public override string Name() { return "DoorCircuitFailure"; } public override void Initalize() { Instance = this; Weight = 2; Descriptions = new List { "문 제어 회로: 고장", "문 제어 회로 오작동" }; ColorHex = "#FF0000"; Type = EventType.VeryBad; EventsToRemove = new List { "DoorOverdriveEv", "DoorFailure", "ShipCoreFailure" }; } public override bool AddEventIfOnly() { if (Compatibility.crowdControlPresent) { return false; } if (!Compatibility.crowdControlPresent) { return true; } return false; } public override void Execute() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Expected O, but got Unknown Active = true; GameObject val = new GameObject("DoorCircuitFailureEvent"); val.AddComponent(); } public override void OnShipLeave() { Active = false; } public override void OnGameStart() { Active = false; } } internal class DoorFailure : MEvent { public static DoorFailure Instance; public override string Name() { return "DoorFailure"; } public override void Initalize() { Instance = this; Weight = 4; Descriptions = new List { "출입문 시스템: 오류", "출입문 오작동" }; ColorHex = "#FF0000"; Type = EventType.Bad; EventsToRemove = new List { "DoorOverdriveEv", "DoorCircuitFailure" }; } public override void Execute() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Expected O, but got Unknown Active = true; GameObject val = new GameObject("DoorFailureEvent"); val.AddComponent(); } public override void OnShipLeave() { Active = false; } public override void OnGameStart() { Active = false; } } internal class DoorOverdriveEv : MEvent { public static DoorOverdriveEv Instance; public override string Name() { return "DoorOverdriveEv"; } public override void Initalize() { Instance = this; Weight = 2; Descriptions = new List { "출입문 시스템: 과부하", "출입문 과부하" }; ColorHex = "#008000"; Type = EventType.Good; EventsToRemove = new List { "DoorFailure", "ShipCoreFailure" }; } public override void Execute() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Expected O, but got Unknown Active = true; GameObject val = new GameObject("DoorOverdriveEvEvent"); val.AddComponent(); } public override void OnShipLeave() { Active = false; } public override void OnGameStart() { Active = false; } } internal class Dweller : MEvent { public static Dweller Instance; public override string Name() { return "Dweller"; } public override void Initalize() { Instance = this; Weight = 1; Descriptions = new List { "맨이터... 하지만 실외입니다, 행운을 빌어요", "겁먹지 마세요" }; ColorHex = "#800000"; Type = EventType.VeryBad; monstersToSpawn = new List { new MonsterEvent("CaveDweller", new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(1f, 0f, 1f, 1f), new Scale(1f, 0f, 1f, 1f)) }; } public override void Execute() { ExecuteAllMonsterEvents(); } } [HarmonyPatch] internal class FlashLightsFailure : MEvent { public static FlashLightsFailure Instance; public new static bool Active; public override string Name() { return "FlashLightsFailure"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "배터리가 샌 것 같아요", "누가 손전등을 고장 냈나요?" }; ColorHex = "#FF0000"; Type = EventType.Bad; } public override void Execute() { //IL_0019: Unknown result type (might be due to invalid IL or missing references) //IL_001f: Expected O, but got Unknown FlashlightsGoEmptyAtStart(); Net.Instance.SetFlashlightsServerRpc(active: true); GameObject val = new GameObject("FlashlightsFailureObject"); val.AddComponent(); } public override void OnShipLeave() { ChargeUpBatteries(); Active = false; } public override void OnGameStart() { Active = false; } public override void OnLocalDisconnect() { } internal void FlashlightsGoEmptyAtStart() { //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0126: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Expected O, but got Unknown //IL_01cd: Unknown result type (might be due to invalid IL or missing references) //IL_01d7: Expected O, but got Unknown GameObject hangarShip = Assets.hangarShip; if ((Object)(object)hangarShip == (Object)null) { return; } GrabbableObject[] componentsInChildren = hangarShip.GetComponentsInChildren(); GrabbableObject[] array = componentsInChildren; foreach (GrabbableObject val in array) { if (!((Object)(object)val == (Object)null) && (!(val.itemProperties.itemName != "Flashlight") || !(val.itemProperties.itemName != "Pro-flashlight"))) { val.insertedBattery = new Battery(false, 0f); val.SyncBatteryServerRpc(0); } } GameObject cruiser = Assets.cruiser; if ((Object)(object)cruiser != (Object)null) { GrabbableObject[] componentsInChildren2 = cruiser.GetComponentsInChildren(); GrabbableObject[] array2 = componentsInChildren2; foreach (GrabbableObject val2 in array2) { if (!((Object)(object)val2 == (Object)null) && (!(val2.itemProperties.itemName != "Flashlight") || !(val2.itemProperties.itemName != "Pro-flashlight"))) { val2.insertedBattery = new Battery(true, 0f); val2.SyncBatteryServerRpc(0); } } } PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if ((Object)(object)localPlayerController == (Object)null) { return; } GrabbableObject[] itemSlots = localPlayerController.ItemSlots; foreach (GrabbableObject val3 in itemSlots) { if (!((Object)(object)val3 == (Object)null) && (!(val3.itemProperties.itemName != "Flashlight") || !(val3.itemProperties.itemName != "Pro-flashlight"))) { val3.insertedBattery = new Battery(true, 0f); val3.SyncBatteryServerRpc(0); } } } internal void ChargeUpBatteries() { //IL_0082: Unknown result type (might be due to invalid IL or missing references) //IL_008c: Expected O, but got Unknown //IL_0127: Unknown result type (might be due to invalid IL or missing references) //IL_0131: Expected O, but got Unknown //IL_01cf: Unknown result type (might be due to invalid IL or missing references) //IL_01d9: Expected O, but got Unknown GameObject hangarShip = Assets.hangarShip; if ((Object)(object)hangarShip == (Object)null) { return; } GrabbableObject[] componentsInChildren = hangarShip.GetComponentsInChildren(); GrabbableObject[] array = componentsInChildren; foreach (GrabbableObject val in array) { if (!((Object)(object)val == (Object)null) && (!(val.itemProperties.itemName != "Flashlight") || !(val.itemProperties.itemName != "Pro-flashlight"))) { val.insertedBattery = new Battery(false, 1f); val.SyncBatteryServerRpc(100); } } GameObject cruiser = Assets.cruiser; if ((Object)(object)cruiser != (Object)null) { GrabbableObject[] componentsInChildren2 = cruiser.GetComponentsInChildren(); GrabbableObject[] array2 = componentsInChildren2; foreach (GrabbableObject val2 in array2) { if (!((Object)(object)val2 == (Object)null) && (!(val2.itemProperties.itemName != "Flashlight") || !(val2.itemProperties.itemName != "Pro-flashlight"))) { val2.insertedBattery = new Battery(false, 1f); val2.SyncBatteryServerRpc(100); } } } PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if ((Object)(object)localPlayerController == (Object)null) { return; } GrabbableObject[] itemSlots = localPlayerController.ItemSlots; foreach (GrabbableObject val3 in itemSlots) { if (!((Object)(object)val3 == (Object)null) && (!(val3.itemProperties.itemName != "Flashlight") || !(val3.itemProperties.itemName != "Pro-flashlight"))) { val3.insertedBattery = new Battery(false, 1f); val3.SyncBatteryServerRpc(100); } } } [HarmonyPrefix] [HarmonyPatch(typeof(ItemCharger), "ChargeItem")] public static bool InterruptChargeFlashlightItem(ItemCharger __instance) { if (Active) { PlayerControllerB localPlayerController = GameNetworkManager.Instance.localPlayerController; if ((Object)(object)localPlayerController != (Object)null && (Object)(object)localPlayerController.currentlyHeldObjectServer != (Object)null) { GrabbableObject currentlyHeldObjectServer = GameNetworkManager.Instance.localPlayerController.currentlyHeldObjectServer; if (currentlyHeldObjectServer.itemProperties.itemName == "Flashlight" || currentlyHeldObjectServer.itemProperties.itemName == "Pro-flashlight") { __instance.triggerScript.interactable = false; ((TMP_Text)HUDManager.Instance.globalNotificationText).text = "FLASHLIGHT CANNOT BE CHARGED!!!!"; HUDManager.Instance.globalNotificationAnimator.SetTrigger("TriggerNotif"); HUDManager.Instance.UIAudio.PlayOneShot(HUDManager.Instance.radiationWarningAudio, 1f); return false; } } } return true; } [HarmonyPrefix] [HarmonyPatch(typeof(GrabbableObject), "GrabItem")] public static void FlashlightFailureItemGrab(GrabbableObject __instance) { //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Expected O, but got Unknown if (Active && (__instance.itemProperties.itemName == "Flashlight" || __instance.itemProperties.itemName == "Pro-flashlight")) { __instance.insertedBattery = new Battery(false, 0f); __instance.SyncBatteryServerRpc(0); } } } internal class Football : MEvent { public static Football Instance; public override string Name() { return "Football"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "Simon says...", "그냥 그녀가 시키는 대로 하세요", "축구!" }; ColorHex = "#FF0000"; Type = EventType.Bad; monstersToSpawn = new List { new MonsterEvent("Football", new Scale(5f, 0.2f, 5f, 25f), new Scale(2f, 0.08f, 2f, 10f), new Scale(1f, 0.02f, 1f, 3f), new Scale(1f, 0.02f, 1f, 3f), new Scale(0f, 0.0075f, 0f, 1f), new Scale(0f, 0.02f, 0f, 2f)) }; } public override bool AddEventIfOnly() { return Compatibility.footballPresent; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class Forsaken : MEvent { public static Forsaken Instance; public override string Name() { return "Forsaken"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "당신은 변한 모습으로 돌아오게 될 겁니다" }; ColorHex = "#FF0000"; Type = EventType.Bad; EventsToRemove = new List { "Hallowed", "Hurricane", "SolarFlare", "Windy", "Gloomy", "Raining", "AllWeather", "MajoraMoon" }; } public override bool AddEventIfOnly() { if (Compatibility.IsModPresent("mrov.WeatherRegistry") && CustomWeather.isWeatherPresent("Forsaken")) { return true; } return false; } public override void Execute() { if (Compatibility.IsModPresent("mrov.WeatherRegistry") && CustomWeather.isWeatherPresent("Forsaken")) { CustomWeather.SetCustomWeather("Forsaken"); } } } internal class Foxy : MEvent { public static Foxy Instance; public override string Name() { return "Foxy"; } public override void Initalize() { Instance = this; Weight = 2; Descriptions = new List { "야호~ 해적이다!", "다섯 밤...?", "악몽 같은 시간이 될 겁니다" }; ColorHex = "#FF0000"; Type = EventType.Bad; monstersToSpawn = new List { new MonsterEvent("Foxy", new Scale(100f, 0f, 100f, 100f), new Scale(0f, 0f, 0f, 0f), new Scale(1f, 0f, 1f, 1f), new Scale(1f, 0f, 1f, 1f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)) }; } public override bool AddEventIfOnly() { return Compatibility.FoxyPresent; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class GiantShowdown : MEvent { public static GiantShowdown Instance; public override string Name() { return "GiantShowdown"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "진격의 거인!!", "거인들의 전쟁", "내기를 걸어보세요..." }; ColorHex = "#800000"; Type = EventType.VeryBad; monstersToSpawn = new List { new MonsterEvent("RedwoodTitanObj", new Scale(1f, 0f, 1f, 1f), new Scale(33f, 0.66f, 33f, 100f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0.0095f, 0f, 1f), new Scale(2f, 0.02f, 2f, 4f), new Scale(2f, 0.02f, 2f, 4f)), new MonsterEvent("DriftwoodMenaceObj", new Scale(1f, 0f, 1f, 1f), new Scale(33f, 0.66f, 33f, 100f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(4f, 0.04f, 4f, 8f), new Scale(4f, 0.04f, 4f, 8f)), new MonsterEvent(Assets.EnemyName.ForestKeeper, new Scale(1f, 0f, 1f, 1f), new Scale(33f, 0.66f, 33f, 100f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(4f, 0.04f, 4f, 8f), new Scale(4f, 0.04f, 4f, 8f)) }; EventsToRemove = new List { "GiantsOutside" }; } public override bool AddEventIfOnly() { return Compatibility.CodeRebirthPresent; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class Hallowed : MEvent { public static Hallowed Instance; public override string Name() { return "Hallowed"; } public override void Initalize() { Instance = this; Weight = 2; Descriptions = new List { "할로윈의 영혼이 우리와 함께합니다", "으스스한 기운이 가득하네요", "사탕을 안 주면 장난칠 거예요!" }; ColorHex = "#FFA500"; Type = EventType.Bad; EventsToRemove = new List { "Hurricane", "Forsaken", "SolarFlare", "Windy", "Gloomy", "Raining", "AllWeather", "MajoraMoon" }; } public override bool AddEventIfOnly() { if (Compatibility.IsModPresent("mrov.WeatherRegistry") && CustomWeather.isWeatherPresent("Hallowed")) { return true; } return false; } public override void Execute() { if (Compatibility.IsModPresent("mrov.WeatherRegistry") && CustomWeather.isWeatherPresent("Hallowed")) { CustomWeather.SetCustomWeather("Hallowed"); } } } internal class Heatwave : MEvent { public static Heatwave Instance; public override string Name() { return "Heatwave"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "온도가 상승하고 있습니다!", "폭염이 몰려옵니다!", "여기 점점 뜨거워지는데요!" }; ColorHex = "#FF0000"; Type = EventType.Bad; EventsToRemove = new List { "BloodMoon", "MajoraMoon", "SolarFlare", "MeteorShower", "Windy", "Gloomy", "Raining", "AllWeather" }; } public override bool AddEventIfOnly() { return Compatibility.LethalElementsPresent && Compatibility.WeatherRegistryPresent; } public override void Execute() { if (Compatibility.LethalElementsPresent) { CustomWeather.SetCustomWeather("Heatwave"); } } } internal class Herobrine : MEvent { public static Herobrine Instance; public override string Name() { return "Herobrine"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "히로빈이 게임에서 제거되었습니다.", "방금 저건 뭐였지...", "영혼을 거두러 유령이 나타났습니다." }; ColorHex = "#800000"; Type = EventType.VeryBad; monstersToSpawn = new List { new MonsterEvent("Herobrine", new Scale(10f, 0.4f, 10f, 50f), new Scale(1f, 0.02f, 1f, 3f), new Scale(1f, 0.02f, 1f, 3f), new Scale(1f, 0.02f, 1f, 3f), new Scale(0f, 0.0075f, 0f, 1f), new Scale(0f, 0.02f, 0f, 2f)) }; } public override bool AddEventIfOnly() { return Compatibility.herobrinePresent; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class HotBarHassle : MEvent { public static HotBarHassle Instance; public override string Name() { return "HotBarHassle"; } public override void Initalize() { Instance = this; Weight = 2; Descriptions = new List { "어떤 아이템을 먼저 챙기실 건가요?", "이번엔 가볍게 다녀오죠", "전부 다 가져가긴 힘들겠는데요" }; ColorHex = "#FF0000"; Type = EventType.Bad; EventsToRemove = new List { "HotBarMania" }; } public override bool AddEventIfOnly() { return Compatibility.HotBarPlusPresent; } public override void Execute() { if (Compatibility.HotBarPlusPresent) { Net.Instance.ResizeHotbarRandomlySmallServerRpc(); } } public override void OnShipLeave() { if (Compatibility.HotBarPlusPresent) { Net.Instance.ResetHotbarServerRpc(); } } } internal class HotBarMania : MEvent { public static HotBarMania Instance; public override string Name() { return "HotBarMania"; } public override void Initalize() { Instance = this; Weight = 2; Descriptions = new List { "예상보다 일찍 퇴근할 수 있겠는데요", "왔다 갔다 덜 해도 되겠어요", "이 정도면 해볼 만하죠!" }; ColorHex = "#008000"; Type = EventType.Good; EventsToRemove = new List { "HotBarHassle" }; } public override bool AddEventIfOnly() { return Compatibility.HotBarPlusPresent; } public override void Execute() { if (Compatibility.HotBarPlusPresent) { Net.Instance.ResizeHotbarRandomlyServerRpc(); } } public override void OnShipLeave() { if (Compatibility.HotBarPlusPresent) { Net.Instance.ResetHotbarServerRpc(); } } } internal class Hurricane : MEvent { public static Hurricane Instance; public override string Name() { return "Hurricane"; } public override void Initalize() { Instance = this; Weight = 2; Descriptions = new List { "날씨가 매우 험악합니다", "강풍과 폭우", "야외 활동을 즐기기엔 최악의 상황이네요" }; ColorHex = "#800000"; Type = EventType.VeryBad; EventsToRemove = new List { "Hallowed", "Forsaken", "SolarFlare", "Windy", "Gloomy", "Raining", "AllWeather", "MajoraMoon" }; } public override bool AddEventIfOnly() { if (Compatibility.IsModPresent("mrov.WeatherRegistry") && CustomWeather.isWeatherPresent("Hurricane")) { return true; } return false; } public override void Execute() { if (Compatibility.IsModPresent("mrov.WeatherRegistry") && CustomWeather.isWeatherPresent("Hurricane")) { CustomWeather.SetCustomWeather("Hurricane"); } } } internal class ImmortalSnail : MEvent { public static ImmortalSnail Instance; public override string Name() { return "ImmortalSnail"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "정말 느립니다..", "꽤 순진해 보이는데요", "움직이는 수소폭탄" }; ColorHex = "#FF0000"; Type = EventType.Bad; monstersToSpawn = new List { new MonsterEvent("ImmortalSnail.EnemyType", new Scale(10f, 0.4f, 10f, 50f), new Scale(5f, 0.2f, 5f, 25f), new Scale(2f, 0.05f, 2f, 7f), new Scale(2f, 0.07f, 2f, 9f), new Scale(0f, 0.02f, 0f, 2f), new Scale(0f, 0.02f, 0f, 2f)) }; } public override bool AddEventIfOnly() { return Compatibility.immortalSnailPresent; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class ItemChargerFailure : MEvent { public static ItemChargerFailure Instance; public override string Name() { return "ItemChargerFailure"; } public override void Initalize() { Instance = this; Weight = 4; Descriptions = new List { "충전 스테이션: 오프라인", "배터리를 낭비하지 마세요" }; ColorHex = "#FF0000"; Type = EventType.Bad; EventsToRemove = new List { "FlashLightsFailure" }; } public override void Execute() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Expected O, but got Unknown Active = false; GameObject val = new GameObject("ItemChargerFailureEvent"); val.AddComponent(); } public override void OnShipLeave() { Active = false; } public override void OnGameStart() { Active = false; } } internal class ItsPlaytime : MEvent { public static ItsPlaytime Instance; public override string Name() { return "ItsPlaytime"; } public override void Initalize() { Instance = this; Weight = 2; Descriptions = new List { "다음 장을 준비하세요...", "후회하게 될 겁니다...", "작은 놈들과 더 큰 놈들" }; ColorHex = "#800000"; Type = EventType.VeryBad; EventsToSpawnWith = new List { "PlaytimeBig", "Critters" }; } public override bool AddEventIfOnly() { return Compatibility.PlaytimePresent && Compatibility.CrittersPresent; } } internal class JetpackFailure : MEvent { public static JetpackFailure Instance; public override string Name() { return "JetpackFailure"; } public override void Initalize() { Instance = this; Weight = 4; Descriptions = new List { "제트 연료 고갈", "경고! 이 구역은 제트팩 사용 금지 구역입니다!" }; ColorHex = "#FF0000"; Type = EventType.Bad; } public override void Execute() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Expected O, but got Unknown Active = true; GameObject val = new GameObject("JetpackFailureEvent"); val.AddComponent(); } public override void OnShipLeave() { Active = false; } public override void OnGameStart() { Active = false; } } internal class LeafBoys : MEvent { public static LeafBoys Instance; public override string Name() { return "LeafBoys"; } public override void Initalize() { Instance = this; Weight = 2; Descriptions = new List { "원치 않는 관심", "나무 위에서 온 녀석들", "개들과 나뭇잎들을 상상해 보세요" }; ColorHex = "#FF0000"; Type = EventType.Bad; EventsToSpawnWith = new List { "Dogs" }; monstersToSpawn = new List { new MonsterEvent("LeafBoiEnemyType", new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(2f, 0.13f, 2f, 4f), new Scale(4f, 0.15f, 4f, 8f)) }; } public override bool AddEventIfOnly() { return Compatibility.BiodiversityPresent; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class LeverFailure : MEvent { public static LeverFailure Instance; public override string Name() { return "LeverFailure"; } public override void Initalize() { Instance = this; Weight = 4; Descriptions = new List { "함선 유압 장치: 오프라인", "함선 레버 오작동" }; ColorHex = "#FF0000"; Type = EventType.Bad; } public override bool AddEventIfOnly() { return !Compatibility.SuperEclipsePresent; } public override void Execute() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Expected O, but got Unknown Active = true; GameObject val = new GameObject("LeverEvent"); val.AddComponent(); } public override void OnShipLeave() { Active = false; } public override void OnGameStart() { Active = false; } } internal class LightEaterEnemy : MEvent { public static LightEaterEnemy Instance; public override string Name() { return "LightEaterEnemy"; } public override void Initalize() { Instance = this; Weight = 2; Descriptions = new List { "빛을 선호하시나요?", "빛이 없다고 상상해 보세요" }; ColorHex = "#FF0000"; Type = EventType.Bad; monstersToSpawn = new List { new MonsterEvent("LightEaterEnemy", new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(1f, 0.01f, 0f, 1f), new Scale(1f, 0.01f, 1f, 2f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)) }; } public override bool AddEventIfOnly() { return Compatibility.lighteaterPresent; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class Lockers : MEvent { public static Lockers Instance; public override string Name() { return "Lockers"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "사물함들", "마치 아이언 메이든을 연상시키네요", "당신이 죽을 확률이 증가했습니다" }; ColorHex = "#FF0000"; Type = EventType.Bad; monstersToSpawn = new List { new MonsterEvent("LockerEnemy", new Scale(10f, 0.4f, 10f, 50f), new Scale(5f, 0.1f, 5f, 15f), new Scale(1f, 0.04f, 1f, 5f), new Scale(1f, 0.06f, 1f, 7f), new Scale(0f, 0.0075f, 0f, 1f), new Scale(0f, 0.02f, 0f, 2f)) }; } public override bool AddEventIfOnly() { return Compatibility.lockerPresent; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class MajoraMoon : MEvent { public static MajoraMoon Instance; public override string Name() { return "MajoraMoon"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "달이 추락합니다", "달에 얼굴이 그려져 있네요", "시간이 얼마 남지 않았습니다" }; ColorHex = "#800000"; Type = EventType.VeryBad; EventsToRemove = new List { "Hurricane", "Hallowed", "Forsaken", "SolarFlare", "Windy", "Gloomy", "Raining", "AllWeather", "BloodMoon", "VeryLateShip", "Hell", "LateShip" }; } public override bool AddEventIfOnly() { return Compatibility.LegendWeathersPresent && Compatibility.WeatherRegistryPresent; } public override void Execute() { if (Compatibility.LegendWeathersPresent) { CustomWeather.SetCustomWeather("Majora Moon"); } } } internal class ManStalker : MEvent { public static ManStalker Instance; public override string Name() { return "ManStalker"; } public override void Initalize() { Instance = this; Weight = 2; Descriptions = new List { "그것이 뒤를 쫓습니다", "붙잡히지 않기를 빌어야겠군요", "무슨 수를 써서라도 피하세요..." }; ColorHex = "#FF0000"; Type = EventType.Bad; monstersToSpawn = new List { new MonsterEvent("menstalker_type", new Scale(100f, 0f, 100f, 100f), new Scale(0f, 0f, 0f, 0f), new Scale(1f, 0f, 1f, 1f), new Scale(1f, 0.016f, 1f, 3f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)) }; } public override bool AddEventIfOnly() { return Compatibility.ManStalkerPresent; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class Mantitoil : MEvent { public static Mantitoil Instance; public override string Name() { return "Mantitoil"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "비행 터렛!", "방금 터렛이 날아가는 걸 본 건가요?", "공중 저격수", "맨티토일???" }; ColorHex = "#800000"; Type = EventType.VeryBad; monstersToSpawn = new List { new MonsterEvent(Assets.EnemyName.Manticoil, new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(8f, 0f, 8f, 8f), new Scale(10f, 0f, 10f, 10f)) }; EventsToRemove = new List { "NoMantitoil" }; ScaleList.Add(ScaleType.InsideEnemyRarity, new Scale(0f, 0f, 0f, 0f)); ScaleList.Add(ScaleType.MaxInsideEnemyCount, new Scale(0f, 0f, 0f, 0f)); } public override bool AddEventIfOnly() { return Compatibility.toilheadPresent; } public override void Execute() { if (Compatibility.toilheadPresent) { ExecuteAllMonsterEvents(); Api.ForceMantiToilSpawns = true; } } } internal class MantiToilSlayer : MEvent { public static MantiToilSlayer Instance; public override string Name() { return "MantiToilSlayer"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "날아다니는 미니건", "맨티토일... 하지만 더 진화했습니다", "맨티슬레이어!!!" }; ColorHex = "#800000"; Type = EventType.VeryBad; EventsToRemove = new List { "Coilhead", "AntiCoilhead", "ToilHead", "Mantitoil", "ToilSlayer", "AllSlayers", "NoSlayers", "NoMantitoil" }; monstersToSpawn = new List { new MonsterEvent(Assets.EnemyName.Manticoil, new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(7f, 0f, 7f, 7f), new Scale(10f, 0f, 10f, 10f)) }; } public override bool AddEventIfOnly() { return Compatibility.toilheadPresent; } public override void Execute() { if (Compatibility.toilheadPresent) { ExecuteAllMonsterEvents(); Api.ForceMantiSlayerMaxSpawnCount = 25; Api.ForceMantiSlayerSpawns = true; Api.ForceToilSlayerMaxSpawnCount = 0; Api.ForceToilHeadMaxSpawnCount = 0; } } } internal class ManualCameraFailure : MEvent { public static ManualCameraFailure Instance; public new static bool Active; public override string Name() { return "ManualCameraFailure"; } public override void Initalize() { Instance = this; Weight = 4; Descriptions = new List { "모니터링 시스템: 오류", "화면이 파손되었습니다" }; ColorHex = "#FF0000"; Type = EventType.Bad; } public override void Execute() { //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_0012: Expected O, but got Unknown Active = true; GameObject val = new GameObject("ManualCameraFailureEvent"); val.AddComponent(); } public override void OnShipLeave() { Active = false; } public override void OnGameStart() { Active = false; } } internal class Meltdown : MEvent { public static Meltdown Instance; private float meltdownTime; private bool meltdownStarted; public override string Name() { return "Meltdown"; } public override void Initalize() { Instance = this; Weight = 2; Descriptions = new List { "코어 붕괴 감지", "멜트다운 임박", "작고 귀여운 연기 한 줄기" }; ColorHex = "#800000"; Type = EventType.VeryBad; } public override bool AddEventIfOnly() { return Compatibility.FacilityMeltdownPresent; } public override void Execute() { //IL_0035: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Expected O, but got Unknown Random random = new Random(); meltdownTime = (float)random.Next(5, 100) / 100f; meltdownStarted = false; TimeOfDay.Instance.onTimeSync.AddListener(new UnityAction(MeltdownClock)); } public override void OnGameStart() { } private void MeltdownClock() { if (!meltdownStarted && TimeOfDay.Instance.normalizedTimeOfDay > meltdownTime) { meltdownStarted = true; MeltdownAPI.StartMeltdown("SoftDiamond.BrutalCompanyMinusExtraReborn"); } } } internal class MeteorShower : MEvent { public static MeteorShower Instance; public override string Name() { return "MeteorShower"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "평소와는 다른 소나기...", "운석이 또?!", "세상에.. 운석이라니..?" }; ColorHex = "#FF0000"; Type = EventType.Bad; EventsToRemove = new List { "BloodMoon", "MajoraMoon", "SolarFlare", "Windy", "Gloomy", "Raining", "AllWeather" }; } public override bool AddEventIfOnly() { return Compatibility.CodeRebirthPresent && Compatibility.WeatherRegistryPresent; } public override void Execute() { if (Compatibility.CodeRebirthPresent) { CustomWeather.SetCustomWeather("Meteor Shower"); } } } internal class MoaiEnemy : MEvent { public static MoaiEnemy Instance; public override string Name() { return "MoaiEnemy"; } public override void Initalize() { Instance = this; Weight = 2; Descriptions = new List { "석상들이 움직입니다!", "고대의 수호자들이 깨어났습니다. 도망치세요.", "거친 환영을 준비하세요" }; ColorHex = "#800000"; Type = EventType.VeryBad; monstersToSpawn = new List { new MonsterEvent("MoaiEnemy", new Scale(12f, 0.3f, 7f, 25f), new Scale(20f, 0.4f, 15f, 30f), new Scale(1f, 0.03f, 1f, 1f), new Scale(1f, 0.04f, 0f, 2f), new Scale(1f, 0.3f, 1f, 2f), new Scale(1f, 0.4f, 1f, 3f)), new MonsterEvent("MoaiBlue", new Scale(6f, 0.15f, 3f, 12f), new Scale(3f, 0.15f, 2.5f, 8f), new Scale(1f, 0.02f, 1f, 1f), new Scale(1f, 0.03f, 0f, 1f), new Scale(0.5f, 0.25f, 1f, 1f), new Scale(1f, 0.25f, 1f, 2f)), new MonsterEvent("MoaiRed", new Scale(14f, 0.4f, 9f, 25f), new Scale(10f, 0.3f, 7f, 18f), new Scale(1f, 0.03f, 1f, 1f), new Scale(1f, 0.05f, 1f, 2f), new Scale(0f, 0.35f, 1f, 1f), new Scale(2f, 0.4f, 2f, 2f)), new MonsterEvent("MoaiGreen", new Scale(5f, 0.15f, 3f, 10f), new Scale(2.5f, 0.1f, 2f, 6f), new Scale(1f, 0.02f, 1f, 1f), new Scale(1f, 0.03f, 0f, 1f), new Scale(1f, 0.25f, 1f, 1f), new Scale(1f, 0.25f, 1f, 1f)), new MonsterEvent("MoaiGold", new Scale(1.5f, 0.05f, 0.5f, 4f), new Scale(1f, 0.05f, 0.5f, 2.5f), new Scale(1f, 0.01f, 1f, 1f), new Scale(1f, 0.01f, 1f, 1f), new Scale(0f, 0.1f, 1f, 1f), new Scale(1f, 0.1f, 1f, 1f)), new MonsterEvent("MoaiPurple", new Scale(13f, 0.4f, 8f, 22f), new Scale(7f, 0.25f, 5f, 14f), new Scale(1f, 0.03f, 1f, 1f), new Scale(1f, 0.05f, 1f, 2f), new Scale(0.5f, 0.35f, 1f, 1f), new Scale(1f, 0.4f, 2f, 2f)) }; } public override bool AddEventIfOnly() { return Compatibility.moaiEnemyPresent; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class MobileTurrets : MEvent { public static MobileTurrets Instance; public override string Name() { return "MobileTurrets"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "터렛들...", "움직이는 터렛!", "코로나 청정 시설", "청소부들!" }; ColorHex = "#FF0000"; Type = EventType.Bad; monstersToSpawn = new List { new MonsterEvent("EnemyMovingTurret", new Scale(10f, 0.4f, 10f, 50f), new Scale(5f, 0.1f, 5f, 15f), new Scale(1f, 0.04f, 3f, 5f), new Scale(2f, 0.04f, 3f, 6f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)) }; } public override bool AddEventIfOnly() { return Compatibility.moonsweptPresent; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class NeedyCats : MEvent { public static NeedyCats Instance; public override string Name() { return "NeedyCats"; } public override void Initalize() { //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Expected O, but got Unknown //IL_00b4: Unknown result type (might be due to invalid IL or missing references) //IL_00ba: Expected O, but got Unknown Instance = this; Weight = 2; Descriptions = new List { "야옹!", "어머, 귀여운 고양이잖아요", "도움이 필요해 보여요", "개들로부터 지켜주세요" }; ColorHex = "#FFFFFF"; Type = EventType.Neutral; EventsToRemove = new List { "SID" }; scrapTransmutationEvent = new ScrapTransmutationEvent(new Scale(0.1f, 0.02f, 0.1f, 0.15f), new SpawnableItemWithRarity(Assets.GetItem("CatItem"), 60), new SpawnableItemWithRarity(Assets.GetItem("CatFoodItem"), 40)); ScaleList.Add(ScaleType.ScrapAmount, new Scale(1f, 0.004f, 1f, 1.5f)); } public override bool AddEventIfOnly() { if (!Compatibility.NeedyCatsPresent) { return false; } if (!Manager.transmuteScrap) { Manager.transmuteScrap = true; return true; } return false; } public override void Execute() { Manager.scrapAmountMultiplier *= Getf(ScaleType.ScrapAmount); scrapTransmutationEvent.Execute(); } } internal class Nemo : MEvent { public static Nemo Instance; public override string Name() { return "Nemo"; } public override void Initalize() { Instance = this; Weight = 2; Descriptions = new List { "니모를 찾아서", "그를 찾아냈군요" }; ColorHex = "#008000"; Type = EventType.Good; monstersToSpawn = new List { new MonsterEvent("NemoAsset", new Scale(0f, 0f, 0f, 0f), new Scale(100f, 0f, 100f, 100f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(1f, 0f, 1f, 1f), new Scale(1f, 0f, 1f, 1f)) }; } public override bool AddEventIfOnly() { return Compatibility.SurfacedPresent; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class NoFiend : MEvent { public static NoFiend Instance; public override string Name() { return "NoFiend"; } public override void Initalize() { Instance = this; EventsToRemove = new List { "Hell", "NoFiend" }; Weight = 1; Descriptions = new List { "악마 없음", "갑툭튀 없음... 아마도요", "아무것도 없음", "이 달에서는 광질이 허용됩니다!!!" }; ColorHex = "#008000"; Type = EventType.Remove; } public override bool AddEventIfOnly() { return Manager.SpawnExists("TheFiend") && Compatibility.theFiendPresent; } public override void Execute() { Manager.RemoveSpawn("TheFiend"); } } internal class NoImmortalSnails : MEvent { public static NoImmortalSnails Instance; public override string Name() { return "NoImmortalSnails"; } public override void Initalize() { Instance = this; EventsToRemove = new List { "Hell", "RollingGiants" }; Weight = 1; Descriptions = new List { "느릿느릿 움직이는 것들 없음", "불사신 달팽이 없음", "여기에 열핵폭탄 같은 건 없어요..." }; ColorHex = "#008000"; Type = EventType.Remove; } public override bool AddEventIfOnly() { return Manager.SpawnExists("ImmortalSnail.EnemyType") && Compatibility.immortalSnailPresent; } public override void Execute() { Manager.RemoveSpawn("ImmortalSnail.EnemyType"); } } internal class NoLockers : MEvent { public static NoLockers Instance; public override string Name() { return "NoLockers"; } public override void Initalize() { Instance = this; EventsToRemove = new List { "Hell", "Lockers" }; Weight = 1; Descriptions = new List { "아이언 메이든 없음", "사물함 없음", "당신의 생존 확률이 아주 조금 증가했습니다." }; ColorHex = "#008000"; Type = EventType.Remove; } public override bool AddEventIfOnly() { return Manager.SpawnExists("LockerEnemy") && Compatibility.lockerPresent; } public override void Execute() { Manager.RemoveSpawn("LockerEnemy"); } } internal class NoMantitoil : MEvent { public static NoMantitoil Instance; public override string Name() { return "NoMantitoil"; } public override void Initalize() { Instance = this; Weight = 5; Descriptions = new List { "오늘은 비행 터렛 없음", "오늘은 날아다니는 터렛을 볼 일 없을 겁니다", "공중 저격수 없음", "맨티토일 없음... 후우..." }; ColorHex = "#008000"; Type = EventType.Remove; EventsToRemove = new List { "Mantitoil", "NoSlayers", "ToilSlayer" }; } public override bool AddEventIfOnly() { return Compatibility.toilheadPresent; } public override void Execute() { if (Compatibility.toilheadPresent) { ExecuteAllMonsterEvents(); Api.ForceMantiToilMaxSpawnCount = 0; } } } internal class NoMantiToilSlayer : MEvent { public static NoMantiToilSlayer Instance; public override string Name() { return "NoMantiToilSlayer"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "날아다니는 미니건 없음", "맨티슬레이어 출입 금지 구역", "오늘은 맨티코일이 당신을 해칠 수 없습니다" }; ColorHex = "#008000"; Type = EventType.Remove; EventsToRemove = new List { "Coilhead", "AntiCoilhead", "ToilHead", "Mantitoil", "ToilSlayer", "MantiToilSlayer", "NoToilSlayer" }; } public override bool AddEventIfOnly() { return Compatibility.toilheadPresent; } public override void Execute() { if (Compatibility.toilheadPresent) { ExecuteAllMonsterEvents(); Api.ForceMantiSlayerMaxSpawnCount = 0; Api.ForceMantiSlayerSpawns = false; Api.ForceToilSlayerMaxSpawnCount = 0; Api.ForceToilHeadMaxSpawnCount = 0; } } } internal class NoPeepers : MEvent { public static NoPeepers Instance; public static float oldSpawnChance = -1f; public override string Name() { return "NoPeepers"; } public override void Initalize() { Instance = this; EventsToRemove = new List { "Hell", "Peepers" }; Weight = 1; Descriptions = new List { "무게감 없음", "공기가 가볍게 느껴집니다." }; ColorHex = "#008000"; Type = EventType.Remove; } public override bool AddEventIfOnly() { return Compatibility.peepersPresent; } public override void Execute() { oldSpawnChance = (float)Compatibility.peeperSpawnChance.GetValue(null); Compatibility.peeperSpawnChance.SetValue(null, -1f); } public override void OnGameStart() { if (Compatibility.peepersPresent) { Compatibility.peeperSpawnChance.SetValue(null, oldSpawnChance); } } public override void OnShipLeave() { if (Compatibility.peepersPresent) { Compatibility.peeperSpawnChance.SetValue(null, oldSpawnChance); } } } internal class NoShyGuy : MEvent { public static NoShyGuy Instance; public override string Name() { return "NoShyGuy"; } public override void Initalize() { Instance = this; EventsToRemove = new List { "Hell", "ShyGuy" }; Weight = 1; Descriptions = new List { "SCP-096 격리 완료.", "이제 눈을 뜨셔도 좋습니다" }; ColorHex = "#008000"; Type = EventType.Remove; } public override bool AddEventIfOnly() { return Manager.SpawnExists("ShyGuyDef") && Compatibility.scopophobiaPresent; } public override void Execute() { Manager.RemoveSpawn("ShyGuyDef"); } } internal class NoSlayers : MEvent { public static NoSlayers Instance; public override string Name() { return "NoSlayers"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "오늘은 미니건이 한 대도 없습니다", "언로디드 행거 코퍼레이션이 이 구역의 모든 슬레이어를 제거했습니다!" }; ColorHex = "#008000"; Type = EventType.Remove; EventsToRemove = new List { "Coilhead", "AntiCoilhead", "ToilHead", "ToilSlayer", "MantiToilSlayer", "NoMantiToilSlayer", "NoToilSlayer", "AllSlayers" }; } public override bool AddEventIfOnly() { return Compatibility.toilheadPresent; } public override void Execute() { if (Compatibility.toilheadPresent) { ExecuteAllMonsterEvents(); Api.ForceMantiSlayerMaxSpawnCount = 0; Api.ForceMantiSlayerSpawns = false; Api.ForceToilSlayerSpawns = false; Api.ForceToilSlayerMaxSpawnCount = 0; Api.ForceToilHeadMaxSpawnCount = 0; } } } internal class NoToilSlayer : MEvent { public static NoToilSlayer Instance; public override string Name() { return "NoToilSlayer"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "오늘은 내부 미니건 없음", "토일슬레이어 없음", "이 구역은 토일슬레이어 출입 금지입니다" }; ColorHex = "#008000"; Type = EventType.Remove; EventsToRemove = new List { "Coilhead", "AntiCoilhead", "ToilHead", "MantiToilSlayer", "ToilSlayer", "NoMantiToilSlayer", "AllSlayers", "NoSlayers" }; } public override bool AddEventIfOnly() { return Compatibility.toilheadPresent; } public override void Execute() { if (Compatibility.toilheadPresent) { Api.ForceToilSlayerMaxSpawnCount = 0; Api.ForceToilSlayerSpawns = false; Api.ForceMantiSlayerMaxSpawnCount = 0; Api.ForceToilHeadMaxSpawnCount = 0; } } } internal class NutSlayersMore : MEvent { public static NutSlayersMore Instance; public override string Name() { return "NutSlayersMore"; } public override void Initalize() { Instance = this; Weight = 2; Descriptions = new List { "Warning: 이 지역에서 여러 명의 빨간 병정이 발견되었습니다!", "오.. 세상에 맙소사..." }; ColorHex = "#000000"; Type = EventType.Insane; EventsToRemove = new List { "HeavyRain", "Raining", "Masked" }; monstersToSpawn = new List { new MonsterEvent(Assets.nutSlayer, new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(8f, 0f, 8f, 8f), new Scale(12f, 0f, 12f, 12f)) }; } public override void Execute() { ExecuteAllMonsterEvents(); Manager.MultiplySpawnChance(RoundManager.Instance.currentLevel, 2f); Manager.scrapValueMultiplier *= 4.5f; } } internal class Peepers : MEvent { public static Peepers Instance; public override string Name() { return "Peepers"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "무게감!", "단체 포옹!!!", "공기가 무겁게 느껴집니다...", "귀엽기보다 짜증 나는 편" }; ColorHex = "#FF0000"; Type = EventType.Bad; monstersToSpawn = new List { new MonsterEvent("PeeperType", new Scale(10f, 0.4f, 10f, 50f), new Scale(0f, 0f, 0f, 0f), new Scale(3f, 0.06f, 3f, 9f), new Scale(4f, 0.09f, 4f, 12f), new Scale(3f, 0.12f, 3f, 15f), new Scale(4f, 0.16f, 4f, 20f)) }; } public override bool AddEventIfOnly() { return Compatibility.peepersPresent; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class PhonesOut : MEvent { public static PhonesOut Instance; public new static bool Active; public override string Name() { return "PhonesOut"; } public override void Initalize() { Instance = this; Weight = 2; Descriptions = new List { "삐 소리 후에 메시지를 남겨주세요..", "수신 상태 불량", "전화선이 끊겼습니다", "전화기가 고장 난 것 같아요" }; ColorHex = "#FF0000"; Type = EventType.Bad; } public override bool AddEventIfOnly() { return Compatibility.LethalPhonesPresent; } public override void Execute() { //IL_0012: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Expected O, but got Unknown Net.Instance.SetPhonesOutServerRpc(active: true); GameObject val = new GameObject("PhonesOutFailureObject"); val.AddComponent(); } public override void OnShipLeave() { Active = false; } public override void OnGameStart() { Active = false; } public override void OnLocalDisconnect() { } } internal class PlaytimeBig : MEvent { public static PlaytimeBig Instance; public override string Name() { return "PlaytimeBig"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "빈자리 없이 꽉 찰 예정입니다", "거물들이 전부 쏟아져 나왔습니다..", "당신은 누굴 보게 될까요?" }; ColorHex = "#800000"; Type = EventType.VeryBad; monstersToSpawn = new List { new MonsterEvent("Miss Delight", new Scale(50f, 5f, 50f, 100f), new Scale(0f, 0f, 0f, 0f), new Scale(1f, 0.017f, 1f, 2f), new Scale(1f, 0.0025f, 1f, 2f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)), new MonsterEvent("Boxy Boo", new Scale(2f, 7f, 10f, 60f), new Scale(0f, 0f, 0f, 0f), new Scale(1f, 0f, 1f, 1f), new Scale(1f, 0f, 1f, 1f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)), new MonsterEvent("Huggy Wuggy", new Scale(30f, 4f, 30f, 50f), new Scale(0f, 0f, 0f, 0f), new Scale(1f, 0f, 1f, 1f), new Scale(1f, 0f, 1f, 1f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)), new MonsterEvent("Dogday Monster", new Scale(36f, 8.2f, 36f, 80f), new Scale(0f, 0f, 0f, 0f), new Scale(1f, 0.017f, 1f, 2f), new Scale(1f, 0.0045f, 1f, 3f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)) }; } public override bool AddEventIfOnly() { return Compatibility.PlaytimePresent; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class RollingGiants : MEvent { public static RollingGiants Instance; public override string Name() { return "RollingGiants"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "롤링 자이언트!!", "만지고 싶어 해요...", "대체 이건 뭐죠?????" }; ColorHex = "#FF0000"; Type = EventType.Bad; monstersToSpawn = new List { new MonsterEvent("RollingGiant_EnemyType", new Scale(10f, 0.4f, 10f, 50f), new Scale(5f, 0.1f, 5f, 15f), new Scale(1f, 0.02f, 1f, 3f), new Scale(1f, 0.02f, 1f, 3f), new Scale(0f, 0.0075f, 0f, 1f), new Scale(0f, 0.02f, 0f, 2f)) }; } public override bool AddEventIfOnly() { return Compatibility.rollinggiantPresent; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class Roomba : MEvent { public static Roomba Instance; public override string Name() { return "Roomba"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "움직이는 지뢰!!", "시설용 진공청소기", "전쟁 병기", "이것들은 제네바 협약 위반입니다" }; ColorHex = "#FF0000"; Type = EventType.Bad; monstersToSpawn = new List { new MonsterEvent("Boomba", new Scale(10f, 0.4f, 10f, 50f), new Scale(5f, 0.1f, 5f, 15f), new Scale(2f, 0.08f, 3f, 10f), new Scale(3f, 0.12f, 4f, 15f), new Scale(0f, 0.03f, 0f, 3f), new Scale(0f, 0.06f, 0f, 6f)) }; } public override bool AddEventIfOnly() { return Compatibility.lethalThingsPresent; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class SCP682 : MEvent { public static SCP682 Instance; public override string Name() { return "SCP682"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "SCP682!", "죽지 않는 도마뱀", "도마뱀을 피하세요!" }; ColorHex = "#FF0000"; Type = EventType.Bad; monstersToSpawn = new List { new MonsterEvent("SCP682ET", new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(1f, 0.13f, 1f, 2f), new Scale(2f, 0.06f, 3f, 3f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)) }; } public override bool AddEventIfOnly() { return Compatibility.SCP682Present; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class SCP939 : MEvent { public static SCP939 Instance; public override string Name() { return "SCP939"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "SCP939...", "그들을 맞이할 준비가 되셨나요?", "시설은 그들을 격리할 수 없었습니다..." }; ColorHex = "#FF0000"; Type = EventType.Bad; monstersToSpawn = new List { new MonsterEvent("SCP939", new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(1f, 0.13f, 1f, 2f), new Scale(2f, 0.06f, 4f, 4f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)) }; } public override bool AddEventIfOnly() { return Compatibility.SCP939Present; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class Seamine : MEvent { public static Seamine Instance; public override string Name() { return "Seamine"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "이게 물속에 있다고 상상해 보세요", "스폰지밥", "가시 돋친 공", "이건 쾅 하고 터질 수도 있어요" }; ColorHex = "#FF0000"; Type = EventType.Bad; isBetaEvent = true; ScaleList.Add(ScaleType.MinDensity, new Scale(0.01f, 0.0004f, 0.016f, 0.086f)); ScaleList.Add(ScaleType.MaxDensity, new Scale(0.0168f, 0.00592f, 0.0128f, 0.18f)); } public override bool AddEventIfOnly() { return Compatibility.SurfacedPresent; } public override void Execute() { Manager.insideObjectsToSpawnOutside.Add(new Manager.ObjectInfo(Assets.GetObject("Seamine"), Random.Range(Getf(ScaleType.MinDensity), Getf(ScaleType.MaxDensity)))); } } internal class Shiba : MEvent { public static Shiba Instance; public override string Name() { return "Shiba"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "우와, 너무 귀엽다!", "순진하다고요?", "깡!", "방망이 지참", "방망이를 좋아하길 바랄게요" }; ColorHex = "#FF0000"; Type = EventType.Bad; monstersToSpawn = new List { new MonsterEvent("ShibaEnemy", new Scale(60f, 0.43f, 60f, 100f), new Scale(0f, 0f, 0f, 0f), new Scale(1f, 0f, 1f, 1f), new Scale(2f, 0.2f, 2f, 4f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)) }; } public override bool AddEventIfOnly() { return Compatibility.ShibaPresent; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class ShipCoreFailure : MEvent { public static ShipCoreFailure Instance; public override string Name() { return "ShipCoreFailure"; } public override void Initalize() { Instance = this; Weight = 2; Descriptions = new List { "함선 코어 고장!", "큰일 났습니다, 모든 함선 시스템이 오프라인입니다" }; ColorHex = "#800000"; Type = EventType.VeryBad; EventsToSpawnWith = new List { "DoorFailure", "ItemChargerFailure", "LeverFailure", "ManualCameraFailure", "TeleporterFailure", "TerminalFailure", "WalkieFailure", "ShipLightsFailure" }; } public override bool AddEventIfOnly() { return !Compatibility.SuperEclipsePresent; } } internal class ShockwaveDrones : MEvent { public static ShockwaveDrones Instance; public override string Name() { return "ShockwaveDrones"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "충격파 드론", "멀리 떨어지세요", "드론" }; ColorHex = "#FF0000"; Type = EventType.Bad; monstersToSpawn = new List { new MonsterEvent("DroneEnemy", new Scale(10f, 0.4f, 10f, 50f), new Scale(5f, 0.1f, 5f, 15f), new Scale(1f, 0.04f, 3f, 5f), new Scale(2f, 0.04f, 3f, 6f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)) }; } public override bool AddEventIfOnly() { return Compatibility.shockwaveDronesPresent; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class Shrimp : MEvent { public static Shrimp Instance; public override string Name() { return "Shrimp"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "맛있어 보이는 새우", "사실은 그냥 댕댕이랍니다", "밥 주셔야 해요... 안 그러면 당신이 밥이거든요" }; ColorHex = "#FF0000"; Type = EventType.Bad; monstersToSpawn = new List { new MonsterEvent("ShrimpEnemy", new Scale(10f, 0.4f, 10f, 50f), new Scale(2f, 0.05f, 4f, 10f), new Scale(1f, 0.04f, 1f, 5f), new Scale(1f, 0.06f, 1f, 7f), new Scale(0f, 0.0075f, 0f, 1f), new Scale(0f, 0.02f, 0f, 2f)) }; } public override bool AddEventIfOnly() { return Compatibility.shrimpPresent; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class ShyGuy : MEvent { public static ShyGuy Instance; public override string Name() { return "ShyGuy"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "등급: 유클리드(격리 불가)", "주의: 모든 인원은 알아서 생존하십시오.", "눈을 떼지 마세요. 물론 그러다 죽겠지만요..." }; ColorHex = "#800000"; Type = EventType.VeryBad; monstersToSpawn = new List { new MonsterEvent("ShyGuyDef", new Scale(20f, 0.8f, 20f, 100f), new Scale(10f, 0.4f, 10f, 50f), new Scale(2f, 0.04f, 2f, 6f), new Scale(2f, 0.04f, 2f, 6f), new Scale(1f, 0.02f, 1f, 3f), new Scale(2f, 0.04f, 2f, 6f)) }; } public override bool AddEventIfOnly() { return Compatibility.scopophobiaPresent; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class SirenHead : MEvent { public static SirenHead Instance; public override string Name() { return "SirenHead"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "신(God)께서 면담을 신청하셨습니다...", "9. 18. 1. 아이. 17. 제거. 불결함. (지직...)" }; ColorHex = "#800000"; Type = EventType.VeryBad; monstersToSpawn = new List { new MonsterEvent("SirenHead", new Scale(1f, 0f, 1f, 1f), new Scale(33f, 0.66f, 33f, 100f), new Scale(0f, 0.0075f, 0f, 1f), new Scale(0f, 0.02f, 0f, 2f), new Scale(2f, 0.04f, 1f, 6f), new Scale(3f, 0.06f, 1f, 9f)) }; } public override bool AddEventIfOnly() { return Compatibility.sirenheadPresent; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class SkullEnemy : MEvent { public static SkullEnemy Instance; public override string Name() { return "SkullEnemy"; } public override void Initalize() { Instance = this; Weight = 2; Descriptions = new List { "해골물이 당신을 배달하러 갑니다...", "발버둥 쳐보세요, 어차피 스토커는 포기를 모르니까요." }; ColorHex = "#800000"; Type = EventType.VeryBad; monstersToSpawn = new List { new MonsterEvent("SkullEnemy", new Scale(100f, 0f, 100f, 100f), new Scale(0f, 0f, 0f, 0f), new Scale(1f, 0f, 1f, 1f), new Scale(1f, 0f, 1f, 1f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)) }; } public override bool AddEventIfOnly() { return Compatibility.SkullEnemyPresent; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class SlenderMan : MEvent { public static SlenderMan Instance; public override string Name() { return "SlenderMan"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "추억 속의 불쾌한 골짜기", "가까이 오게 두지 마세요... 제발요", "기분 탓일까요? 아니면 당신 뒤일까요?" }; ColorHex = "#800000"; Type = EventType.VeryBad; monstersToSpawn = new List { new MonsterEvent("SlendermanEnemy", new Scale(2f, 0.08f, 2f, 10f), new Scale(10f, 0.4f, 10f, 50f), new Scale(1f, 0.04f, 2f, 3f), new Scale(1f, 0.04f, 2f, 3f), new Scale(0f, 0.0075f, 0f, 1f), new Scale(0f, 0.02f, 0f, 1f)) }; } public override bool AddEventIfOnly() { return Compatibility.facelessStalekerPresent; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class SolarFlare : MEvent { public static SolarFlare Instance; public override string Name() { return "SolarFlare"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "긴급: 태양풍 접근 중!", "초대형 태양풍이 옵니다! (지직...) 타 죽기 싫으면 뛰세요!" }; ColorHex = "#FF0000"; Type = EventType.Bad; EventsToRemove = new List { "Hurricane", "Hallowed", "Forsaken", "BloodMoon", "MajoraMoon", "Heatwave", "MeteorShower", "Windy", "Gloomy", "Raining", "AllWeather" }; } public override bool AddEventIfOnly() { return Compatibility.LethalElementsPresent && Compatibility.WeatherRegistryPresent; } public override void Execute() { if (Compatibility.LethalElementsPresent) { CustomWeather.SetCustomWeather("Solar Flare"); } } } internal class SoulDev : MEvent { public static SoulDev Instance; public override string Name() { return "SoulDev"; } public override void Initalize() { Instance = this; Weight = 2; Descriptions = new List { "최악보다 더 최악이 올 거라더니... 이게 그거네요!", "이걸 마주치느니 그냥 전등이라도 핥는 게 나을 겁니다.", "제스터랑 비슷하게 생겼는데... 어라, 상자가 없네요?" }; ColorHex = "#800000"; Type = EventType.VeryBad; monstersToSpawn = new List { new MonsterEvent("SoulDev", new Scale(1f, 0.05f, 0.3f, 3f), new Scale(1f, 0.05f, 0.3f, 3f), new Scale(1f, 0.01f, 0f, 1f), new Scale(1f, 0.01f, 1f, 2f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)) }; } public override bool AddEventIfOnly() { return Compatibility.soulDevPresent; } public override void Execute() { ExecuteAllMonsterEvents(); } } public class TakeyGokuBracken : MEvent { public static TakeyGokuBracken Instance; public override string Name() { return "TakeyGokuBracken"; } public override void Initalize() { Instance = this; Weight = 2; Descriptions = new List { "잠깐... 이거 인형 아니었어?", "진짜 소름 돋네", "타키고쿠(TakeyGoku): 도망쳐, 손오공이 오고 있어!" }; ColorHex = "#FF0000"; Type = EventType.Bad; monstersToSpawn = new List { new MonsterEvent(Assets.EnemyName.Bracken, new Scale(20f, 0.8f, 20f, 100f), new Scale(5f, 0.2f, 5f, 25f), new Scale(3f, 0.06f, 3f, 9f), new Scale(4f, 0.08f, 4f, 12f), new Scale(0f, 0.02f, 0f, 1f), new Scale(0f, 0.03f, 0f, 3f)) }; EventsToRemove = new List { "SID" }; } public override bool AddEventIfOnly() { return Compatibility.takeyGokuPresent & Compatibility.takeyGokuEssentialPresent & Compatibility.officialExternalModulePresent; } public override void Execute() { if (!(Compatibility.takeyPlushPresent & Compatibility.takeyGokuEssentialPresent & Compatibility.officialExternalModulePresent)) { Api.ForceTakeyGokuBrackenSpawns = true; Api.ForceTakeyGokuBrackenMaxSpawnCount = 25; ExecuteAllMonsterEvents(); } } } internal class TakeyGokuPlush : MEvent { public static TakeyGokuPlush Instance; public override string Name() { return "TakeyGokuPlush"; } public override void Initalize() { //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown Instance = this; Weight = 1; Descriptions = new List { "TakeyGoku... but small", "TakeyGoku plushie" }; ColorHex = "#008000"; Type = EventType.Good; scrapTransmutationEvent = new ScrapTransmutationEvent(new Scale(0.5f, 0.008f, 0.5f, 0.9f), new SpawnableItemWithRarity(Assets.GetItem("Smol Takey Goku"), 100)); EventsToRemove = new List { "SID", "RealityShift", "Pickles", "TakeyPlush", "SussyPaintings", "TakeyGokuPlushBig", "Dustpans", "Clock" }; ScaleList.Add(ScaleType.ScrapAmount, new Scale(1f, 0.005f, 1f, 1.5f)); } public override bool AddEventIfOnly() { if (!Compatibility.takeyPlushPresent) { return false; } if (!Manager.transmuteScrap) { Manager.transmuteScrap = true; return true; } return false; } public override void Execute() { Manager.scrapAmountMultiplier *= Getf(ScaleType.ScrapAmount); scrapTransmutationEvent.Execute(); } } internal class TakeyGokuPlushBig : MEvent { public static TakeyGokuPlushBig Instance; public override string Name() { return "TakeyGokuPlushBig"; } public override void Initalize() { //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Expected O, but got Unknown Instance = this; Weight = 1; Descriptions = new List { "TakeyGoku... but harmless", "Big plushie" }; ColorHex = "#A0DB8E"; Type = EventType.Neutral; scrapTransmutationEvent = new ScrapTransmutationEvent(new Scale(0.5f, 0.008f, 0.5f, 0.9f), new SpawnableItemWithRarity(Assets.GetItem("Takey Goku"), 100)); EventsToRemove = new List { "SID", "RealityShift", "Pickles", "TakeyPlush", "SussyPaintings", "TakeyGokuPlush", "Dustpans", "Clock" }; ScaleList.Add(ScaleType.ScrapAmount, new Scale(1f, 0.005f, 1f, 1.5f)); } public override bool AddEventIfOnly() { if (!Compatibility.takeyPlushPresent) { return false; } if (!Manager.transmuteScrap) { Manager.transmuteScrap = true; return true; } return false; } public override void Execute() { Manager.scrapAmountMultiplier *= Getf(ScaleType.ScrapAmount); scrapTransmutationEvent.Execute(); } } public class TakeyPlush : MEvent { public static TakeyPlush Instance; public override string Name() { return "TakeyPlush"; } public override void Initalize() { //IL_007d: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Expected O, but got Unknown Instance = this; Weight = 1; Descriptions = new List { "TakeySit", "I know this guy...", "Streamer?" }; ColorHex = "#008000"; Type = EventType.Good; scrapTransmutationEvent = new ScrapTransmutationEvent(new Scale(0.5f, 0.008f, 0.5f, 0.9f), new SpawnableItemWithRarity(Assets.GetItem("TakeyPlush"), 100)); EventsToRemove = new List { "SID", "RealityShift", "Pickles" }; ScaleList.Add(ScaleType.ScrapAmount, new Scale(1f, 0.005f, 1f, 1.5f)); } public override bool AddEventIfOnly() { if (!Compatibility.takeyPlushPresent) { return false; } if (!Manager.transmuteScrap) { Manager.transmuteScrap = true; return true; } return false; } public override void Execute() { Manager.scrapAmountMultiplier *= Getf(ScaleType.ScrapAmount); scrapTransmutationEvent.Execute(); } } internal class TargetingFailureEvent : MEvent { public static TargetingFailureEvent Instance; public override string Name() { return "TargetingFailureEvent"; } public override void Initalize() { Instance = this; Weight = 4; Descriptions = new List { "텔레포터 조준 시스템: 에러(ERROR)", "텔레포터가 작동합니다... 다만, 당신이 생각하는 방식은 아닐 겁니다." }; ColorHex = "#FF0000"; Type = EventType.Bad; EventsToRemove = new List { "TeleporterFailure", "ShipCoreFailure" }; } public override void Execute() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Expected O, but got Unknown Active = true; GameObject val = new GameObject("TargetingFailureEvent"); val.AddComponent(); } public override void OnShipLeave() { Active = false; } public override void OnGameStart() { Active = false; } } internal class TeleporterFailure : MEvent { public static TeleporterFailure Instance; public override string Name() { return "TeleporterFailure"; } public override void Initalize() { Instance = this; Weight = 4; Descriptions = new List { "텔레포트 시스템: 응답 없음(ERROR)", "텔레포터 오작동: 행운을 빕니다, 조각나지 않기를!" }; ColorHex = "#FF0000"; Type = EventType.Bad; EventsToRemove = new List { "TargetingFailureEvent" }; } public override void Execute() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Expected O, but got Unknown Active = true; GameObject val = new GameObject("TeleporterFailureEvent"); val.AddComponent(); } public override void OnShipLeave() { Active = false; } public override void OnGameStart() { Active = false; } } internal class TeleporterTraps : MEvent { public static TeleporterTraps Instance; public override string Name() { return "TeleporterTraps"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "텔레포터 함정 포착!", "주의: 이 장치는 적들을 당신 곁으로 '배달'해줍니다." }; ColorHex = "#FF0000"; Type = EventType.Bad; ScaleList.Add(ScaleType.MinAmount, new Scale(5f, 0.2f, 5f, 25f)); ScaleList.Add(ScaleType.MaxAmount, new Scale(7f, 0.28f, 7f, 35f)); } public override bool AddEventIfOnly() { return RoundManager.Instance.currentLevel.spawnableMapObjects.ToList().Exists((SpawnableMapObject x) => ((Object)x.prefabToSpawn).name == "TeleporterTrap"); } public override void Execute() { //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Expected O, but got Unknown //IL_0047: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) //IL_0061: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_006b: Unknown result type (might be due to invalid IL or missing references) //IL_0075: Expected O, but got Unknown SelectableLevel currentLevel = RoundManager.Instance.currentLevel; SpawnableMapObject[] spawnableMapObjects = RoundManager.Instance.currentLevel.spawnableMapObjects; SpawnableMapObject val = new SpawnableMapObject(); val.prefabToSpawn = Assets.GetObject("TeleporterTrap"); val.numberToSpawn = new AnimationCurve((Keyframe[])(object)new Keyframe[2] { new Keyframe(0f, (float)Get(ScaleType.MinAmount)), new Keyframe(1f, (float)Get(ScaleType.MaxAmount)) }); val.spawnFacingAwayFromWall = false; val.spawnFacingWall = false; val.spawnWithBackToWall = false; val.spawnWithBackFlushAgainstWall = false; val.requireDistanceBetweenSpawns = false; val.disallowSpawningNearEntrances = false; currentLevel.spawnableMapObjects = spawnableMapObjects.Add(val); } } internal class TerminalFailure : MEvent { public static TerminalFailure Instance; public override string Name() { return "TerminalFailure"; } public override void Initalize() { Instance = this; Weight = 4; Descriptions = new List { "터미널 치명적 오류", "터미널 콘솔: 오프라인" }; ColorHex = "#FF0000"; Type = EventType.Bad; } public override void Execute() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Expected O, but got Unknown Active = true; GameObject val = new GameObject("TerminalFailureEvent"); val.AddComponent(); } public override void OnShipLeave() { Active = false; } public override void OnGameStart() { Active = false; } } internal class TheFiend : MEvent { public static TheFiend Instance; public override string Name() { return "TheFiend"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "악마가 이미 시설 안에 침투했습니다", "주의: 심장 마비를 유발할 수 있음", "플래시 비추지 마세요... 자극해서 좋을 거 없거든요" }; ColorHex = "#800000"; Type = EventType.VeryBad; monstersToSpawn = new List { new MonsterEvent("TheFiend", new Scale(8f, 0.4f, 8f, 32f), new Scale(1f, 0.034f, 1f, 3f), new Scale(1f, 0.034f, 1f, 3f), new Scale(1f, 0.034f, 1f, 3f), new Scale(0f, 0.022f, 0f, 1f), new Scale(0f, 0.034f, 0f, 2f)) }; } public override bool AddEventIfOnly() { return Compatibility.theFiendPresent; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class ToilHead : MEvent { public static ToilHead Instance; public override string Name() { return "ToilHead"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "이건 제네바 협약 위반 수준인데요?", "코일헤드 군단!", "코일헤드가 소프트웨어 업데이트를 마쳤습니다. (더 빨라졌단 소리죠)", "머리, 머리, 온통 머리뿐이야!", "이 모드 깔라고 칼 들고 협박 안 했습니다?" }; ColorHex = "#800000"; Type = EventType.VeryBad; EventsToRemove = new List { "Coilhead", "AntiCoilhead" }; monstersToSpawn = new List { new MonsterEvent(Assets.EnemyName.CoilHead, new Scale(30f, 1f, 30f, 90f), new Scale(10f, 0.34f, 10f, 30f), new Scale(1f, 0.034f, 1f, 3f), new Scale(2f, 0.034f, 1f, 4f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)), new MonsterEvent(Assets.antiCoilHead, new Scale(10f, 0.34f, 10f, 30f), new Scale(1f, 0.034f, 1f, 3f), new Scale(0f, 0.022f, 0f, 1f), new Scale(1f, 0.0167f, 1f, 2f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)) }; } public override bool AddEventIfOnly() { return Compatibility.toilheadPresent; } public override void Execute() { if (Compatibility.toilheadPresent) { Assets.antiCoilHead.enemyName = "Spring"; ExecuteAllMonsterEvents(); Api.ForceToilHeadSpawns = true; } } } internal class ToilSlayer : MEvent { public static ToilSlayer Instance; public override string Name() { return "ToilSlayer"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "내장형 미니건 탑재", "코일헤드... 그 이상의 '무언가'", "코일 슬레이어!!! (당신이 썰릴 차례입니다)" }; ColorHex = "#800000"; Type = EventType.VeryBad; EventsToRemove = new List { "Coilhead", "AntiCoilhead", "ToilHead", "MantiToilSlayer", "NoToilSlayer", "NoMantitoil", "NoSlayers", "AllSlayers" }; monstersToSpawn = new List { new MonsterEvent(Assets.EnemyName.CoilHead, new Scale(30f, 1f, 30f, 90f), new Scale(10f, 0.34f, 10f, 30f), new Scale(1f, 0.034f, 1f, 3f), new Scale(2f, 0.034f, 1f, 4f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)) }; } public override bool AddEventIfOnly() { return Compatibility.toilheadPresent; } public override void Execute() { if (Compatibility.toilheadPresent) { ExecuteAllMonsterEvents(); Api.ForceToilSlayerMaxSpawnCount = 15; Api.ForceToilSlayerSpawns = true; Api.ForceMantiSlayerMaxSpawnCount = 0; Api.ForceToilHeadMaxSpawnCount = 0; } } } internal class Walkers : MEvent { public static Walkers Instance; public override string Name() { return "Walkers"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "워커가 시설 내부에 진입했습니다!", "여분 속옷 챙겨오셨길 바랍니다. 지릴 수도 있거든요.", "정신이 나갈 것 같습니다... 아니면 이미 나갔거나요." }; ColorHex = "#800000"; Type = EventType.VeryBad; monstersToSpawn = new List { new MonsterEvent("WalkerType", new Scale(8f, 0.4f, 8f, 32f), new Scale(1f, 0.034f, 1f, 3f), new Scale(1f, 0.034f, 1f, 3f), new Scale(1f, 0.034f, 1f, 3f), new Scale(0f, 0.022f, 0f, 1f), new Scale(0f, 0.034f, 0f, 2f)) }; } public override bool AddEventIfOnly() { return Compatibility.diversityPresent; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class WalkieFailure : MEvent { public static WalkieFailure Instance; public override string Name() { return "WalkieFailure"; } public override void Initalize() { Instance = this; Weight = 4; Descriptions = new List { "무전 시스템: 오프라인(OFFLINE)", "무전기가 먹통입니다. 이제 비명도 안 들리겠네요." }; ColorHex = "#FF0000"; Type = EventType.Bad; } public override void Execute() { //IL_000d: Unknown result type (might be due to invalid IL or missing references) //IL_0013: Expected O, but got Unknown Active = true; GameObject val = new GameObject("WalkeFailureEvent"); val.AddComponent(); } public override void OnShipLeave() { Active = false; } public override void OnGameStart() { Active = false; } } internal class WelcomeToOoblterra : MEvent { public static WelcomeToOoblterra Instance; public override string Name() { return "WelcomeToOoblterra"; } public override void Initalize() { Instance = this; Weight = 2; Descriptions = new List { "우블테라(Ooblterra)에 오신 걸 환영합니다", "이름부터 심상치 않죠... 우블테라라니!", "우블테라는 공포와 괴물들로 가득 찬 지옥입니다" }; ColorHex = "#FF0000"; Type = EventType.VeryBad; monstersToSpawn = new List { new MonsterEvent("Wanderer", new Scale(0f, 0f, 0f, 0f), new Scale(8f, 0.35f, 8f, 10f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(3f, 0.73f, 1f, 3f), new Scale(3f, 0.61f, 3f, 5f)), new MonsterEvent("AdultWanderer", new Scale(0f, 0f, 0f, 0f), new Scale(8f, 0.35f, 8f, 10f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f), new Scale(1f, 0.73f, 1f, 2f), new Scale(2f, 0.61f, 2f, 2f)), new MonsterEvent("EyeSecurity", new Scale(8f, 0.31f, 0f, 10.5f), new Scale(0f, 0f, 0f, 0f), new Scale(2f, 0.35f, 2f, 4f), new Scale(4f, 0.21f, 4f, 6f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)), new MonsterEvent("Gallenarma ", new Scale(0.5f, 0.11f, 0f, 8.5f), new Scale(0f, 0f, 0f, 0f), new Scale(1f, 0.32f, 1f, 2f), new Scale(2f, 0.65f, 1f, 3f), new Scale(0f, 0f, 0f, 0f), new Scale(0f, 0f, 0f, 0f)) }; } public override bool AddEventIfOnly() { return Compatibility.OoblterraPresent; } public override void Execute() { ExecuteAllMonsterEvents(); } } internal class Windy : MEvent { public static Windy Instance; public override string Name() { return "Windy"; } public override void Initalize() { Instance = this; Weight = 3; Descriptions = new List { "토네이도 주의보 발령!", "초대형 토네이도가 접근 중입니다!", "즉시 함선으로 대피하십시오! (아니면 날아가던가요)" }; ColorHex = "#FF0000"; Type = EventType.Bad; EventsToRemove = new List { "Hurricane", "Hallowed", "Forsaken", "BloodMoon", "MajoraMoon", "SolarFlare", "MeteorShower", "Gloomy", "Raining", "AllWeather" }; } public override bool AddEventIfOnly() { return Compatibility.CodeRebirthPresent && Compatibility.WeatherRegistryPresent; } public override void Execute() { if (Compatibility.CodeRebirthPresent) { CustomWeather.SetCustomWeather("Tornado"); } } } internal class YeetBomb : MEvent { public static YeetBomb Instance; public override string Name() { return "YeetBomb"; } public override void Initalize() { Instance = this; Weight = 2; Descriptions = new List { "당신은 곧 사출될 예정입니다", "슈웅~ (YEET!)", "날아가는 거 좋아하세요? '공중 부양' 한 번 가시죠!" }; ColorHex = "#FF0000"; Type = EventType.Bad; ScaleList.Add(ScaleType.MinDensity, new Scale(0.01f, 0.0004f, 0.016f, 0.086f)); ScaleList.Add(ScaleType.MaxDensity, new Scale(0.0168f, 0.00592f, 0.0128f, 0.18f)); } public override bool AddEventIfOnly() { return Compatibility.VarietyPresent; } public override void Execute() { Manager.insideObjectsToSpawnOutside.Add(new Manager.ObjectInfo(Assets.GetObject("Yeetmine"), Random.Range(Getf(ScaleType.MinDensity), Getf(ScaleType.MaxDensity)))); } } } namespace BrutalCompanyMinus.Minus.CustomEvents { public class GeneralCustomEvent : MEvent { public class HazardEvent : MEvent { public bool isInside; public GameObject hazardObject; public Scale minDensity; public Scale maxDensity; public bool facingAwayFromWall; public bool facingWall; public bool backToWall; public bool backFlushWithWall; public bool requireDistanceBetween; public bool disallowNearEntrances; public bool allowInMineshaft; public HazardEvent(GameObject hazardObject, Scale minDensity, Scale maxDensity) { isInside = false; this.hazardObject = hazardObject; AssignSpawnParameters(minDensity, maxDensity); ScaleList.Add(ScaleType.MinDensity, minDensity); ScaleList.Add(ScaleType.MaxDensity, maxDensity); } public HazardEvent(Assets.ObjectName hazardName, Scale minDensity, Scale maxDensity) { isInside = false; hazardObject = Assets.GetObject(hazardName); AssignSpawnParameters(minDensity, maxDensity); ScaleList.Add(ScaleType.MinDensity, minDensity); ScaleList.Add(ScaleType.MaxDensity, maxDensity); } public HazardEvent(string hazardName, Scale minDensity, Scale maxDensity) { isInside = false; hazardObject = Assets.GetObject(hazardName); AssignSpawnParameters(minDensity, maxDensity); ScaleList.Add(ScaleType.MinDensity, minDensity); ScaleList.Add(ScaleType.MaxDensity, maxDensity); } public HazardEvent(GameObject hazardObject, Scale minAmount, Scale maxAmount, bool facingAwayFromWall, bool facingWall, bool backToWall, bool backFlushWithWall, bool requireDistanceBetween, bool disallowNearEntrances, bool allowInMineshaft) { isInside = true; this.hazardObject = hazardObject; AssignSpawnParameters(minAmount, maxAmount, facingAwayFromWall, facingWall, backToWall, backFlushWithWall, requireDistanceBetween, disallowNearEntrances, allowInMineshaft); ScaleList.Add(ScaleType.MinAmount, minAmount); ScaleList.Add(ScaleType.MaxAmount, maxAmount); } public HazardEvent(Assets.ObjectName hazardName, Scale minAmount, Scale maxAmount, bool facingAwayFromWall, bool facingWall, bool backToWall, bool backFlushWithWall, bool requireDistanceBetween, bool disallowNearEntrances, bool allowInMineshaft) { isInside = true; hazardObject = Assets.GetObject(hazardName); AssignSpawnParameters(minAmount, maxAmount, facingAwayFromWall, facingWall, backToWall, backFlushWithWall, requireDistanceBetween, disallowNearEntrances, allowInMineshaft); ScaleList.Add(ScaleType.MinAmount, minAmount); ScaleList.Add(ScaleType.MaxAmount, maxAmount); } public HazardEvent(string hazardName, Scale minAmount, Scale maxAmount, bool facingAwayFromWall, bool facingWall, bool backToWall, bool backFlushWithWall, bool requireDistanceBetween, bool disallowNearEntrances, bool allowInMineshaft) { isInside = true; hazardObject = Assets.GetObject(hazardName); AssignSpawnParameters(minAmount, maxAmount, facingAwayFromWall, facingWall, backToWall, backFlushWithWall, requireDistanceBetween, disallowNearEntrances, allowInMineshaft); ScaleList.Add(ScaleType.MinAmount, minAmount); ScaleList.Add(ScaleType.MaxAmount, maxAmount); } private void AssignSpawnParameters(Scale minDensity, Scale maxDensity) { this.minDensity = minDensity; this.maxDensity = maxDensity; } private void AssignSpawnParameters(Scale minAmount, Scale maxAmount, bool facingAwayFromWall, bool facingWall, bool backToWall, bool backFlushWithWall, bool requireDistanceBetween, bool disallowNearEntrances, bool allowInMineshaft) { minDensity = minAmount; maxDensity = maxAmount; this.facingWall = facingWall; this.facingAwayFromWall = facingAwayFromWall; this.backToWall = backToWall; this.backFlushWithWall = backFlushWithWall; this.requireDistanceBetween = requireDistanceBetween; this.disallowNearEntrances = disallowNearEntrances; this.allowInMineshaft = allowInMineshaft; } public new void Execute() { //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0118: Expected O, but got Unknown //IL_0139: Unknown result type (might be due to invalid IL or missing references) //IL_013e: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_015d: Unknown result type (might be due to invalid IL or missing references) //IL_0167: Expected O, but got Unknown if ((Object)(object)hazardObject == (Object)null) { Log.LogError("Hazard object is null for " + ((Object)hazardObject).name); return; } bool flag = false; if (Compatibility.DawnLibPresent && (flag = DawnLibHandling.IsDawnManaged(((Object)hazardObject).name))) { DawnLibHandling.eventQueue.Enqueue(this); } Log.LogInfo($"DawnLib spawned for {((Object)hazardObject).name}: {flag}"); if (!flag) { if (isInside) { IndoorMapHazardType val = ScriptableObject.CreateInstance(); val.prefabToSpawn = hazardObject; val.spawnFacingAwayFromWall = facingAwayFromWall; val.spawnFacingWall = facingWall; val.spawnWithBackToWall = backToWall; val.spawnWithBackFlushAgainstWall = backFlushWithWall; val.requireDistanceBetweenSpawns = requireDistanceBetween; val.disallowSpawningNearEntrances = disallowNearEntrances; val.allowInMineshaft = allowInMineshaft; IndoorMapHazard val2 = new IndoorMapHazard(); val2.hazardType = val; val2.numberToSpawn = new AnimationCurve((Keyframe[])(object)new Keyframe[2] { new Keyframe(0f, (float)Get(ScaleType.MinAmount)), new Keyframe(1f, (float)Get(ScaleType.MaxAmount)) }); IndoorMapHazard val3 = val2; EventManager.hazards.Add(val3); RoundManager.Instance.currentLevel.indoorMapHazards = CollectionExtensions.AddToArray(RoundManager.Instance.currentLevel.indoorMapHazards, val3); } else { Manager.insideObjectsToSpawnOutside.Add(new Manager.ObjectInfo(hazardObject, Random.Range(Getf(ScaleType.MinDensity), Getf(ScaleType.MaxDensity)))); } } } } private string name = "0"; private CustomEventHandling.EventData? eventData; public List hazardEvents; public GeneralCustomEvent(string path) { eventData = CustomEventHandling.ReadFile(path); hazardEvents = new List(); } public override string Name() { return name; } public override void Initalize() { //IL_01ac: Unknown result type (might be due to invalid IL or missing references) //IL_01b6: Expected O, but got Unknown Log.LogInfo("Running Custom Event Initialization"); if (eventData != null) { name = eventData.Name; Type = eventData.Type; Weight = eventData.Weight; ColorHex = eventData.Color; Descriptions = eventData.Descriptions; Enabled = eventData.Enabled; showTip = eventData.showTip; isWarning = eventData.isWarning; MoonMode = eventData.MoonMode; isSpecialEvent = eventData.isSpecialEvent; isBetaEvent = eventData.isBetaEvent; SanitizeName(); if (Descriptions.Count == 0) { Descriptions.Add("Please add a description to " + name + " event"); } if (eventData.Items != null) { Scale amount = CustomEventHandling.ArrayToScale(eventData.Items.TransmuteAmount); Scale value = CustomEventHandling.ArrayToScale(eventData.Items.ScrapAmount); Scale value2 = CustomEventHandling.ArrayToScale(eventData.Items.ScrapValue); List list = new List(); foreach (CustomEventHandling.ItemData item in eventData.Items.Items) { list.Add(new SpawnableItemWithRarity(Assets.GetItem(item.Name), item.Rarity)); } scrapTransmutationEvent = new ScrapTransmutationEvent(amount, list.ToArray()); ScaleList.Add(ScaleType.ScrapAmount, value); ScaleList.Add(ScaleType.ScrapValue, value2); } if (eventData.Enemies != null && eventData.Enemies.Count > 0) { foreach (CustomEventHandling.EnemyData enemy in eventData.Enemies) { Scale insideSpawnRarity = CustomEventHandling.ArrayToScale(enemy.InsideRarity); Scale outsideSpawnRarity = CustomEventHandling.ArrayToScale(enemy.OutsideRarity); Scale minInside = CustomEventHandling.ArrayToScale(enemy.MinInside); Scale maxInside = CustomEventHandling.ArrayToScale(enemy.MaxInside); Scale minOutside = CustomEventHandling.ArrayToScale(enemy.MinOutside); Scale maxOutside = CustomEventHandling.ArrayToScale(enemy.MaxOutside); monstersToSpawn.Add(new MonsterEvent(enemy.Name, insideSpawnRarity, outsideSpawnRarity, minInside, maxInside, minOutside, maxOutside)); } } if (eventData.Hazards != null && eventData.Hazards.Count > 0) { foreach (BaseHazardData hazard in eventData.Hazards) { if (hazard is OutsideHazardData) { OutsideHazardData outsideHazardData = (OutsideHazardData)hazard; Scale minDensity = CustomEventHandling.ArrayToScale(outsideHazardData.MinDensity); Scale maxDensity = CustomEventHandling.ArrayToScale(outsideHazardData.MaxDensity); hazardEvents.Add(new HazardEvent(hazard.PrefabName, minDensity, maxDensity)); } else if (hazard is InsideHazardData) { InsideHazardData insideHazardData = (InsideHazardData)hazard; Scale minAmount = CustomEventHandling.ArrayToScale(insideHazardData.MinSpawn); Scale maxAmount = CustomEventHandling.ArrayToScale(insideHazardData.MaxSpawn); hazardEvents.Add(new HazardEvent(hazard.PrefabName, minAmount, maxAmount, insideHazardData.SpawnOptions.FacingAwayFromWall, insideHazardData.SpawnOptions.FacingWall, insideHazardData.SpawnOptions.BackToWall, insideHazardData.SpawnOptions.BackFlushWithWall, insideHazardData.SpawnOptions.RequireDistanceBetween, insideHazardData.SpawnOptions.DisallowNearEntrances, insideHazardData.SpawnOptions.AllowInMineshaft)); } } } if (eventData.EventsToRemove != null && eventData.EventsToRemove.Count > 0) { EventsToRemove = eventData.EventsToRemove; } if (eventData.EventsToSpawnWith != null && eventData.EventsToSpawnWith.Count > 0) { EventsToSpawnWith = eventData.EventsToSpawnWith; } if (eventData.MoonBlacklist != null && eventData.MoonBlacklist.Count > 0) { Blacklist = eventData.MoonBlacklist; } if (eventData.MoonWhitelist != null && eventData.MoonWhitelist.Count > 0) { Whitelist = eventData.MoonWhitelist; } if (eventData.TipMessages != null && eventData.TipMessages.Count > 0) { TipMessages = eventData.TipMessages; } if (eventData.TipTitle != null && eventData.TipTitle.Count > 0) { TipTitle = eventData.TipTitle; } if (eventData.Aliases != null && eventData.Aliases.Count > 0) { Aliases = eventData.Aliases; } Log.LogInfo(name + " event initialized"); } else { Enabled = false; Log.LogInfo("No event data received. Check if your event files are valid JSON"); } } public override bool AddEventIfOnly() { if (eventData == null) { return false; } if (eventData.AddEventIfOnly != null && eventData.AddEventIfOnly.Count > 0) { foreach (string item in eventData.AddEventIfOnly) { Log.LogInfo($"{name} contains {item}: {Chainloader.PluginInfos.ContainsKey(item)}"); if (!Chainloader.PluginInfos.ContainsKey(item)) { return false; } } } if (eventData.Items != null) { if (Manager.transmuteScrap) { return false; } Manager.transmuteScrap = true; } return true; } public override void Execute() { ExecuteAllMonsterEvents(); if (eventData.Items != null) { Manager.scrapAmountMultiplier *= Getf(ScaleType.ScrapAmount); scrapTransmutationEvent.Execute(); } if (!string.IsNullOrWhiteSpace(eventData.Weather) && Compatibility.IsModPresent("mrov.WeatherRegistry")) { CustomWeather.SetCustomWeather(eventData.Weather); } foreach (HazardEvent hazardEvent in hazardEvents) { hazardEvent.Execute(); } } private void SanitizeName() { string text = name; name = name.Replace("\n", "").Replace("\t", "").Replace("\\", "") .Replace("\"", "") .Replace("'", "") .Replace("[", "") .Replace("]", "") .Replace(" ", ""); if (name != text) { Log.LogWarning(text + " has been renamed to " + name + " due to invalid characters"); } } } } namespace System.Runtime.CompilerServices { [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)] internal sealed class IgnoresAccessChecksToAttribute : Attribute { public IgnoresAccessChecksToAttribute(string assemblyName) { } } } namespace __GEN { internal class NetworkVariableSerializationHelper { [RuntimeInitializeOnLoadMethod] internal static void InitializeSerialization() { NetworkVariableSerializationTypes.InitializeSerializer_UnmanagedINetworkSerializable(); NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedIEquatable(); NetworkVariableSerializationTypes.InitializeSerializer_UnmanagedINetworkSerializable(); NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedIEquatable(); NetworkVariableSerializationTypes.InitializeSerializer_UnmanagedINetworkSerializable(); NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedIEquatable(); NetworkVariableSerializationTypes.InitializeSerializer_FixedString(); NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedIEquatable(); NetworkVariableSerializationTypes.InitializeSerializer_UnmanagedByMemcpy(); NetworkVariableSerializationTypes.InitializeEqualityChecker_UnmanagedIEquatable(); } } } namespace BrutalCompanyMinus.NetcodePatcher { [AttributeUsage(AttributeTargets.Module)] internal class NetcodePatchedAssemblyAttribute : Attribute { } }