Please disclose if any significant portion of your mod was created using AI tools by adding the 'AI Generated' category. Failing to do so may result in the mod being removed from Thunderstore.
Decompiled source of CoolPeopleMod v1.1.6
CoolPeopleMod/Snowlance.CoolPeopleMod.dll
Decompiled 10 months ago
The result has been truncated due to the large size, download it to view full contents!
using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Configuration; using BepInEx.Logging; using CoolPeopleMod.Items.PinataPlush; using CoolPeopleMod.Items.RatPlush; using GameNetcodeStuff; using HarmonyLib; using LethalLib.Extras; using LethalLib.Modules; using Microsoft.CodeAnalysis; using Snowlance.CoolPeopleMod.NetcodePatcher; using Unity.Netcode; using UnityEngine; using UnityEngine.AI; [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: IgnoresAccessChecksTo("AmazingAssets.TerrainToMesh")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp-firstpass")] [assembly: IgnoresAccessChecksTo("Assembly-CSharp")] [assembly: IgnoresAccessChecksTo("ClientNetworkTransform")] [assembly: IgnoresAccessChecksTo("com.olegknyazev.softmask")] [assembly: IgnoresAccessChecksTo("DissonanceVoip")] [assembly: IgnoresAccessChecksTo("EasyTextEffects")] [assembly: IgnoresAccessChecksTo("Facepunch Transport for Netcode for GameObjects")] [assembly: IgnoresAccessChecksTo("Facepunch.Steamworks.Win64")] [assembly: IgnoresAccessChecksTo("Unity.AI.Navigation")] [assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging")] [assembly: IgnoresAccessChecksTo("Unity.Animation.Rigging.DocCodeExamples")] [assembly: IgnoresAccessChecksTo("Unity.Burst")] [assembly: IgnoresAccessChecksTo("Unity.Burst.Unsafe")] [assembly: IgnoresAccessChecksTo("Unity.Collections")] [assembly: IgnoresAccessChecksTo("Unity.Collections.LowLevel.ILSupport")] [assembly: IgnoresAccessChecksTo("Unity.InputSystem")] [assembly: IgnoresAccessChecksTo("Unity.InputSystem.ForUI")] [assembly: IgnoresAccessChecksTo("Unity.Jobs")] [assembly: IgnoresAccessChecksTo("Unity.Mathematics")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.Common")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.MetricTypes")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStats")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Component")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Configuration")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsMonitor.Implementation")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetStatsReporting")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkProfiler.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.Multiplayer.Tools.NetworkSolutionInterface")] [assembly: IgnoresAccessChecksTo("Unity.Netcode.Components")] [assembly: IgnoresAccessChecksTo("Unity.Netcode.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.Networking.Transport")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Csg")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.KdTree")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Poly2Tri")] [assembly: IgnoresAccessChecksTo("Unity.ProBuilder.Stl")] [assembly: IgnoresAccessChecksTo("Unity.Profiling.Core")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.Core.ShaderLibrary")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Config.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.HighDefinition.Runtime")] [assembly: IgnoresAccessChecksTo("Unity.RenderPipelines.ShaderGraph.ShaderGraphLibrary")] [assembly: IgnoresAccessChecksTo("Unity.Services.Authentication")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Analytics")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Components")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Configuration")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Device")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Environments.Internal")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Internal")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Networking")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Registration")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Scheduler")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Telemetry")] [assembly: IgnoresAccessChecksTo("Unity.Services.Core.Threading")] [assembly: IgnoresAccessChecksTo("Unity.Services.QoS")] [assembly: IgnoresAccessChecksTo("Unity.Services.Relay")] [assembly: IgnoresAccessChecksTo("Unity.TextMeshPro")] [assembly: IgnoresAccessChecksTo("Unity.Timeline")] [assembly: IgnoresAccessChecksTo("Unity.VisualEffectGraph.Runtime")] [assembly: IgnoresAccessChecksTo("UnityEngine.ARModule")] [assembly: IgnoresAccessChecksTo("UnityEngine.NVIDIAModule")] [assembly: IgnoresAccessChecksTo("UnityEngine.UI")] [assembly: AssemblyCompany("Snowlance.CoolPeopleMod")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.1.6.0")] [assembly: AssemblyInformationalVersion("1.1.6+1c359462306739a06e2abf36fbdb60eb966f4cdb")] [assembly: AssemblyProduct("CoolPeopleMod")] [assembly: AssemblyTitle("Snowlance.CoolPeopleMod")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.1.6.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 Spinner : MonoBehaviour { public bool IsBeingUsed = false; private float SpinVelocity = 0f; private float SpinAcceleration = 100f; private float NormalSpinVelocity = 90f; private float CurrentTimer = 0f; private float SpinningTime = 3f; private Quaternion InitialRotation; private Quaternion FromRotation; private void Start() { //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) InitialRotation = ((Component)this).transform.rotation; } public void StartHyperSpinning(float spinTime) { IsBeingUsed = true; SpinVelocity = NormalSpinVelocity; SpinAcceleration = 1000f; SpinningTime = spinTime; } public void StopHyperSpinning() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) IsBeingUsed = false; SpinVelocity = 0f; SpinAcceleration = 0f; FromRotation = ((Component)this).transform.rotation; } private void Update() { //IL_0096: 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_00d0: 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) if (IsBeingUsed) { CurrentTimer += Time.deltaTime; if (CurrentTimer >= SpinningTime) { StopHyperSpinning(); CurrentTimer = 0f; } } if (!IsBeingUsed) { ((Component)this).transform.Rotate(Vector3.forward, NormalSpinVelocity * Time.deltaTime); return; } SpinVelocity += SpinAcceleration * Time.deltaTime; ((Component)this).transform.Rotate(Vector3.up, SpinVelocity * Time.deltaTime); ((Component)this).transform.Rotate(Vector3.forward, SpinVelocity * Time.deltaTime); ((Component)this).transform.Rotate(Vector3.right, SpinVelocity * Time.deltaTime); } } namespace CoolPeopleMod { internal class GlitchPlushBehavior : PhysicsProp { private static ManualLogSource logger = Plugin.LoggerInstance; public AnimationCurve grenadeFallCurve; public AnimationCurve grenadeVerticalFallCurve; public AnimationCurve grenadeVerticalFallCurveNoBounce; public AudioSource ItemAudio; public AudioClip BaldSFX; public AudioClip DefaultSFX; public AudioClip RodrigoSFX; public Animator ItemAnimator; public Material HairMat; public SkinnedMeshRenderer HairRenderer; private Random? random; private bool initializedRandomSeed; private Ray grenadeThrowRay; private RaycastHit grenadeHit; private int stunGrenadeMask = 268437761; private int explodeGlitchChance = 500; private bool isThrown; public override void Start() { ((GrabbableObject)this).Start(); if (!RoundManager.Instance.hasInitializedLevelRandomSeed) { RoundManager.Instance.InitializeRandomNumberGenerators(); } logger.LogDebug((object)"initialized random number generators"); if (Plugin.localPlayer.playerSteamId == 76561198984467725L || Utils.testing) { ((Renderer)HairRenderer).material = HairMat; } } public override void ItemActivate(bool used, bool buttonDown = true) { //IL_00fb: 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) ((GrabbableObject)this).ItemActivate(used, buttonDown); if (((GrabbableObject)this).playerHeldBy.playerSteamId == 76561198253760639L || ((GrabbableObject)this).playerHeldBy.playerSteamId == 76561198984467725L || Utils.testing) { if (!initializedRandomSeed) { int seed = StartOfRound.Instance.randomMapSeed + 158; logger.LogDebug((object)("Assigning new random with seed: " + seed)); random = new Random(seed); initializedRandomSeed = true; } if (random.Next(1, explodeGlitchChance + 1) == 1) { Landmine.SpawnExplosion(((Component)this).transform.position, true, 10f, 6f, 50, 0f, (GameObject)null, false); return; } isThrown = true; ((GrabbableObject)this).playerHeldBy.DiscardHeldObject(true, (NetworkObject)null, GetGrenadeThrowDestination(((Component)((GrabbableObject)this).playerHeldBy.gameplayCamera).transform), true); ItemAudio.PlayOneShot(BaldSFX); } else if (((GrabbableObject)this).playerHeldBy.playerSteamId == 76561198164429786L) { ItemAnimator.SetTrigger("squeeze"); ItemAudio.PlayOneShot(RodrigoSFX); } else { ItemAnimator.SetTrigger("squeeze"); ItemAudio.PlayOneShot(DefaultSFX); } } public Vector3 GetGrenadeThrowDestination(Transform ejectPoint) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_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_002b: 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_003b: 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_0088: 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_008d: 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_008f: 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_00a5: 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) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) //IL_00b6: Unknown result type (might be due to invalid IL or missing references) //IL_0106: Unknown result type (might be due to invalid IL or missing references) //IL_010b: Unknown result type (might be due to invalid IL or missing references) //IL_00dd: 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_00ec: 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_00f6: 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_0131: 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_013c: 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_0140: Unknown result type (might be due to invalid IL or missing references) Vector3 position = ((Component)this).transform.position; Debug.DrawRay(ejectPoint.position, ejectPoint.forward, Color.yellow, 15f); grenadeThrowRay = new Ray(ejectPoint.position, ejectPoint.forward); position = ((!Physics.Raycast(grenadeThrowRay, ref grenadeHit, 12f, stunGrenadeMask, (QueryTriggerInteraction)1)) ? ((Ray)(ref grenadeThrowRay)).GetPoint(10f) : ((Ray)(ref grenadeThrowRay)).GetPoint(((RaycastHit)(ref grenadeHit)).distance - 0.05f)); Debug.DrawRay(position, Vector3.down, Color.blue, 15f); grenadeThrowRay = new Ray(position, Vector3.down); position = ((!Physics.Raycast(grenadeThrowRay, ref grenadeHit, 30f, stunGrenadeMask, (QueryTriggerInteraction)1)) ? ((Ray)(ref grenadeThrowRay)).GetPoint(30f) : (((RaycastHit)(ref grenadeHit)).point + Vector3.up * 0.05f)); return position + new Vector3(Random.Range(-1f, 1f), 0f, Random.Range(-1f, 1f)); } public override void FallWithCurve() { //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) //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_0031: 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_0050: 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_0070: 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_0088: 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_014e: 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_0173: 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_0199: 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_01b9: Unknown result type (might be due to invalid IL or missing references) //IL_00c5: Unknown result type (might be due to invalid IL or missing references) //IL_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_00f5: 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_011a: 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) Vector3 val = ((GrabbableObject)this).startFallingPosition - ((GrabbableObject)this).targetFloorPosition; float magnitude = ((Vector3)(ref val)).magnitude; Quaternion val2 = Quaternion.Euler(((GrabbableObject)this).itemProperties.restingRotation.x, ((Component)this).transform.eulerAngles.y, ((GrabbableObject)this).itemProperties.restingRotation.z); ((Component)this).transform.rotation = Quaternion.Lerp(((Component)this).transform.rotation, val2, 14f * Time.deltaTime / magnitude); ((Component)this).transform.localPosition = Vector3.Lerp(((GrabbableObject)this).startFallingPosition, ((GrabbableObject)this).targetFloorPosition, grenadeFallCurve.Evaluate(((GrabbableObject)this).fallTime)); if (magnitude > 5f) { ((Component)this).transform.localPosition = Vector3.Lerp(new Vector3(((Component)this).transform.localPosition.x, ((GrabbableObject)this).startFallingPosition.y, ((Component)this).transform.localPosition.z), new Vector3(((Component)this).transform.localPosition.x, ((GrabbableObject)this).targetFloorPosition.y, ((Component)this).transform.localPosition.z), grenadeVerticalFallCurveNoBounce.Evaluate(((GrabbableObject)this).fallTime)); } else { ((Component)this).transform.localPosition = Vector3.Lerp(new Vector3(((Component)this).transform.localPosition.x, ((GrabbableObject)this).startFallingPosition.y, ((Component)this).transform.localPosition.z), new Vector3(((Component)this).transform.localPosition.x, ((GrabbableObject)this).targetFloorPosition.y, ((Component)this).transform.localPosition.z), grenadeVerticalFallCurve.Evaluate(((GrabbableObject)this).fallTime)); } ((GrabbableObject)this).fallTime = ((GrabbableObject)this).fallTime + Mathf.Abs(Time.deltaTime * 12f / magnitude); } public override void OnHitGround() { //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) ((GrabbableObject)this).OnHitGround(); if (isThrown) { Landmine.SpawnExplosion(((Component)this).transform.position + Vector3.up, true, 1.5f, 5.7f, 50, 0f, (GameObject)null, false); isThrown = false; } } protected override void __initializeVariables() { ((PhysicsProp)this).__initializeVariables(); } protected override void __initializeRpcs() { ((PhysicsProp)this).__initializeRpcs(); } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "GlitchPlushBehavior"; } } public class StatusEffectController : MonoBehaviour { [CompilerGenerated] private sealed class <DamagePlayerOverTimeCoroutine>d__35 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public int damage; public int perSeconds; public bool untilDead; public int totalSeconds; public StatusEffectController <>4__this; private int <seconds>5__1; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <DamagePlayerOverTimeCoroutine>d__35(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_005f: 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_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Expected O, but got Unknown //IL_00ee: Unknown result type (might be due to invalid IL or missing references) //IL_00f4: 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_0120: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; if (untilDead) { goto IL_00bc; } <seconds>5__1 = 0; break; case 1: <>1__state = -1; goto IL_00bc; case 2: { <>1__state = -1; break; } IL_00bc: if (!Plugin.localPlayer.isPlayerDead) { Plugin.localPlayer.inSpecialInteractAnimation = true; Plugin.localPlayer.DamagePlayer(damage, false, true, (CauseOfDeath)0, 0, false, default(Vector3)); HUDManager.Instance.ShakeCamera((ScreenShakeType)0); Plugin.localPlayer.inSpecialInteractAnimation = false; HUDManager.Instance.UpdateHealthUI(Plugin.localPlayer.health, false); <>2__current = (object)new WaitForSecondsRealtime((float)perSeconds); <>1__state = 1; return true; } return false; } if (<seconds>5__1 < totalSeconds) { Plugin.localPlayer.DamagePlayer(damage, false, true, (CauseOfDeath)0, 0, false, default(Vector3)); <seconds>5__1 += perSeconds; <>2__current = (object)new WaitForSecondsRealtime((float)perSeconds); <>1__state = 2; return 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 <DamageReductionCoroutine>d__32 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public int seconds; public int percent; public StatusEffectController <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <DamageReductionCoroutine>d__32(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_00a0: Unknown result type (might be due to invalid IL or missing references) //IL_00aa: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.damageReductionSeconds = seconds; <>4__this.damageReductionPercent = percent; break; case 1: <>1__state = -1; break; } if (<>4__this.damageReductionSeconds > 0) { logger.LogDebug((object)("Damage Reduction: " + <>4__this.damageReductionPercent + " " + <>4__this.damageReductionSeconds)); <>4__this.damageReductionSeconds--; <>2__current = (object)new WaitForSecondsRealtime(1f); <>1__state = 1; return true; } <>4__this.damageReductionPercent = 0; <>4__this.damageReductionSeconds = 0; <>4__this.damageReductionCoroutine = 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(); } } [CompilerGenerated] private sealed class <HealthRegenCoroutine>d__30 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public int hpPerSecond; public int seconds; public StatusEffectController <>4__this; private int <i>5__1; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <HealthRegenCoroutine>d__30(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>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 switch (<>1__state) { default: return false; case 0: <>1__state = -1; <i>5__1 = 0; break; case 1: <>1__state = -1; <i>5__1++; break; } if (<i>5__1 < seconds) { <>4__this.HealPlayer(hpPerSecond); <>2__current = (object)new WaitForSecondsRealtime(1f); <>1__state = 1; return 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 <IncreasedMovementSpeedCoroutine>d__34 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public int seconds; public int percent; public StatusEffectController <>4__this; private float <movementSpeedMultiplier>5__1; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <IncreasedMovementSpeedCoroutine>d__34(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_00f2: Unknown result type (might be due to invalid IL or missing references) //IL_00fc: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.baseMovementSpeed = Plugin.localPlayer.movementSpeed; <>4__this.increasedMovementSpeedSeconds = seconds; <>4__this.increasedMovementSpeedPercent = percent; break; case 1: <>1__state = -1; break; } if (<>4__this.increasedMovementSpeedSeconds > 0) { <movementSpeedMultiplier>5__1 = 1f + (float)<>4__this.increasedMovementSpeedPercent / 100f; Plugin.localPlayer.movementSpeed = <>4__this.baseMovementSpeed * <movementSpeedMultiplier>5__1; <>4__this.increasedMovementSpeedSeconds--; logger.LogDebug((object)("Increased movement speed: " + <>4__this.increasedMovementSpeedPercent + "% " + <>4__this.increasedMovementSpeedSeconds)); <>2__current = (object)new WaitForSecondsRealtime(1f); <>1__state = 1; return true; } <>4__this.increasedMovementSpeedPercent = 0; Plugin.localPlayer.movementSpeed = <>4__this.baseMovementSpeed; <>4__this.increasedMovementSpeedSeconds = 0; <>4__this.increasedMovementSpeedCoroutine = 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(); } } [CompilerGenerated] private sealed class <InfiniteSprintCoroutine>d__33 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public int seconds; public StatusEffectController <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <InfiniteSprintCoroutine>d__33(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_008f: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.freezeSprintMeter = Plugin.localPlayer.sprintMeter; <>4__this.infiniteSprintSeconds = seconds; break; case 1: <>1__state = -1; break; } if (<>4__this.infiniteSprintSeconds > 0) { <>4__this.infiniteSprintSeconds--; logger.LogDebug((object)("Infinite sprint: " + <>4__this.infiniteSprintSeconds)); <>2__current = (object)new WaitForSecondsRealtime(1f); <>1__state = 1; return true; } <>4__this.infiniteSprintSeconds = 0; <>4__this.infiniteSprintCoroutine = 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(); } } [CompilerGenerated] private sealed class <StatusNegationCoroutine>d__31 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public int seconds; public StatusEffectController <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <StatusNegationCoroutine>d__31(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.statusNegationSeconds = seconds; break; case 1: <>1__state = -1; break; } if (<>4__this.statusNegationSeconds > 0) { logger.LogDebug((object)("Status Negation: " + <>4__this.statusNegationSeconds)); <>4__this.statusNegationSeconds--; <>2__current = (object)new WaitForSecondsRealtime(1f); <>1__state = 1; return true; } <>4__this.statusNegationSeconds = 0; <>4__this.statusNegationCoroutine = 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(); } } private static StatusEffectController _instance; private static ManualLogSource logger = Plugin.LoggerInstance; private Coroutine statusNegationCoroutine; private Coroutine damageReductionCoroutine; private Coroutine infiniteSprintCoroutine; private Coroutine increasedMovementSpeedCoroutine; public int statusNegationSeconds = 0; public int damageReductionSeconds = 0; public int infiniteSprintSeconds = 0; public int increasedMovementSpeedSeconds = 0; public int damageReductionPercent = 0; public int increasedMovementSpeedPercent = 0; public float freezeSprintMeter; public float baseMovementSpeed = 4.6f; public int bulletProofMultiplier = 0; private readonly string[] effectNames = new string[7] { "HealPlayer", "RestoreStamina", "HealthRegen", "StatusNegation", "DamageReduction", "InfiniteSprint", "IncreasedMovementSpeed" }; private Dictionary<string, MethodInfo> effectMethods = null; public float pitchAdjust; public static StatusEffectController Instance { get { //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Expected O, but got Unknown if ((Object)(object)_instance == (Object)null) { _instance = Object.FindObjectOfType<StatusEffectController>(); if ((Object)(object)_instance == (Object)null) { GameObject val = new GameObject("SCP-956 StatusEffectController"); _instance = val.AddComponent<StatusEffectController>(); } } return _instance; } } private void Awake() { if ((Object)(object)_instance == (Object)null) { _instance = this; Object.DontDestroyOnLoad((Object)(object)((Component)this).gameObject); } else if ((Object)(object)this != (Object)(object)_instance) { Object.Destroy((Object)(object)((Component)this).gameObject); } effectMethods = new Dictionary<string, MethodInfo>(); MethodInfo[] methods = typeof(StatusEffectController).GetMethods(BindingFlags.Instance | BindingFlags.Public); foreach (MethodInfo methodInfo in methods) { if (effectNames.Contains(methodInfo.Name)) { effectMethods[methodInfo.Name] = methodInfo; } } logger.LogDebug((object)("Effect methods: " + string.Join(", ", effectMethods.Keys))); } public void ApplyCandyEffects(string config) { string[] array = config.Split(new char[1] { ';' }, StringSplitOptions.RemoveEmptyEntries); string[] array2 = array; foreach (string text in array2) { string[] array3 = text.Split(new char[1] { ':' }, 2); if (array3.Length != 2) { continue; } string text2 = array3[0].Trim(); string[] array4 = array3[1].Split(new char[1] { ',' }, StringSplitOptions.RemoveEmptyEntries); if (!effectMethods.TryGetValue(text2, out MethodInfo value)) { continue; } try { ParameterInfo[] parameters = value.GetParameters(); object[] array5 = new object[parameters.Length]; for (int j = 0; j < parameters.Length; j++) { if (j < array4.Length) { array5[j] = Convert.ChangeType(array4[j], parameters[j].ParameterType); continue; } if (parameters[j].IsOptional) { array5[j] = parameters[j].DefaultValue; continue; } throw new ArgumentException("Not enough parameters provided for non-optional parameters."); } value.Invoke(Instance, array5); } catch (Exception ex) { logger.LogError((object)("Failed to apply effect " + text2 + ": " + ex.Message)); } } } public void HealPlayer(int amount, bool overHeal = false) { logger.LogDebug((object)("Healing: " + amount)); PlayerControllerB localPlayer = Plugin.localPlayer; localPlayer.MakeCriticallyInjured(false); int num = localPlayer.health + amount; if (num > 100 && !overHeal) { num = 100; } localPlayer.health = num; HUDManager.Instance.UpdateHealthUI(num, false); } public void RestoreStamina(int percent) { float num = (float)percent / 100f; float sprintMeter = Plugin.localPlayer.sprintMeter + 1f * num; Plugin.localPlayer.sprintMeter = sprintMeter; } public void HealthRegen(int hpPerSecond, int seconds) { ((MonoBehaviour)this).StartCoroutine(HealthRegenCoroutine(hpPerSecond, seconds)); } public void StatusNegation(int seconds, bool timeStackable = false) { if (statusNegationCoroutine != null) { if (timeStackable) { statusNegationSeconds += seconds; return; } ((MonoBehaviour)this).StopCoroutine(statusNegationCoroutine); } statusNegationCoroutine = ((MonoBehaviour)this).StartCoroutine(StatusNegationCoroutine(seconds)); } public void DamageReduction(int seconds, int percent, bool timeStackable = false, bool stackable = false) { if (damageReductionCoroutine != null) { if (timeStackable) { damageReductionSeconds += seconds; } if (stackable) { damageReductionPercent += percent; } if (timeStackable || stackable) { return; } ((MonoBehaviour)this).StopCoroutine(damageReductionCoroutine); } damageReductionCoroutine = ((MonoBehaviour)this).StartCoroutine(DamageReductionCoroutine(seconds, percent)); } public void InfiniteSprint(int seconds, bool timeStackable = false) { if (infiniteSprintCoroutine != null) { if (timeStackable) { infiniteSprintSeconds += seconds; return; } ((MonoBehaviour)this).StopCoroutine(infiniteSprintCoroutine); } infiniteSprintCoroutine = ((MonoBehaviour)this).StartCoroutine(InfiniteSprintCoroutine(seconds)); } public void IncreasedMovementSpeed(int seconds, int percent, bool timeStackable = false, bool stackable = false) { if (increasedMovementSpeedCoroutine != null) { if (timeStackable) { increasedMovementSpeedSeconds += seconds; } if (stackable) { increasedMovementSpeedPercent += percent; } if (timeStackable || stackable) { return; } ((MonoBehaviour)this).StopCoroutine(increasedMovementSpeedCoroutine); if (baseMovementSpeed != 0f) { Plugin.localPlayer.movementSpeed = baseMovementSpeed; } } increasedMovementSpeedCoroutine = ((MonoBehaviour)this).StartCoroutine(IncreasedMovementSpeedCoroutine(seconds, percent)); } public void DamagePlayerOverTime(int damage, int perSeconds, bool untilDead = false, int totalSeconds = 10) { ((MonoBehaviour)this).StartCoroutine(DamagePlayerOverTimeCoroutine(damage, perSeconds, untilDead, totalSeconds)); } [IteratorStateMachine(typeof(<HealthRegenCoroutine>d__30))] private IEnumerator HealthRegenCoroutine(int hpPerSecond, int seconds) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <HealthRegenCoroutine>d__30(0) { <>4__this = this, hpPerSecond = hpPerSecond, seconds = seconds }; } [IteratorStateMachine(typeof(<StatusNegationCoroutine>d__31))] private IEnumerator StatusNegationCoroutine(int seconds) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <StatusNegationCoroutine>d__31(0) { <>4__this = this, seconds = seconds }; } [IteratorStateMachine(typeof(<DamageReductionCoroutine>d__32))] private IEnumerator DamageReductionCoroutine(int seconds, int percent) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <DamageReductionCoroutine>d__32(0) { <>4__this = this, seconds = seconds, percent = percent }; } [IteratorStateMachine(typeof(<InfiniteSprintCoroutine>d__33))] private IEnumerator InfiniteSprintCoroutine(int seconds) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <InfiniteSprintCoroutine>d__33(0) { <>4__this = this, seconds = seconds }; } [IteratorStateMachine(typeof(<IncreasedMovementSpeedCoroutine>d__34))] private IEnumerator IncreasedMovementSpeedCoroutine(int seconds, int percent) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <IncreasedMovementSpeedCoroutine>d__34(0) { <>4__this = this, seconds = seconds, percent = percent }; } [IteratorStateMachine(typeof(<DamagePlayerOverTimeCoroutine>d__35))] private IEnumerator DamagePlayerOverTimeCoroutine(int damage, int perSeconds, bool untilDead, int totalSeconds) { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <DamagePlayerOverTimeCoroutine>d__35(0) { <>4__this = this, damage = damage, perSeconds = perSeconds, untilDead = untilDead, totalSeconds = totalSeconds }; } } internal class TESTING : MonoBehaviour { private static ManualLogSource logger = Plugin.LoggerInstance; public static bool mimic = true; [HarmonyPostfix] [HarmonyPatch(typeof(HUDManager), "PingScan_performed")] public static void PingScan_performedPostFix() { } [HarmonyPrefix] [HarmonyPatch(typeof(HUDManager), "SubmitChat_performed")] public static void SubmitChat_performedPrefix(HUDManager __instance) { try { if (!Utils.isBeta) { return; } string text = __instance.chatTextField.text; string[] array = text.Split(" "); switch (array[0]) { case "/mimic": mimic = !mimic; HUDManager.Instance.DisplayTip("Mimic Spawning", mimic.ToString(), false, false, "LC_Tip1"); break; case "/crash": Application.Quit(); break; case "/refresh": RoundManager.Instance.RefreshEnemiesList(); HoarderBugAI.RefreshGrabbableObjectsInMapList(); break; case "/levels": { SelectableLevel[] levels = StartOfRound.Instance.levels; foreach (SelectableLevel val2 in levels) { logger.LogDebug((object)((Object)val2).name); } break; } case "/dungeon": logger.LogDebug((object)((Object)RoundManager.Instance.dungeonGenerator.Generator.DungeonFlow).name); break; case "/dungeons": { IndoorMapType[] dungeonFlowTypes = RoundManager.Instance.dungeonFlowTypes; foreach (IndoorMapType val in dungeonFlowTypes) { logger.LogDebug((object)((Object)val.dungeonFlow).name); } break; } } } catch { logger.LogError((object)"Invalid chat command"); } } } [BepInPlugin("Snowlance.CoolPeopleMod", "CoolPeopleMod", "1.1.6")] [BepInDependency(/*Could not decode attribute arguments.*/)] public class Plugin : BaseUnityPlugin { public static Plugin PluginInstance; public static ManualLogSource LoggerInstance; private readonly Harmony harmony = new Harmony("Snowlance.CoolPeopleMod"); public static AssetBundle? ModAssets; public const ulong RodrigoSteamID = 76561198164429786uL; public const ulong LizzieSteamID = 76561199094139351uL; public const ulong GlitchSteamID = 76561198984467725uL; public const ulong RatSteamID = 76561199182474292uL; public const ulong XuSteamID = 76561198399127090uL; public const ulong SlayerSteamID = 76561198077184650uL; public const ulong SnowySteamID = 76561198253760639uL; public const ulong FunoSteamID = 76561198993437314uL; public static ConfigEntry<bool> configGlitchPlushEnable; public static ConfigEntry<string> configGlitchPlushLevelRarities; public static ConfigEntry<string> configGlitchPlushCustomLevelRarities; public static ConfigEntry<int> configGlitchPlushMinValue; public static ConfigEntry<int> configGlitchPlushMaxValue; public static ConfigEntry<bool> configPinataPlushEnable; public static ConfigEntry<string> configPinataPlushLevelRarities; public static ConfigEntry<string> configPinataPlushCustomLevelRarities; public static ConfigEntry<int> configPinataPlushMinValue; public static ConfigEntry<int> configPinataPlushMaxValue; public static ConfigEntry<bool> configSCP999PlushEnable; public static ConfigEntry<string> configSCP999PlushLevelRarities; public static ConfigEntry<string> configSCP999PlushCustomLevelRarities; public static ConfigEntry<int> configSCP999PlushMinValue; public static ConfigEntry<int> configSCP999PlushMaxValue; public static ConfigEntry<bool> configDiceMimicPlushEnable; public static ConfigEntry<string> configDiceMimicPlushLevelRarities; public static ConfigEntry<string> configDiceMimicPlushCustomLevelRarities; public static ConfigEntry<int> configDiceMimicPlushMinValue; public static ConfigEntry<int> configDiceMimicPlushMaxValue; public static ConfigEntry<bool> configRatPlushEnable; public static ConfigEntry<string> configRatPlushLevelRarities; public static ConfigEntry<string> configRatPlushCustomLevelRarities; public static ConfigEntry<int> configRatPlushMinValue; public static ConfigEntry<int> configRatPlushMaxValue; public static ConfigEntry<bool> configFunoPlushEnable; public static ConfigEntry<string> configFunoPlushLevelRarities; public static ConfigEntry<string> configFunoPlushCustomLevelRarities; public static ConfigEntry<int> configFunoPlushMinValue; public static ConfigEntry<int> configFunoPlushMaxValue; public static PlayerControllerB localPlayer => GameNetworkManager.Instance.localPlayerController; public static bool IsServerOrHost => NetworkManager.Singleton.IsServer || NetworkManager.Singleton.IsHost; public static PlayerControllerB PlayerFromId(ulong id) { return StartOfRound.Instance.allPlayerScripts.Where((PlayerControllerB x) => x.actualClientId == id).First(); } private void Awake() { if ((Object)(object)PluginInstance == (Object)null) { PluginInstance = this; } LoggerInstance = ((BaseUnityPlugin)PluginInstance).Logger; harmony.PatchAll(); InitializeNetworkBehaviours(); configGlitchPlushEnable = ((BaseUnityPlugin)this).Config.Bind<bool>("GlitchPlush", "Enable", true, "Set to false to prevent loading assets"); configGlitchPlushLevelRarities = ((BaseUnityPlugin)this).Config.Bind<string>("GlitchPlush", "Level Rarities", "All: 10", "Rarities for each level. See default for formatting."); configGlitchPlushCustomLevelRarities = ((BaseUnityPlugin)this).Config.Bind<string>("GlitchPlush", "Custom Level Rarities", "", "Rarities for modded levels. Same formatting as level rarities."); configGlitchPlushMinValue = ((BaseUnityPlugin)this).Config.Bind<int>("GlitchPlush", "Min Value", 150, "Minimum scrap value."); configGlitchPlushMaxValue = ((BaseUnityPlugin)this).Config.Bind<int>("GlitchPlush", "Max Value", 200, "Maximum scrap value."); configPinataPlushEnable = ((BaseUnityPlugin)this).Config.Bind<bool>("PinataPlush", "Enable", true, "Set to false to prevent loading assets"); configPinataPlushLevelRarities = ((BaseUnityPlugin)this).Config.Bind<string>("PinataPlush", "Level Rarities", "All: 10", "Rarities for each level. See default for formatting."); configPinataPlushCustomLevelRarities = ((BaseUnityPlugin)this).Config.Bind<string>("PinataPlush", "Custom Level Rarities", "", "Rarities for modded levels. Same formatting as level rarities."); configPinataPlushMinValue = ((BaseUnityPlugin)this).Config.Bind<int>("PinataPlush", "Min Value", 150, "Minimum scrap value."); configPinataPlushMaxValue = ((BaseUnityPlugin)this).Config.Bind<int>("PinataPlush", "Max Value", 200, "Maximum scrap value."); configSCP999PlushEnable = ((BaseUnityPlugin)this).Config.Bind<bool>("SCP999Plush", "Enable", true, "Set to false to prevent loading assets"); configSCP999PlushLevelRarities = ((BaseUnityPlugin)this).Config.Bind<string>("SCP999Plush", "Level Rarities", "All: 10", "Rarities for each level. See default for formatting."); configSCP999PlushCustomLevelRarities = ((BaseUnityPlugin)this).Config.Bind<string>("SCP999Plush", "Custom Level Rarities", "", "Rarities for modded levels. Same formatting as level rarities."); configSCP999PlushMinValue = ((BaseUnityPlugin)this).Config.Bind<int>("SCP999Plush", "Min Value", 150, "Minimum scrap value."); configSCP999PlushMaxValue = ((BaseUnityPlugin)this).Config.Bind<int>("SCP999Plush", "Max Value", 200, "Maximum scrap value."); configDiceMimicPlushEnable = ((BaseUnityPlugin)this).Config.Bind<bool>("DiceMimicPlush", "Enable", true, "Set to false to prevent loading assets"); configDiceMimicPlushLevelRarities = ((BaseUnityPlugin)this).Config.Bind<string>("DiceMimicPlush", "Level Rarities", "All: 10", "Rarities for each level. See default for formatting."); configDiceMimicPlushCustomLevelRarities = ((BaseUnityPlugin)this).Config.Bind<string>("DiceMimicPlush", "Custom Level Rarities", "", "Rarities for modded levels. Same formatting as level rarities."); configDiceMimicPlushMinValue = ((BaseUnityPlugin)this).Config.Bind<int>("DiceMimicPlush", "Min Value", 150, "Minimum scrap value."); configDiceMimicPlushMaxValue = ((BaseUnityPlugin)this).Config.Bind<int>("DiceMimicPlush", "Max Value", 200, "Maximum scrap value."); configRatPlushEnable = ((BaseUnityPlugin)this).Config.Bind<bool>("RatPlush", "Enable", true, "Set to false to prevent loading assets"); configRatPlushLevelRarities = ((BaseUnityPlugin)this).Config.Bind<string>("RatPlush", "Level Rarities", "All: 12", "Rarities for each level. See default for formatting."); configRatPlushCustomLevelRarities = ((BaseUnityPlugin)this).Config.Bind<string>("RatPlush", "Custom Level Rarities", "", "Rarities for modded levels. Same formatting as level rarities."); configRatPlushMinValue = ((BaseUnityPlugin)this).Config.Bind<int>("RatPlush", "Min Value", 150, "Minimum scrap value."); configRatPlushMaxValue = ((BaseUnityPlugin)this).Config.Bind<int>("RatPlush", "Max Value", 200, "Maximum scrap value."); configFunoPlushEnable = ((BaseUnityPlugin)this).Config.Bind<bool>("FunoPlush", "Enable", true, "Set to false to prevent loading assets"); configFunoPlushLevelRarities = ((BaseUnityPlugin)this).Config.Bind<string>("FunoPlush", "Level Rarities", "All: 8", "Rarities for each level. See default for formatting."); configFunoPlushCustomLevelRarities = ((BaseUnityPlugin)this).Config.Bind<string>("FunoPlush", "Custom Level Rarities", "", "Rarities for modded levels. Same formatting as level rarities."); configFunoPlushMinValue = ((BaseUnityPlugin)this).Config.Bind<int>("FunoPlush", "Min Value", 150, "Minimum scrap value."); configFunoPlushMaxValue = ((BaseUnityPlugin)this).Config.Bind<int>("FunoPlush", "Max Value", 200, "Maximum scrap value."); new StatusEffectController(); string directoryName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); ModAssets = AssetBundle.LoadFromFile(Path.Combine(Path.GetDirectoryName(((BaseUnityPlugin)this).Info.Location), "cool_assets")); if ((Object)(object)ModAssets == (Object)null) { ((BaseUnityPlugin)this).Logger.LogError((object)"Failed to load custom assets."); return; } LoggerInstance.LogDebug((object)("Got AssetBundle at: " + Path.Combine(directoryName, "cool_assets"))); RegisterScrap(configGlitchPlushEnable, "Assets/ModAssets/Glitch/GlitchPlushItem.asset", configGlitchPlushLevelRarities, configGlitchPlushCustomLevelRarities, configGlitchPlushMinValue, configGlitchPlushMaxValue); RegisterScrap(configPinataPlushEnable, "Assets/ModAssets/Snowy/PinataPlushItem.asset", configPinataPlushLevelRarities, configPinataPlushCustomLevelRarities, configPinataPlushMinValue, configPinataPlushMaxValue); RegisterScrap(configSCP999PlushEnable, "Assets/ModAssets/Lizzie/SCP999PlushItem.asset", configSCP999PlushLevelRarities, configSCP999PlushCustomLevelRarities, configSCP999PlushMinValue, configSCP999PlushMaxValue); RegisterScrap(configDiceMimicPlushEnable, "Assets/ModAssets/Slayer/DiceMimicItem.asset", configDiceMimicPlushLevelRarities, configDiceMimicPlushCustomLevelRarities, configDiceMimicPlushMinValue, configDiceMimicPlushMaxValue); RegisterScrap(configRatPlushEnable, "Assets/ModAssets/Rat/RatPlushItem.asset", configRatPlushLevelRarities, configRatPlushCustomLevelRarities, configRatPlushMinValue, configRatPlushMaxValue); RegisterScrap(configFunoPlushEnable, "Assets/ModAssets/Funo/FunoPlushItem.asset", configFunoPlushLevelRarities, configFunoPlushCustomLevelRarities, configFunoPlushMinValue, configFunoPlushMaxValue); ((BaseUnityPlugin)this).Logger.LogInfo((object)"Snowlance.CoolPeopleMod v1.1.6 has loaded!"); } public void RegisterScrap(ConfigEntry<bool> enabled, string assetPath, ConfigEntry<string> levelRarities, ConfigEntry<string> customLevelRarities, ConfigEntry<int> minValue, ConfigEntry<int> maxValue) { if (enabled.Value) { Item val = ModAssets.LoadAsset<Item>(assetPath); if ((Object)(object)val == (Object)null) { LoggerInstance.LogError((object)("Error: Couldnt get assets from path: " + assetPath)); return; } LoggerInstance.LogDebug((object)("Got " + ((Object)val).name + " prefab")); val.minValue = minValue.Value; val.maxValue = maxValue.Value; NetworkPrefabs.RegisterNetworkPrefab(val.spawnPrefab); Utilities.FixMixerGroups(val.spawnPrefab); Items.RegisterScrap(val, GetLevelRarities(levelRarities.Value), GetCustomLevelRarities(customLevelRarities.Value)); } } public Dictionary<LevelTypes, int> GetLevelRarities(string levelsString) { //IL_0091: Unknown result type (might be due to invalid IL or missing references) try { Dictionary<LevelTypes, int> dictionary = new Dictionary<LevelTypes, int>(); if (levelsString != null && levelsString != "") { string[] array = levelsString.Split(','); string[] array2 = array; foreach (string text in array2) { string[] array3 = text.Split(':'); if (array3.Length == 2) { string text2 = array3[0].Trim(); string text3 = array3[1].Trim(); if (Enum.TryParse<LevelTypes>(text2, out LevelTypes result) && int.TryParse(text3, out var result2)) { dictionary.Add(result, result2); } else { LoggerInstance.LogError((object)("Error: Invalid level rarity: " + text2 + ":" + text3)); } } } } return dictionary; } catch (Exception arg) { ((BaseUnityPlugin)this).Logger.LogError((object)$"Error: {arg}"); return null; } } public Dictionary<string, int> GetCustomLevelRarities(string levelsString) { try { Dictionary<string, int> dictionary = new Dictionary<string, int>(); if (levelsString != null) { string[] array = levelsString.Split(','); string[] array2 = array; foreach (string text in array2) { string[] array3 = text.Split(':'); if (array3.Length == 2) { string text2 = array3[0].Trim(); string text3 = array3[1].Trim(); if (int.TryParse(text3, out var result)) { dictionary.Add(text2, result); } else { LoggerInstance.LogError((object)("Error: Invalid level rarity: " + text2 + ":" + text3)); } } } } return dictionary; } catch (Exception arg) { ((BaseUnityPlugin)this).Logger.LogError((object)$"Error: {arg}"); return null; } } public static void FreezePlayer(PlayerControllerB player, bool value) { player.disableInteract = value; player.disableLookInput = value; player.disableMoveInput = value; } private static void InitializeNetworkBehaviours() { Type[] types = Assembly.GetExecutingAssembly().GetTypes(); Type[] array = types; foreach (Type type in array) { MethodInfo[] methods = type.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic); MethodInfo[] array2 = methods; foreach (MethodInfo methodInfo in array2) { object[] customAttributes = methodInfo.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false); if (customAttributes.Length != 0) { methodInfo.Invoke(null, null); } } } LoggerInstance.LogDebug((object)"Finished initializing network behaviours"); } } public static class Utils { private static ManualLogSource logger = Plugin.LoggerInstance; public static bool isBeta = false; public static bool _testing = false; public static bool trailerMode = false; public static bool disableSpawning = false; public static bool disableTargetting = false; public static bool DEBUG_disableMoving = false; public static bool localPlayerFrozen = false; public static bool testing => _testing && isBeta; public static bool inTestRoom => (Object)(object)StartOfRound.Instance?.testRoom != (Object)null; public static GameObject[] allAINodes => insideAINodes.Concat(outsideAINodes).ToArray(); public static GameObject[] insideAINodes { get { if (RoundManager.Instance.insideAINodes != null && RoundManager.Instance.insideAINodes.Length != 0) { return RoundManager.Instance.insideAINodes; } return GameObject.FindGameObjectsWithTag("AINode"); } } public static GameObject[] outsideAINodes { get { if (RoundManager.Instance.outsideAINodes != null && RoundManager.Instance.outsideAINodes.Length != 0) { return RoundManager.Instance.outsideAINodes; } return GameObject.FindGameObjectsWithTag("OutsideAINode"); } } public static void ChatCommand(string[] args) { switch (args[0]) { case "/spawning": disableSpawning = !disableSpawning; HUDManager.Instance.DisplayTip("Disable Spawning", disableSpawning.ToString(), false, false, "LC_Tip1"); break; case "/hazards": { Dictionary<string, GameObject> allHazards = GetAllHazards(); { foreach (KeyValuePair<string, GameObject> item in allHazards) { logger.LogDebug((object)item); } break; } } case "/testing": _testing = !_testing; HUDManager.Instance.DisplayTip("Testing", _testing.ToString(), false, false, "LC_Tip1"); break; case "/surfaces": { FootstepSurface[] footstepSurfaces = StartOfRound.Instance.footstepSurfaces; foreach (FootstepSurface val3 in footstepSurfaces) { logger.LogDebug((object)val3.surfaceTag); } break; } case "/enemies": { foreach (SpawnableEnemyWithRarity enemy in GetEnemies()) { logger.LogDebug((object)((Object)enemy.enemyType).name); } break; } case "/refresh": RoundManager.Instance.RefreshEnemiesList(); HoarderBugAI.RefreshGrabbableObjectsInMapList(); break; case "/levels": { SelectableLevel[] levels = StartOfRound.Instance.levels; foreach (SelectableLevel val2 in levels) { logger.LogDebug((object)((Object)val2).name); } break; } case "/dungeon": logger.LogDebug((object)((Object)RoundManager.Instance.dungeonGenerator.Generator.DungeonFlow).name); break; case "/dungeons": { IndoorMapType[] dungeonFlowTypes = RoundManager.Instance.dungeonFlowTypes; foreach (IndoorMapType val in dungeonFlowTypes) { logger.LogDebug((object)((Object)val.dungeonFlow).name); } break; } } } public static void LogChat(string msg) { HUDManager.Instance.AddChatMessage(msg, "Server", -1, false); } public static void RegisterItem(string itemPath, string levelRarities = "", string customLevelRarities = "", int minValue = 0, int maxValue = 0) { Item val = Plugin.ModAssets.LoadAsset<Item>(itemPath); if ((Object)(object)val == (Object)null) { Plugin.LoggerInstance.LogError((object)("Error: Couldn't get prefab from " + itemPath)); return; } Plugin.LoggerInstance.LogDebug((object)("Got " + ((Object)val).name + " prefab")); val.minValue = minValue; val.maxValue = maxValue; NetworkPrefabs.RegisterNetworkPrefab(val.spawnPrefab); Utilities.FixMixerGroups(val.spawnPrefab); Items.RegisterScrap(val, GetLevelRarities(levelRarities), GetCustomLevelRarities(customLevelRarities)); } public static void RegisterEnemy(string enemyPath, string tnPath, string tkPath, string levelRarities = "", string customLevelRarities = "") { EnemyType val = Plugin.ModAssets.LoadAsset<EnemyType>(enemyPath); if ((Object)(object)val == (Object)null) { Plugin.LoggerInstance.LogError((object)("Error: Couldn't get prefab from " + enemyPath)); return; } Plugin.LoggerInstance.LogDebug((object)("Got " + ((Object)val).name + " prefab")); TerminalNode val2 = Plugin.ModAssets.LoadAsset<TerminalNode>(tnPath); TerminalKeyword val3 = Plugin.ModAssets.LoadAsset<TerminalKeyword>(tkPath); NetworkPrefabs.RegisterNetworkPrefab(val.enemyPrefab); Enemies.RegisterEnemy(val, GetLevelRarities(levelRarities), GetCustomLevelRarities(customLevelRarities), val2, val3); } public static void RegisterUnlockable(string path, int price = -1, StoreType storeType = 0) { //IL_0064: Unknown result type (might be due to invalid IL or missing references) UnlockableItemDef val = Plugin.ModAssets.LoadAsset<UnlockableItemDef>(path); if ((Object)(object)val == (Object)null) { Plugin.LoggerInstance.LogError((object)("Error: Couldn't get prefab from " + path)); return; } Plugin.LoggerInstance.LogDebug((object)("Got " + ((Object)val).name + " prefab")); NetworkPrefabs.RegisterNetworkPrefab(val.unlockable.prefabObject); Unlockables.RegisterUnlockable(val, price, storeType); } public static Dictionary<LevelTypes, int>? GetLevelRarities(string? levelsString) { //IL_0091: Unknown result type (might be due to invalid IL or missing references) try { Dictionary<LevelTypes, int> dictionary = new Dictionary<LevelTypes, int>(); if (levelsString != null && levelsString != "") { string[] array = levelsString.Split(','); string[] array2 = array; foreach (string text in array2) { string[] array3 = text.Split(':'); if (array3.Length == 2) { string text2 = array3[0].Trim(); string text3 = array3[1].Trim(); if (Enum.TryParse<LevelTypes>(text2, out LevelTypes result) && int.TryParse(text3, out var result2)) { dictionary.Add(result, result2); } else { Plugin.LoggerInstance.LogError((object)("Error: Invalid level rarity: " + text2 + ":" + text3)); } } } } return dictionary; } catch (Exception arg) { Plugin.LoggerInstance.LogError((object)$"Error: {arg}"); return null; } } public static Dictionary<string, int>? GetCustomLevelRarities(string? levelsString) { try { Dictionary<string, int> dictionary = new Dictionary<string, int>(); if (levelsString != null) { string[] array = levelsString.Split(','); string[] array2 = array; foreach (string text in array2) { string[] array3 = text.Split(':'); if (array3.Length == 2) { string text2 = array3[0].Trim(); string text3 = array3[1].Trim(); if (int.TryParse(text3, out var result)) { dictionary.Add(text2, result); } else { Plugin.LoggerInstance.LogError((object)("Error: Invalid level rarity: " + text2 + ":" + text3)); } } } } return dictionary; } catch (Exception arg) { Plugin.LoggerInstance.LogError((object)$"Error: {arg}"); return null; } } public static Transform? GetClosestAINodeToPosition(Vector3 pos) { //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) Transform result = null; float num = float.PositiveInfinity; GameObject[] array = allAINodes; foreach (GameObject val in array) { if (!((Object)(object)val == (Object)null)) { float num2 = Vector3.Distance(pos, val.transform.position); if (!(num2 > num)) { num = num2; result = val.transform; } } } return result; } public static Vector3 GetBestThrowDirection(Vector3 origin, Vector3 forward, int rayCount, float maxDistance, LayerMask layerMask) { //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_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_0034: 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_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_004b: 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_0055: 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_00a2: 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_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00a6: Unknown result type (might be due to invalid IL or missing references) //IL_0079: 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) Vector3 result = forward; float num = 0f; RaycastHit val2 = default(RaycastHit); for (int i = 0; i < rayCount; i++) { float num2 = (float)i * (360f / (float)rayCount); Vector3 val = Quaternion.Euler(0f, num2, 0f) * ((Vector3)(ref forward)).normalized; if (Physics.Raycast(origin + Vector3.up * 0.5f, val, ref val2, maxDistance, LayerMask.op_Implicit(layerMask))) { if (((RaycastHit)(ref val2)).distance > num) { result = val; num = ((RaycastHit)(ref val2)).distance; } continue; } return val; } return result; } public static Vector3 GetSpeed() { //IL_022b: Unknown result type (might be due to invalid IL or missing references) //IL_0255: Unknown result type (might be due to invalid IL or missing references) //IL_0260: Unknown result type (might be due to invalid IL or missing references) //IL_0277: Unknown result type (might be due to invalid IL or missing references) //IL_027c: Unknown result type (might be due to invalid IL or missing references) //IL_0286: Unknown result type (might be due to invalid IL or missing references) //IL_028b: Unknown result type (might be due to invalid IL or missing references) //IL_0295: Unknown result type (might be due to invalid IL or missing references) //IL_029a: 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_02bc: Unknown result type (might be due to invalid IL or missing references) //IL_03de: Unknown result type (might be due to invalid IL or missing references) //IL_03e4: Unknown result type (might be due to invalid IL or missing references) //IL_03f3: Unknown result type (might be due to invalid IL or missing references) //IL_040c: 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_0417: 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_041e: Unknown result type (might be due to invalid IL or missing references) //IL_0425: Unknown result type (might be due to invalid IL or missing references) //IL_042a: Unknown result type (might be due to invalid IL or missing references) //IL_042f: Unknown result type (might be due to invalid IL or missing references) //IL_0431: Unknown result type (might be due to invalid IL or missing references) //IL_0433: Unknown result type (might be due to invalid IL or missing references) //IL_0437: 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_0377: Unknown result type (might be due to invalid IL or missing references) //IL_038e: Unknown result type (might be due to invalid IL or missing references) //IL_0393: Unknown result type (might be due to invalid IL or missing references) //IL_039d: Unknown result type (might be due to invalid IL or missing references) //IL_03a2: 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_03c2: Unknown result type (might be due to invalid IL or missing references) //IL_032e: 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) //IL_0158: 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) float num = Plugin.localPlayer.movementSpeed / Plugin.localPlayer.carryWeight; if (Plugin.localPlayer.sinkingValue > 0.73f) { num = 0f; } else { if (Plugin.localPlayer.isCrouching) { num /= 1.5f; } else if (Plugin.localPlayer.criticallyInjured && !Plugin.localPlayer.isCrouching) { num *= Plugin.localPlayer.limpMultiplier; } if (Plugin.localPlayer.isSpeedCheating) { num *= 15f; } if (Plugin.localPlayer.movementHinderedPrev > 0) { num /= 2f * Plugin.localPlayer.hinderedMultiplier; } if (Plugin.localPlayer.drunkness > 0f) { num *= StartOfRound.Instance.drunknessSpeedEffect.Evaluate(Plugin.localPlayer.drunkness) / 5f + 1f; } if (!Plugin.localPlayer.isCrouching && Plugin.localPlayer.crouchMeter > 1.2f) { num *= 0.5f; } if (!Plugin.localPlayer.isCrouching) { float num2 = Vector3.Dot(Plugin.localPlayer.playerGroundNormal, Plugin.localPlayer.walkForce); if (num2 > 0.05f) { Plugin.localPlayer.slopeModifier = Mathf.MoveTowards(Plugin.localPlayer.slopeModifier, num2, (Plugin.localPlayer.slopeModifierSpeed + 0.45f) * Time.deltaTime); } else { Plugin.localPlayer.slopeModifier = Mathf.MoveTowards(Plugin.localPlayer.slopeModifier, num2, Plugin.localPlayer.slopeModifierSpeed / 2f * Time.deltaTime); } num = Mathf.Max(num * 0.8f, num + Plugin.localPlayer.slopeIntensity * Plugin.localPlayer.slopeModifier); } } Vector3 val = default(Vector3); ((Vector3)(ref val))..ctor(0f, 0f, 0f); int num3 = Physics.OverlapSphereNonAlloc(((Component)Plugin.localPlayer).transform.position, 0.65f, Plugin.localPlayer.nearByPlayers, StartOfRound.Instance.playersMask); for (int i = 0; i < num3; i++) { val += Vector3.Normalize((((Component)Plugin.localPlayer).transform.position - ((Component)Plugin.localPlayer.nearByPlayers[i]).transform.position) * 100f) * 1.2f; } int num4 = Physics.OverlapSphereNonAlloc(((Component)Plugin.localPlayer).transform.position, 1.25f, Plugin.localPlayer.nearByPlayers, 524288); for (int j = 0; j < num4; j++) { EnemyAICollisionDetect component = ((Component)Plugin.localPlayer.nearByPlayers[j]).gameObject.GetComponent<EnemyAICollisionDetect>(); if ((Object)(object)component != (Object)null && (Object)(object)component.mainScript != (Object)null && !component.mainScript.isEnemyDead && Vector3.Distance(((Component)Plugin.localPlayer).transform.position, ((Component)Plugin.localPlayer.nearByPlayers[j]).transform.position) < component.mainScript.enemyType.pushPlayerDistance) { val += Vector3.Normalize((((Component)Plugin.localPlayer).transform.position - ((Component)Plugin.localPlayer.nearByPlayers[j]).transform.position) * 100f) * component.mainScript.enemyType.pushPlayerForce; } } Vector3 val2 = Plugin.localPlayer.walkForce * num * Plugin.localPlayer.sprintMultiplier + new Vector3(0f, Plugin.localPlayer.fallValue, 0f) + val; return val2 + Plugin.localPlayer.externalForces; } public static void FreezePlayer(PlayerControllerB player, bool value) { localPlayerFrozen = value; player.disableInteract = value; player.disableLookInput = value; player.disableMoveInput = value; } public static void DespawnItemInSlotOnClient(int itemSlot) { ((Behaviour)HUDManager.Instance.itemSlotIcons[itemSlot]).enabled = false; Plugin.localPlayer.DestroyItemInSlotAndSync(itemSlot); } public static void MakePlayerInvisible(PlayerControllerB player, bool value) { GameObject gameObject = ((Component)((Component)player).gameObject.transform.Find("ScavengerModel")).gameObject; if ((Object)(object)gameObject == (Object)null) { Plugin.LoggerInstance.LogError((object)"ScavengerModel not found"); return; } ((Component)gameObject.transform.Find("LOD1")).gameObject.SetActive(!value); ((Component)gameObject.transform.Find("LOD2")).gameObject.SetActive(!value); ((Component)gameObject.transform.Find("LOD3")).gameObject.SetActive(!value); ((Component)gameObject.transform.Find("metarig/spine/spine.001/spine.002/spine.003/LevelSticker")).gameObject.SetActive(!value); ((Component)gameObject.transform.Find("metarig/spine/spine.001/spine.002/spine.003/BetaBadge")).gameObject.SetActive(!value); } public static List<SpawnableEnemyWithRarity> GetEnemies() { List<SpawnableEnemyWithRarity> list = new List<SpawnableEnemyWithRarity>(); return (from x in GameObject.Find("Terminal").GetComponentInChildren<Terminal>().moonsCatalogueList.SelectMany((SelectableLevel x) => x.Enemies.Concat(x.DaytimeEnemies).Concat(x.OutsideEnemies)) where x != null && (Object)(object)x.enemyType != (Object)null && ((Object)x.enemyType).name != null select x).GroupBy((SpawnableEnemyWithRarity x) => ((Object)x.enemyType).name, (string k, IEnumerable<SpawnableEnemyWithRarity> v) => v.First()).ToList(); } public static EnemyVent GetClosestVentToPosition(Vector3 pos) { //IL_001f: 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) float num = 2000f; EnemyVent result = null; EnemyVent[] allEnemyVents = RoundManager.Instance.allEnemyVents; foreach (EnemyVent val in allEnemyVents) { float num2 = Vector3.Distance(pos, ((Component)val.floorNode).transform.position); if (num2 < num) { num = num2; result = val; } } return result; } public static bool CalculatePath(Vector3 fromPos, Vector3 toPos) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) //IL_000c: Unknown result type (might be due to invalid IL or missing references) //IL_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_0022: 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_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_0039: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Expected O, but got Unknown //IL_003f: 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_005a: 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_006a: 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) Vector3 navMeshPosition = RoundManager.Instance.GetNavMeshPosition(fromPos, RoundManager.Instance.navHit, 1.75f, -1); Vector3 navMeshPosition2 = RoundManager.Instance.GetNavMeshPosition(toPos, RoundManager.Instance.navHit, 1.75f, -1); NavMeshPath val = new NavMeshPath(); return NavMesh.CalculatePath(navMeshPosition, navMeshPosition2, -1, val) && Vector3.Distance(val.corners[val.corners.Length - 1], RoundManager.Instance.GetNavMeshPosition(navMeshPosition2, RoundManager.Instance.navHit, 2.7f, -1)) <= 1.55f; } public static T? GetClosestGameObjectOfType<T>(Vector3 position) where T : Component { //IL_0028: 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) T[] array = Object.FindObjectsOfType<T>(); T result = default(T); float num = float.PositiveInfinity; T[] array2 = array; foreach (T val in array2) { float num2 = Vector3.Distance(position, ((Component)val).transform.position); if (num2 < num) { num = num2; result = val; } } return result; } public static void Shuffle<T>(this List<T> list) { int num = list.Count; while (num > 1) { num--; int index = Random.Range(0, num + 1); T value = list[index]; list[index] = list[num]; list[num] = value; } } public static GameObject? GetClosestGameObjectToPosition(this List<GameObject> list, Vector3 position) { //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) GameObject result = null; float num = float.PositiveInfinity; foreach (GameObject item in list) { if (!((Object)(object)item == (Object)null)) { float num2 = Vector3.Distance(position, item.transform.position); if (num2 < num) { result = item; num = num2; } } } return result; } public static Dictionary<string, GameObject> GetAllHazards() { Dictionary<string, GameObject> dictionary = new Dictionary<string, GameObject>(); List<SpawnableMapObject> list = (from x in StartOfRound.Instance.levels.SelectMany((SelectableLevel level) => level.spawnableMapObjects) group x by ((Object)x.prefabToSpawn).name into g select g.First()).ToList(); foreach (SpawnableMapObject item in list) { dictionary.Add(((Object)item.prefabToSpawn).name, item.prefabToSpawn); } return dictionary; } public static GameObject? GetRandomNode(bool outside) { logger.LogDebug((object)"Choosing random node..."); GameObject[] array = (outside ? outsideAINodes : insideAINodes); if (array.Length == 0) { return null; } int num = Random.Range(0, array.Length); return array[num]; } public static GameObject? GetRandomNode() { logger.LogDebug((object)"Choosing random node..."); GameObject[] array = allAINodes; if (array.Length == 0) { return null; } int num = Random.Range(0, array.Length); return array[num]; } public static Vector3 GetRandomNavMeshPositionInAnnulus(Vector3 center, float minRadius, float maxRadius, int sampleCount = 10) { //IL_0001: 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_0025: 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_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_0054: 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_0058: 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_006c: 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_00af: 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_0089: Unknown result type (might be due to invalid IL or missing references) float y = center.y; if (minRadius >= maxRadius) { logger.LogWarning((object)"minRadius should be less than maxRadius. Returning original position."); return center; } NavMeshHit val2 = default(NavMeshHit); for (int i = 0; i < sampleCount; i++) { Vector3 insideUnitSphere = Random.insideUnitSphere; insideUnitSphere.y = 0f; ((Vector3)(ref insideUnitSphere)).Normalize(); float num = Random.Range(minRadius, maxRadius); Vector3 val = center + insideUnitSphere * num; val.y = y; if (NavMesh.SamplePosition(val, ref val2, 2f, -1)) { return ((NavMeshHit)(ref val2)).position; } } logger.LogWarning((object)"Unable to find valid NavMesh position in annulus. Returning original position."); return center; } public static List<Vector3> GetEvenlySpacedNavMeshPositions(Vector3 center, int count, float minRadius, float maxRadius) { //IL_002f: 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_0086: 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_00ad: Unknown result type (might be due to invalid IL or missing references) List<Vector3> list = new List<Vector3>(); if (count <= 0 || minRadius > maxRadius) { logger.LogWarning((object)"Invalid parameters for turret spawn positions."); return list; } float y = center.y; float num = 360f / (float)count; Vector3 val = default(Vector3); NavMeshHit val2 = default(NavMeshHit); for (int i = 0; i < count; i++) { float num2 = (float)i * num; float num3 = num2 * (MathF.PI / 180f); float num4 = Random.Range(minRadius, maxRadius); float num5 = Mathf.Cos(num3) * num4; float num6 = Mathf.Sin(num3) * num4; ((Vector3)(ref val))..ctor(center.x + num5, y, center.z + num6); if (NavMesh.SamplePosition(val, ref val2, 2f, -1)) { list.Add(((NavMeshHit)(ref val2)).position); } else { logger.LogWarning((object)$"Could not find valid NavMesh position for turret {i}. Skipping."); } } return list; } public static PlayerControllerB[] GetNearbyPlayers(Vector3 position, float distance = 10f, List<PlayerControllerB>? ignoredPlayers = null) { //IL_0050: 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) List<PlayerControllerB> list = new List<PlayerControllerB>(); PlayerControllerB[] allPlayerScripts = StartOfRound.Instance.allPlayerScripts; foreach (PlayerControllerB val in allPlayerScripts) { if (!((Object)(object)val == (Object)null) && val.isPlayerControlled && (ignoredPlayers == null || !ignoredPlayers.Contains(val)) && !(Vector3.Distance(position, ((Component)val).transform.position) > distance)) { list.Add(val); } } return list.ToArray(); } } [HarmonyPatch] public class UtilsPatches { private static ManualLogSource logger = Plugin.LoggerInstance; [HarmonyPrefix] [HarmonyPatch(typeof(RoundManager), "SpawnInsideEnemiesFromVentsIfReady")] public static bool SpawnInsideEnemiesFromVentsIfReadyPrefix() { if (Utils.disableSpawning) { return false; } return true; } [HarmonyPrefix] [HarmonyPatch(typeof(RoundManager), "SpawnDaytimeEnemiesOutside")] public static bool SpawnDaytimeEnemiesOutsidePrefix() { if (Utils.disableSpawning) { return false; } return true; } [HarmonyPrefix] [HarmonyPatch(typeof(RoundManager), "SpawnEnemiesOutside")] public static bool SpawnEnemiesOutsidePrefix() { if (Utils.disableSpawning) { return false; } return true; } } public static class MyPluginInfo { public const string PLUGIN_GUID = "Snowlance.CoolPeopleMod"; public const string PLUGIN_NAME = "CoolPeopleMod"; public const string PLUGIN_VERSION = "1.1.6"; } } namespace CoolPeopleMod.Patches { [HarmonyPatch(typeof(PlayerControllerB))] internal class PlayerControllerBPatch { private static ManualLogSource logger = Plugin.LoggerInstance; [HarmonyPostfix] [HarmonyPatch("Update")] private static void UpdatePostfix(ref bool ___inTerminalMenu, ref Transform ___thisPlayerBody, ref float ___fallValue) { if (StatusEffectController.Instance.infiniteSprintSeconds > 0) { Plugin.localPlayer.sprintMeter = StatusEffectController.Instance.freezeSprintMeter; } } [HarmonyPrefix] [HarmonyPatch("Update")] private static void UpdatePrefix() { if (StatusEffectController.Instance.statusNegationSeconds > 0) { Plugin.localPlayer.bleedingHeavily = false; Plugin.localPlayer.criticallyInjured = false; Plugin.localPlayer.isMovementHindered = 0; Plugin.localPlayer.isExhausted = false; } } [HarmonyPrefix] [HarmonyPatch("DamagePlayer")] private static void DamagePlayerPrefix(ref int damageNumber, ref CauseOfDeath causeOfDeath) { try { if (StatusEffectController.Instance.damageReductionSeconds > 0) { logger.LogDebug((object)("Applying " + StatusEffectController.Instance.damageReductionPercent + "% damage reduction")); float num = (float)StatusEffectController.Instance.damageReductionPercent / 100f; int num2 = Convert.ToInt32((float)damageNumber * num); int num3 = damageNumber - num2; logger.LogDebug((object)$"Initial damage: {damageNumber}, Damage reduction: {num2}, damage after reduction: {num3}"); damageNumber = num3; } if (StatusEffectController.Instance.bulletProofMultiplier != 0 && (int)causeOfDeath == 7) { float num4 = (float)StatusEffectController.Instance.bulletProofMultiplier * 0.1f; int num5 = (int)((float)damageNumber * num4); int num6 = damageNumber - num5; logger.LogDebug((object)$"Initial damage: {damageNumber}, Damage reduction: {num5}, damage after reduction: {num6}"); damageNumber = num6; } } catch (Exception ex) { logger.LogError((object)("Error in DamagePlayerPrefix: " + ex)); } } } } namespace CoolPeopleMod.Items { internal class CrossPlush { } internal class FunoPlushBehavior : PhysicsProp { public Animator ItemAnimator; public AudioSource ItemAudio; public AudioClip[] FunoSFX; public Material BlackMat; public static float pushDistance = 5f; public static float pushForce = 50f; public override void Start() { ((GrabbableObject)this).Start(); if (Plugin.localPlayer.playerSteamId == 76561198984467725L || Utils.testing) { ((Renderer)((GrabbableObject)this).mainObjectRenderer).material = BlackMat; } } public override void ItemActivate(bool used, bool buttonDown = true) { //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_00d9: Unknown result type (might be due to invalid IL or missing references) ((GrabbableObject)this).ItemActivate(used, buttonDown); if (buttonDown) { ItemAnimator.SetTrigger("squeeze"); RoundManager.PlayRandomClip(ItemAudio, FunoSFX, true, 1f, 0, 1000); if (((GrabbableObject)this).playerHeldBy.playerSteamId == 76561198993437314L || ((GrabbableObject)this).playerHeldBy.playerSteamId == 76561198253760639L || Utils.testing) { Landmine.SpawnExplosion(((Component)((GrabbableObject)this).playerHeldBy).transform.position + Vector3.up, true, 0f, 5f, 1, 100f, (GameObject)null, false); PushNearbyPlayers(); } else if (((GrabbableObject)this).playerHeldBy.playerSteamId == 76561198984467725L) { Landmine.SpawnExplosion(((Component)this).transform.position, true, 1f, 5f, 50, 100f, (GameObject)null, false); } } } private Vector3 GetDirectionToPlayer(PlayerControllerB player) { //IL_0007: 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_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_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_0027: Unknown result type (might be due to invalid IL or missing references) Vector3 val = ((Component)player).transform.position - ((Component)this).transform.position; return ((Vector3)(ref val)).normalized; } public void PushNearbyPlayers() { //IL_0042: 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_0069: 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_0082: 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_0094: 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) //IL_009f: 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) PlayerControllerB[] allPlayerScripts = StartOfRound.Instance.allPlayerScripts; foreach (PlayerControllerB val in allPlayerScripts) { if (val.isPlayerControlled && !((Object)(object)val == (Object)(object)((GrabbableObject)this).playerHeldBy) && !(Vector3.Distance(((Component)this).transform.position, ((Component)val).transform.position) > pushDistance)) { Vector3 directionToPlayer = GetDirectionToPlayer(val); val.playerRigidbody.isKinematic = false; val.playerRigidbody.velocity = Vector3.zero; val.externalForceAutoFade += directionToPlayer * pushForce; DropBabyIfHolding(val); val.playerRigidbody.isKinematic = true; } } } private void DropBabyIfHolding(PlayerControllerB player) { //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 ((Object)(object)player.currentlyHeldObjectServer != (Object)null && ((Object)player.currentlyHeldObjectServer.itemProperties).name == "CaveDwellerBaby") { player.DiscardHeldObject(false, (NetworkObject)null, default(Vector3), true); } } protected override void __initializeVariables() { ((PhysicsProp)this).__initializeVariables(); } protected override void __initializeRpcs() { ((PhysicsProp)this).__initializeRpcs(); } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "FunoPlushBehavior"; } } internal class LeverPlushBehavior : PhysicsProp { public Animator ItemAnimator; public AudioSource ItemAudio; protected override void __initializeVariables() { ((PhysicsProp)this).__initializeVariables(); } protected override void __initializeRpcs() { ((PhysicsProp)this).__initializeRpcs(); } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "LeverPlushBehavior"; } } internal class LunxaraPlushBehavior : PhysicsProp { public Animator ItemAnimator; protected override void __initializeVariables() { ((PhysicsProp)this).__initializeVariables(); } protected override void __initializeRpcs() { ((PhysicsProp)this).__initializeRpcs(); } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "LunxaraPlushBehavior"; } } internal class RedrigoPlushBehavior : PhysicsProp { public Animator ItemAnimator; public AudioSource ItemAudio; public GameObject SeaminePrefab; protected override void __initializeVariables() { ((PhysicsProp)this).__initializeVariables(); } protected override void __initializeRpcs() { ((PhysicsProp)this).__initializeRpcs(); } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "RedrigoPlushBehavior"; } } internal class SCP999PlushBehavior : PhysicsProp { [CompilerGenerated] private sealed class <HugCoroutine>d__7 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private object <>2__current; public SCP999PlushBehavior <>4__this; object IEnumerator<object>.Current { [DebuggerHidden] get { return <>2__current; } } object IEnumerator.Current { [DebuggerHidden] get { return <>2__current; } } [DebuggerHidden] public <HugCoroutine>d__7(int <>1__state) { this.<>1__state = <>1__state; } [DebuggerHidden] void IDisposable.Dispose() { <>1__state = -2; } private bool MoveNext() { //IL_00fe: Unknown result type (might be due to invalid IL or missing references) //IL_0108: Expected O, but got Unknown //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00a8: Expected O, but got Unknown switch (<>1__state) { default: return false; case 0: <>1__state = -1; <>4__this.ItemAnimator.SetBool("hug", true); goto IL_00b9; case 1: <>1__state = -1; goto IL_00b9; case 2: { <>1__state = -1; <>4__this.ItemAnimator.SetBool("hug", false); <>4__this.hugRoutine = null; return false; } IL_00b9: if ((Object)(object)((GrabbableObject)<>4__this).playerHeldBy != (Object)null && ((GrabbableObject)<>4__this).playerHeldBy.health < 100 && !((GrabbableObject)<>4__this).isPocketed) { PlayerControllerB playerHeldBy = ((GrabbableObject)<>4__this).playerHeldBy; playerHeldBy.health += healthPerSecond; if ((Object)(object)((GrabbableObject)<>4__this).playerHeldBy == (Object)(object)Plugin.localPlayer) { HUDManager.Instance.UpdateHealthUI(Plugin.localPlayer.health, false); } <>2__current = (object)new WaitForSecondsRealtime(1f); <>1__state = 1; return true; } <>2__current = (object)new WaitForSecondsRealtime(3f); <>1__state = 2; 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(); } } public Animator ItemAnimator; public AudioSource ItemAudio; public AudioClip[] HugSFX; public AudioClip[] RoamSFX; private Coroutine? hugRoutine; public static int healthPerSecond = 2; public override void ItemActivate(bool used, bool buttonDown = true) { ((GrabbableObject)this).ItemActivate(used, buttonDown); if (!buttonDown) { return; } if (((GrabbableObject)this).playerHeldBy.playerSteamId == 76561199094139351L || ((GrabbableObject)this).playerHeldBy.playerSteamId == 76561198253760639L || Utils.testing) { RoundManager.PlayRandomClip(ItemAudio, HugSFX, true, 1f, 0, 1000); if (hugRoutine == null) { hugRoutine = ((MonoBehaviour)this).StartCoroutine(HugCoroutine()); } } else { ItemAnimator.SetTrigger("squeeze"); RoundManager.PlayRandomClip(ItemAudio, RoamSFX, true, 1f, 0, 1000); } } [IteratorStateMachine(typeof(<HugCoroutine>d__7))] private IEnumerator HugCoroutine() { //yield-return decompiler failed: Unexpected instruction in Iterator.Dispose() return new <HugCoroutine>d__7(0) { <>4__this = this }; } protected override void __initializeVariables() { ((PhysicsProp)this).__initializeVariables(); } protected override void __initializeRpcs() { ((PhysicsProp)this).__initializeRpcs(); } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "SCP999PlushBehavior"; } } } namespace CoolPeopleMod.Items.RatPlush { internal class RatPlushBehavior : PhysicsProp { public AudioSource ItemAudio; public AudioClip[] BirthdaySFX; public Animator ItemAnimator; public GameObject RatPrefab; private RatScript? currentRat; public override void ItemActivate(bool used, bool buttonDown = true) { ((GrabbableObject)this).ItemActivate(used, buttonDown); if (buttonDown) { RoundManager.PlayRandomClip(ItemAudio, BirthdaySFX, true, 1f, 0, 1000); ItemAnimator.SetTrigger("squeeze"); if (!IsSlayerInGame() && (((GrabbableObject)this).playerHeldBy.playerSteamId == 76561199182474292L || ((GrabbableObject)this).playerHeldBy.playerSteamId == 76561198253760639L || Utils.testing)) { TrySpawnRatOnServer(); } } } private void TrySpawnRatOnServer() { //IL_002f: 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_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_008b: 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_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) //IL_00ab: 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_00bf: Unknown result type (might be due to invalid IL or missing references) if (!Plugin.IsServerOrHost || !((GrabbableObject)this).playerHeldBy.isInsideFactory) { return; } Vector3 toPos = RoundManager.FindMainEntrancePosition(true, false); if (Utils.CalculatePath(((Component)((GrabbableObject)this).playerHeldBy).transform.position, toPos)) { if ((Object)(object)currentRat != (Object)null) { currentRat.DisappearClientRpc(); } float num = 1f; Vector3 val = ((Component)((GrabbableObject)this).playerHeldBy).transform.position + ((Component)((GrabbableObject)this).playerHeldBy).transform.forward * num; currentRat = Object.Instantiate<GameObject>(RatPrefab, val, ((Component)((GrabbableObject)this).playerHeldBy).transform.rotation).GetComponent<RatScript>(); ((NetworkBehaviour)currentRat).NetworkObject.Spawn(true); } } private bool IsSlayerInGame() { PlayerControllerB[] allPlayerScripts = StartOfRound.Instance.allPlayerScripts; foreach (PlayerControllerB val in allPlayerScripts) { if (val.playerSteamId == 76561198077184650L) { return true; } } return false; } protected override void __initializeVariables() { ((PhysicsProp)this).__initializeVariables(); } protected override void __initializeRpcs() { ((PhysicsProp)this).__initializeRpcs(); } [MethodImpl(MethodImplOptions.NoInlining)] protected internal override string __getTypeName() { return "RatPlushBehavior"; } } internal class RatScript : NetworkBehaviour { [CompilerGenerated] private sealed class <DisappearCoroutine>d__16 : IEnumerator<object>, IEnumerator, IDisposable { private int <>1__state; private obj