Decompiled source of Whoopee Madness v1.0.0
BepInEx/Plugins/qwbarch-Mirage/Mirage.dll
Decompiled 7 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.Diagnostics.CodeAnalysis; using System.IO; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Serialization; using System.Runtime.Versioning; using System.Security.Permissions; using System.Threading; using <StartupCode$Mirage>; using <StartupCode$Mirage>.$Mirage.Core; using <StartupCode$Mirage>.$Mirage.Core.Audio; using <StartupCode$Mirage>.$Mirage.Core.Audio.Network; using <StartupCode$Mirage>.$Mirage.Patch; using <StartupCode$Mirage>.$Mirage.Unity; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Configuration; using BepInEx.Logging; using Cysharp.Threading.Tasks; using Dissonance; using Dissonance.Audio; using Dissonance.Audio.Capture; using Dissonance.Audio.Playback; using Dissonance.VAD; using FSharpPlus; using FSharpPlus.Control; using FSharpPlus.Data; using FSharpPlus.Internals; using FSharpx.Control; using GameNetcodeStuff; using HarmonyLib; using LobbyCompatibility.Enums; using LobbyCompatibility.Features; using Microsoft.FSharp.Collections; using Microsoft.FSharp.Control; using Microsoft.FSharp.Core; using Mirage; using Mirage.Core; using Mirage.Core.Audio; using Mirage.Core.Audio.Network; using Mirage.NetcodePatcher; using Mirage.Patch; using Mirage.Unity; using NAudio.Lame; using NAudio.Wave; using Unity.Collections; using Unity.Netcode; using UnityEngine; using UnityEngine.AI; [assembly: FSharpInterfaceDataVersion(2, 0, 0)] [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("DissonanceVoip")] [assembly: IgnoresAccessChecksTo("Facepunch Transport for Netcode for GameObjects")] [assembly: IgnoresAccessChecksTo("Facepunch.Steamworks.Win64")] [assembly: IgnoresAccessChecksTo("NAudio.Core")] [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.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("Mirage")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+0dc087c051b4b1a3c7cf4598a1104920098e511f")] [assembly: AssemblyProduct("Mirage")] [assembly: AssemblyTitle("Mirage")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: NetcodePatchedAssembly] internal class <Module> { static <Module>() { } } namespace Mirage { [Serializable] [BepInPlugin("Mirage", "qwbarch.Mirage", "1.6.1")] [BepInDependency(/*Could not decode attribute arguments.*/)] [CompilationMapping(/*Could not decode attribute arguments.*/)] public class Plugin : BaseUnityPlugin { public void Awake() { //IL_0065: 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_006f: 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_0091: Unknown result type (might be due to invalid IL or missing references) //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_0095: Unknown result type (might be due to invalid IL or missing references) //IL_0099: Unknown result type (might be due to invalid IL or missing references) $Plugin.Awake@51 awake@ = new $Plugin.Awake@51(this); MonadFxStrictBuilder<FSharpResult<Unit, string>> val = GenericBuilders.monad'<FSharpResult<Unit, string>>(); StrictBuilder<FSharpResult<Unit, string>> val2 = (StrictBuilder<FSharpResult<Unit, string>>)(object)val; StrictBuilder<FSharpResult<Unit, string>> val3 = (StrictBuilder<FSharpResult<Unit, string>>)(object)val; Array values = Enum.GetValues(typeof(LogCategory)); IEnumerable<LogCategory> enumerable = SeqModule.Cast<LogCategory>((IEnumerable)values); FSharpFunc<LogCategory, Unit> @_instance; @_instance = $Plugin.disableLogs@53.@_instance; FSharpFunc<LogCategory, Unit> val4 = @_instance; IEnumerable<LogCategory> enumerable2 = enumerable; Iterate val5 = null; Iterate.Iterate<LogCategory>(enumerable2, val4); Mirage.Core.Logger.initAsyncLogger(); initLobbyCompatibility(); Netcode.initNetcodePatcher(); MonadFxStrictBuilder<FSharpResult<Unit, string>> val6 = val; FSharpResult<Unit, string> val7 = ((Builder<FSharpResult<Unit, string>>)(object)val).ReturnFrom(Mirage.Core.Config.initConfig(((BaseUnityPlugin)this).Config)); StrictBuilder<FSharpResult<Unit, string>> val8 = (StrictBuilder<FSharpResult<Unit, string>>)(object)val; FSharpFunc<Unit, FSharpResult<Unit, string>> b = new $Plugin.Awake@59-1(this, val); FSharpFunc<Unit, FSharpResult<Unit, string>> val9 = new $Plugin.Awake@58-7(b); Bind val10 = null; FSharpResult<Unit, string> val11 = default(FSharpResult<Unit, string>); Mirage.Core.Logger.handleResultWith(awake@, Bind.op_GreaterGreaterEquals<Unit, string, Unit>(val7, val9)); } [CompilerGenerated] internal void initLobbyCompatibility() { if (Chainloader.PluginInfos.ContainsKey("BMX.LobbyCompatibility")) { FSharpFunc<Unit, Unit> @_instance; @_instance = $Plugin.register@40-1.@_instance; @_instance.Invoke((Unit)null); } } [CompilerGenerated] internal void onError() { Mirage.Core.Logger.logError.Invoke("Failed to initialize Mirage. Plugin is disabled."); } } } [CompilationMapping(/*Could not decode attribute arguments.*/)] public static class AssemblyInfo { } namespace <StartupCode$Mirage> { internal static class $AssemblyInfo { } internal static class $Plugin { [Serializable] internal sealed class Awake@51 : FSharpFunc<Unit, Unit> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public Plugin arg00@; [CompilerGenerated] [DebuggerNonUserCode] internal Awake@51(Plugin arg00@) { this.arg00@ = arg00@; } public override Unit Invoke(Unit arg10@) { arg00@.onError(); return null; } } [Serializable] internal sealed class disableLogs@53 : FSharpFunc<LogCategory, Unit> { internal static readonly disableLogs@53 @_instance = new disableLogs@53(); [CompilerGenerated] [DebuggerNonUserCode] internal disableLogs@53() { } public override Unit Invoke(LogCategory category) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) Logs.SetLogLevel(category, (LogLevel)4); return null; } } [Serializable] [SpecialName] [StructLayout(LayoutKind.Auto, CharSet = CharSet.Auto)] [CompilationMapping(/*Could not decode attribute arguments.*/)] internal static class Awake@61-2 { internal static void Invoke() { Mirage.Core.Audio.Recording.deleteRecordings(); } } [Serializable] internal sealed class Awake@63-3 : FSharpFunc<Type, Type> { internal static readonly Awake@63-3 @_instance = new Awake@63-3(); [CompilerGenerated] [DebuggerNonUserCode] internal Awake@63-3() { } public override Type Invoke(Type value) { return (Type)(object)value; } } [Serializable] internal sealed class Awake@63-4 : FSharpFunc<Type, Unit> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public Harmony objectArg; [CompilerGenerated] [DebuggerNonUserCode] internal Awake@63-4(Harmony objectArg) { this.objectArg = objectArg; } public override Unit Invoke(Type assembly) { objectArg.PatchAll(assembly); return null; } } [Serializable] internal sealed class Awake@63-5 : FSharpFunc<Type, Unit> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public FSharpFunc<Type, Type> func1; [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public FSharpFunc<Type, Unit> func2; [CompilerGenerated] [DebuggerNonUserCode] internal Awake@63-5(FSharpFunc<Type, Type> func1, FSharpFunc<Type, Unit> func2) { this.func1 = func1; this.func2 = func2; } public override Unit Invoke(Type x) { return func2.Invoke(func1.Invoke(x)); } } [Serializable] internal sealed class Awake@63-6 : FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, FSharpFunc<Unit, FSharpResult<Unit, string>>> { internal static readonly Awake@63-6 @_instance = new Awake@63-6(); [CompilerGenerated] [DebuggerNonUserCode] internal Awake@63-6() { } public override FSharpFunc<Unit, FSharpResult<Unit, string>> Invoke(Tuple<Return, FSharpResult<Unit, string>> tupledArg) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) return Return.Return<Unit, string>(tupledArg.Item2, tupledArg.Item1); } } [Serializable] internal sealed class Awake@59-1 : FSharpFunc<Unit, FSharpResult<Unit, string>> { public Plugin @this; [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public MonadFxStrictBuilder<FSharpResult<Unit, string>> builder@; [CompilerGenerated] [DebuggerNonUserCode] internal Awake@59-1(Plugin @this, MonadFxStrictBuilder<FSharpResult<Unit, string>> builder@) { this.@this = @this; this.builder@ = builder@; } public override FSharpResult<Unit, string> Invoke(Unit unitVar) { //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004a: Expected O, but got Unknown //IL_00e2: Unknown result type (might be due to invalid IL or missing references) //IL_00e8: Unknown result type (might be due to invalid IL or missing references) //IL_00f0: Unknown result type (might be due to invalid IL or missing references) bool flag = LameDLL.LoadNativeDLL(new string[1] { Path.GetDirectoryName(((BaseUnityPlugin)this.@this).Info.Location) }); Mirage.Core.Audio.Recording.deleteRecordings(); Application.quitting += Awake@61-2.Invoke; Harmony val = new Harmony("qwbarch.Mirage"); FSharpFunc<Type, Type> @_instance; @_instance = Awake@63-3.@_instance; Harmony objectArg = val; FSharpFunc<Type, Unit> func = new Awake@63-4(objectArg); FSharpFunc<Type, Unit> val2 = new Awake@63-5(@_instance, func); FSharpList<Type> val3 = FSharpList<Type>.Cons(typeof(Mirage.Patch.AudioSpatializer.AudioSpatializer), FSharpList<Type>.Cons(typeof(Mirage.Patch.RegisterPrefab.RegisterPrefab), FSharpList<Type>.Cons(typeof(Mirage.Patch.RecordAudio.RecordAudio), FSharpList<Type>.Cons(typeof(Mirage.Patch.SpawnMaskedEnemy.SpawnMaskedEnemy), FSharpList<Type>.Cons(typeof(Mirage.Patch.SyncConfig.SyncConfig), FSharpList<Type>.Cons(typeof(Mirage.Patch.RemovePenalty.RemovePenalty), FSharpList<Type>.Empty)))))); Iterate val4 = null; Iterate.Iterate<Type>(val3, val2); MonadFxStrictBuilder<FSharpResult<Unit, string>> val5 = builder@; return FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, Unit>.InvokeFast<FSharpResult<Unit, string>>((FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, FSharpFunc<Unit, FSharpResult<Unit, string>>>)Awake@63-6.@_instance, new Tuple<Return, FSharpResult<Unit, string>>(null, default(FSharpResult<Unit, string>)), (Unit)null); } } [Serializable] internal sealed class Awake@58-7 : FSharpFunc<Unit, FSharpResult<Unit, string>> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public FSharpFunc<Unit, FSharpResult<Unit, string>> b; [CompilerGenerated] [DebuggerNonUserCode] internal Awake@58-7(FSharpFunc<Unit, FSharpResult<Unit, string>> b) { this.b = b; } public override FSharpResult<Unit, string> Invoke(Unit unitVar0) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) return b.Invoke((Unit)null); } } [Serializable] internal sealed class register@40-1 : FSharpFunc<Unit, Unit> { internal static readonly register@40-1 @_instance = new register@40-1(); [CompilerGenerated] [DebuggerNonUserCode] internal register@40-1() { } public override Unit Invoke(Unit unitVar0) { PluginHelper.RegisterPlugin("Mirage", Version.Parse("1.6.1"), (CompatibilityLevel)2, (VersionStrictness)2); return null; } } } } namespace Mirage { [CompilationMapping(/*Could not decode attribute arguments.*/)] public static class Netcode { [Serializable] internal sealed class Pipe #1 input at line 41@41 : FSharpFunc<Type, MethodInfo[]> { internal static readonly Pipe #1 input at line 41@41 @_instance = new Pipe #1 input at line 41@41(); [CompilerGenerated] [DebuggerNonUserCode] internal Pipe #1 input at line 41@41() { } public override MethodInfo[] Invoke(Type _arg1) { return _arg1.GetMethods(BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic); } } [Serializable] internal sealed class initNetcodePatcher@41 : FSharpFunc<MethodInfo, Unit> { internal static readonly initNetcodePatcher@41 @_instance = new initNetcodePatcher@41(); [CompilerGenerated] [DebuggerNonUserCode] internal initNetcodePatcher@41() { } public override Unit Invoke(MethodInfo method) { invokeMethod(method); return null; } } [Literal] [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal const BindingFlags flags = BindingFlags.Instance | BindingFlags.Static | BindingFlags.NonPublic; internal static void invokeMethod(MethodInfo method) { object[] customAttributes = method.GetCustomAttributes(typeof(RuntimeInitializeOnLoadMethodAttribute), inherit: false); if (customAttributes.Length > 0) { object obj = method.Invoke(null, null); } } public static void initNetcodePatcher() { Type[] types = Assembly.GetExecutingAssembly().GetTypes(); FSharpFunc<Type, MethodInfo[]> @_instance; @_instance = Pipe #1 input at line 41@41.@_instance; Bind val = null; MethodInfo[] array = null; MethodInfo[] array2 = Bind.op_GreaterGreaterEquals<Type, MethodInfo>(types, @_instance); FSharpFunc<MethodInfo, Unit> @_instance2; @_instance2 = initNetcodePatcher@41.@_instance; MethodInfo[] array3 = array2; Iterate val2 = null; Iterate.Iterate<MethodInfo>(array3, @_instance2); } } } namespace <StartupCode$Mirage>.$Mirage { internal static class Netcode { } } namespace Mirage.Patch { [CompilationMapping(/*Could not decode attribute arguments.*/)] public static class SpawnMaskedEnemy { [Serializable] internal sealed class get@17-4<A> : FSharpFunc<FSharpRef<FSharpOption<A>>, string, string, FSharpResult<A, string>> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public string className; [CompilerGenerated] [DebuggerNonUserCode] internal get@17-4(string className) { ((FSharpFunc<FSharpRef<FSharpOption<FSharpRef<FSharpOption<A>>>>, string, string, FSharpResult<FSharpRef<FSharpOption<A>>, string>>)(object)this)..ctor(); this.className = className; } public override FSharpResult<A, string> Invoke(FSharpRef<FSharpOption<A>> field, string fieldName, string methodName) { //IL_0048: Unknown result type (might be due to invalid IL or missing references) return Option.toResultWith<string, A>(ExtraTopLevelOperators.PrintFormatToString<string>((PrintfFormat<string, Unit, string, string>)(object)new PrintfFormat<string, Unit, string, string, Tuple<string, string, string>>("%P()#%P() was called while %P() has not been initialized yet.", new object[3] { className, methodName, fieldName }, (Type[])null)), ((FSharpRef<FSharpOption<FSharpOption<A>>>)(object)field).Value); } } [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] public class SpawnMaskedEnemy { internal static Random random; internal static HashSet<ulong> killedPlayers; internal static FSharpRef<FSharpOption<HauntedMaskItem>> MaskItem; internal static FSharpFunc<string, FSharpResult<HauntedMaskItem, string>> getMaskItem; internal static int init@19; [HarmonyPostfix] [HarmonyPatch(typeof(GameNetworkManager), "Start")] public static void save mask prefab for later use(GameNetworkManager __instance) { //IL_002e: Unknown result type (might be due to invalid IL or missing references) //IL_0033: Unknown result type (might be due to invalid IL or missing references) //IL_003a: 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_0042: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_004c: Unknown result type (might be due to invalid IL or missing references) FSharpFunc<FSharpResult<Unit, string>, Unit> handleResult = Mirage.Core.Logger.handleResult; MonadFxStrictBuilder<FSharpResult<Unit, string>> val = GenericBuilders.monad'<FSharpResult<Unit, string>>(); StrictBuilder<FSharpResult<Unit, string>> val2 = (StrictBuilder<FSharpResult<Unit, string>>)(object)val; StrictBuilder<FSharpResult<Unit, string>> val3 = (StrictBuilder<FSharpResult<Unit, string>>)(object)val; Builder<FSharpResult<Unit, string>> val4 = (Builder<FSharpResult<Unit, string>>)(object)val; NetworkManager component = ((Component)__instance).GetComponent<NetworkManager>(); FSharpOption<HauntedMaskItem> val5 = Mirage.Unity.Network.findNetworkPrefab<HauntedMaskItem>().Invoke(component); FSharpResult<HauntedMaskItem, string> val6 = Option.toResultWith<string, HauntedMaskItem>("HauntedMaskItem network prefab is missing. This is likely due to a mod incompatibility.", val5); Bind val7 = null; FSharpResult<Unit, string> val8 = default(FSharpResult<Unit, string>); handleResult.Invoke(Bind.op_GreaterGreaterEquals<HauntedMaskItem, string, Unit>(val6, (FSharpFunc<HauntedMaskItem, FSharpResult<Unit, string>>)new save mask prefab for later use@75(val))); } [HarmonyPostfix] [HarmonyPatch(typeof(StartOfRound), "StartGame")] public static void reset killed players() { if (init@19 < 2) { IntrinsicFunctions.FailStaticInit(); } killedPlayers.Clear(); } [HarmonyPostfix] [HarmonyPatch(typeof(PlayerControllerB), "KillPlayerServerRpc")] public static void spawn a masked enemy on player death (non-host player)(PlayerControllerB __instance, int causeOfDeath, int deathAnimation, bool spawnBody, Vector3 bodyVelocity) { //IL_002b: Unknown result type (might be due to invalid IL or missing references) if (((NetworkBehaviour)__instance).IsHost) { PlayerControllerB localPlayerController = StartOfRound.Instance.localPlayerController; if (!HashCompare.GenericEqualityIntrinsic<PlayerControllerB>(__instance, localPlayerController)) { spawnMaskedEnemy<Vector3>(__instance, causeOfDeath, deathAnimation, spawnBody, bodyVelocity); } } } [HarmonyPostfix] [HarmonyPatch(typeof(PlayerControllerB), "KillPlayer")] public static void spawn a masked enemy on player death (host player)(PlayerControllerB __instance, int causeOfDeath, int deathAnimation, bool spawnBody, Vector3 bodyVelocity) { //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (((NetworkBehaviour)__instance).IsHost && HashCompare.GenericEqualityIntrinsic<PlayerControllerB>(__instance, StartOfRound.Instance.localPlayerController)) { spawnMaskedEnemy<Vector3>(__instance, causeOfDeath, deathAnimation, spawnBody, bodyVelocity); } } [HarmonyPrefix] [HarmonyPatch(typeof(MaskedPlayerEnemy))] [HarmonyPatch("SetHandsOutServerRpc")] [HarmonyPatch("SetHandsOutClientRpc")] public static void disable mirage hands out(ref bool setOut) { setOut = Mirage.Core.Config.getConfig().enableArmsOut@; } [HarmonyPrefix] [HarmonyPatch(typeof(MaskedPlayerEnemy), "Start")] public static void start mimicking player(MaskedPlayerEnemy __instance) { //IL_0032: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0046: Unknown result type (might be due to invalid IL or missing references) //IL_0048: Unknown result type (might be due to invalid IL or missing references) //IL_0050: Unknown result type (might be due to invalid IL or missing references) FSharpFunc<FSharpResult<Unit, string>, Unit> handleResult = Mirage.Core.Logger.handleResult; MonadFxStrictBuilder<FSharpResult<Unit, string>> val = GenericBuilders.monad'<FSharpResult<Unit, string>>(); StrictBuilder<FSharpResult<Unit, string>> val2 = (StrictBuilder<FSharpResult<Unit, string>>)(object)val; StrictBuilder<FSharpResult<Unit, string>> val3 = (StrictBuilder<FSharpResult<Unit, string>>)(object)val; Builder<FSharpResult<Unit, string>> val4 = (Builder<FSharpResult<Unit, string>>)(object)val; Mirage.Unity.MimicPlayer.MimicPlayer component = ((Component)__instance).GetComponent<Mirage.Unity.MimicPlayer.MimicPlayer>(); FSharpOption<Mirage.Unity.MimicPlayer.MimicPlayer> val5 = ((component != null) ? FSharpOption<Mirage.Unity.MimicPlayer.MimicPlayer>.Some(component) : null); FSharpResult<Mirage.Unity.MimicPlayer.MimicPlayer, string> val6 = Option.toResultWith<string, Mirage.Unity.MimicPlayer.MimicPlayer>("MimicPlayer component could not be found, likely due to a mod incompatibility.", val5); Bind val7 = null; FSharpResult<Unit, string> val8 = default(FSharpResult<Unit, string>); handleResult.Invoke(Bind.op_GreaterGreaterEquals<Mirage.Unity.MimicPlayer.MimicPlayer, string, Unit>(val6, (FSharpFunc<Mirage.Unity.MimicPlayer.MimicPlayer, FSharpResult<Unit, string>>)new start mimicking player@119(val))); } [HarmonyPostfix] [HarmonyPatch(typeof(MaskedPlayerEnemy), "Start")] public static void remove mask texture(MaskedPlayerEnemy __instance) { if (!Mirage.Core.Config.getConfig().enableMask@) { Transform[] componentsInChildren = ((Component)__instance).GetComponentsInChildren<Transform>(); FSharpFunc<Transform, bool> @_instance; @_instance = Pipe #1 stage #1 at line 127@127.@_instance; Transform[] array = componentsInChildren; Transform[] array2 = Filter.Filter<Transform>(array, @_instance, (Filter)null); FSharpFunc<Transform, Unit> @_instance2; @_instance2 = remove mask texture@128.@_instance; Transform[] array3 = array2; Iterate val = null; Iterate.Iterate<Transform>(array3, @_instance2); } } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "EndOfGame")] public static void fix teleporter not working when masked enemy is spawned on player death(StartOfRound __instance) { FSharpFunc<FSharpFunc<PlayerControllerB, Unit>, FSharpFunc<PlayerControllerB[], Unit>> @_instance; @_instance = (FSharpFunc<FSharpFunc<PlayerControllerB, Unit>, FSharpFunc<PlayerControllerB[], Unit>>)(object)fix teleporter not working when masked enemy is spawned on player death@135.@_instance; PlayerControllerB[] allPlayerScripts = __instance.allPlayerScripts; FSharpFunc<PlayerControllerB, Unit> @_instance2; @_instance2 = fix teleporter not working when masked enemy is spawned on player death@135-1.@_instance; FSharpFunc<FSharpFunc<PlayerControllerB, Unit>, PlayerControllerB[]>.InvokeFast<Unit>(@_instance, @_instance2, allPlayerScripts); } [CompilationArgumentCounts(new int[] { 1, 1, 1, 1, 1 })] [CompilerGenerated] internal static void spawnMaskedEnemy<a>(PlayerControllerB player, int causeOfDeath, int deathAnimation, bool spawnBody, a bodyVelocity) { //IL_01e1: Unknown result type (might be due to invalid IL or missing references) //IL_01e7: Unknown result type (might be due to invalid IL or missing references) //IL_01ef: Unknown result type (might be due to invalid IL or missing references) //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0044: Unknown result type (might be due to invalid IL or missing references) //IL_0047: 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_004f: Unknown result type (might be due to invalid IL or missing references) //IL_0051: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_006f: Unknown result type (might be due to invalid IL or missing references) //IL_008d: Unknown result type (might be due to invalid IL or missing references) //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_00b9: Unknown result type (might be due to invalid IL or missing references) //IL_01c0: Unknown result type (might be due to invalid IL or missing references) //IL_01c6: Unknown result type (might be due to invalid IL or missing references) //IL_01ce: Unknown result type (might be due to invalid IL or missing references) //IL_018e: Unknown result type (might be due to invalid IL or missing references) //IL_0193: Unknown result type (might be due to invalid IL or missing references) //IL_019a: Unknown result type (might be due to invalid IL or missing references) //IL_01a0: Unknown result type (might be due to invalid IL or missing references) //IL_01a2: Unknown result type (might be due to invalid IL or missing references) //IL_01a4: Unknown result type (might be due to invalid IL or missing references) //IL_01ad: Unknown result type (might be due to invalid IL or missing references) FSharpFunc<FSharpResult<Unit, string>, Unit> handleResult = Mirage.Core.Logger.handleResult; MonadFxStrictBuilder<FSharpResult<Unit, string>> val = GenericBuilders.monad'<FSharpResult<Unit, string>>(); StrictBuilder<FSharpResult<Unit, string>> val2 = (StrictBuilder<FSharpResult<Unit, string>>)(object)val; StrictBuilder<FSharpResult<Unit, string>> val3 = (StrictBuilder<FSharpResult<Unit, string>>)(object)val; if (init@19 < 2) { IntrinsicFunctions.FailStaticInit(); } FSharpResult<Unit, string> val11; if (killedPlayers.Add(player.playerClientId)) { Vector3 position = ((Component)player).transform.position; NavMeshHit val4 = default(NavMeshHit); bool flag = NavMesh.SamplePosition(position, ref val4, 1f, -1) && Mathf.Approximately(position.x, ((NavMeshHit)(ref val4)).position.x) && Mathf.Approximately(position.z, ((NavMeshHit)(ref val4)).position.z); int num; if (causeOfDeath == 5 && spawnBody) { a val5 = bodyVelocity; num = (val5.Equals(Vector3.zero) ? 1 : 0); } else { num = 0; } bool flag2 = (byte)num != 0; bool flag3 = causeOfDeath == 4 && deathAnimation == 4; Mirage.Core.Config.SyncedConfig config = Mirage.Core.Config.getConfig(); bool flag4 = !config.spawnOnlyWhenPlayerAlone@ || player.isPlayerAlone; FSharpFunc<Unit, bool> val6 = new spawnRateSuccess@44(config); if ((flag || (player.isInHangarShipRoom && StartOfRound.Instance.shipHasLanded)) && !flag2 && !flag3 && spawnBody && flag4 && val6.Invoke((Unit)null)) { Builder<FSharpResult<Unit, string>> val7 = (Builder<FSharpResult<Unit, string>>)(object)val; if (init@19 < 4) { IntrinsicFunctions.FailStaticInit(); } FSharpResult<HauntedMaskItem, string> val8 = getMaskItem.Invoke("spawn a masked enemy on player death (if configuration is enabled)"); Bind val9 = null; FSharpResult<Unit, string> val10 = default(FSharpResult<Unit, string>); val11 = Bind.op_GreaterGreaterEquals<HauntedMaskItem, string, Unit>(val8, (FSharpFunc<HauntedMaskItem, FSharpResult<Unit, string>>)new clo@55-31(player, val)); } else { MonadFxStrictBuilder<FSharpResult<Unit, string>> val12 = val; val11 = FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, Unit>.InvokeFast<FSharpResult<Unit, string>>((FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, FSharpFunc<Unit, FSharpResult<Unit, string>>>)clo@47-33.@_instance, new Tuple<Return, FSharpResult<Unit, string>>(null, default(FSharpResult<Unit, string>)), (Unit)null); } } else { MonadFxStrictBuilder<FSharpResult<Unit, string>> val13 = val; val11 = FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, Unit>.InvokeFast<FSharpResult<Unit, string>>((FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, FSharpFunc<Unit, FSharpResult<Unit, string>>>)clo@28-34.@_instance, new Tuple<Return, FSharpResult<Unit, string>>(null, default(FSharpResult<Unit, string>)), (Unit)null); } handleResult.Invoke(val11); } static SpawnMaskedEnemy() { <StartupCode$Mirage>.$Mirage.Patch.SpawnMaskedEnemy.init@ = 0; _ = <StartupCode$Mirage>.$Mirage.Patch.SpawnMaskedEnemy.init@; } } [Serializable] internal sealed class save mask prefab for later use@75-1 : FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, FSharpFunc<Unit, FSharpResult<Unit, string>>> { internal static readonly save mask prefab for later use@75-1 @_instance = new save mask prefab for later use@75-1(); [CompilerGenerated] [DebuggerNonUserCode] internal save mask prefab for later use@75-1() { } public override FSharpFunc<Unit, FSharpResult<Unit, string>> Invoke(Tuple<Return, FSharpResult<Unit, string>> tupledArg) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) return Return.Return<Unit, string>(tupledArg.Item2, tupledArg.Item1); } } [Serializable] internal sealed class save mask prefab for later use@75 : FSharpFunc<HauntedMaskItem, FSharpResult<Unit, string>> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public MonadFxStrictBuilder<FSharpResult<Unit, string>> builder@; [CompilerGenerated] [DebuggerNonUserCode] internal save mask prefab for later use@75(MonadFxStrictBuilder<FSharpResult<Unit, string>> builder@) { this.builder@ = builder@; } public override FSharpResult<Unit, string> Invoke(HauntedMaskItem _arg2) { //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_0049: Unknown result type (might be due to invalid IL or missing references) if (SpawnMaskedEnemy.init@19 < 3) { IntrinsicFunctions.FailStaticInit(); } FSharpRef<FSharpOption<HauntedMaskItem>> maskItem = SpawnMaskedEnemy.MaskItem; maskItem.Value = FSharpOption<HauntedMaskItem>.Some(_arg2); MonadFxStrictBuilder<FSharpResult<Unit, string>> val = builder@; return FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, Unit>.InvokeFast<FSharpResult<Unit, string>>((FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, FSharpFunc<Unit, FSharpResult<Unit, string>>>)save mask prefab for later use@75-1.@_instance, new Tuple<Return, FSharpResult<Unit, string>>(null, default(FSharpResult<Unit, string>)), (Unit)null); } } [Serializable] internal sealed class start mimicking player@119-1 : FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, FSharpFunc<Unit, FSharpResult<Unit, string>>> { internal static readonly start mimicking player@119-1 @_instance = new start mimicking player@119-1(); [CompilerGenerated] [DebuggerNonUserCode] internal start mimicking player@119-1() { } public override FSharpFunc<Unit, FSharpResult<Unit, string>> Invoke(Tuple<Return, FSharpResult<Unit, string>> tupledArg) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) return Return.Return<Unit, string>(tupledArg.Item2, tupledArg.Item1); } } [Serializable] internal sealed class start mimicking player@119 : FSharpFunc<Mirage.Unity.MimicPlayer.MimicPlayer, FSharpResult<Unit, string>> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public MonadFxStrictBuilder<FSharpResult<Unit, string>> builder@; [CompilerGenerated] [DebuggerNonUserCode] internal start mimicking player@119(MonadFxStrictBuilder<FSharpResult<Unit, string>> builder@) { this.builder@ = builder@; } public override FSharpResult<Unit, string> Invoke(Mirage.Unity.MimicPlayer.MimicPlayer _arg3) { //IL_0018: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) _arg3.StartMimicking(); MonadFxStrictBuilder<FSharpResult<Unit, string>> val = builder@; return FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, Unit>.InvokeFast<FSharpResult<Unit, string>>((FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, FSharpFunc<Unit, FSharpResult<Unit, string>>>)start mimicking player@119-1.@_instance, new Tuple<Return, FSharpResult<Unit, string>>(null, default(FSharpResult<Unit, string>)), (Unit)null); } } [Serializable] internal sealed class Pipe #1 stage #1 at line 127@127 : FSharpFunc<Transform, bool> { internal static readonly Pipe #1 stage #1 at line 127@127 @_instance = new Pipe #1 stage #1 at line 127@127(); [CompilerGenerated] [DebuggerNonUserCode] internal Pipe #1 stage #1 at line 127@127() { } public override bool Invoke(Transform _arg4) { return ((Object)_arg4).name.StartsWith("HeadMask"); } } [Serializable] internal sealed class remove mask texture@128 : FSharpFunc<Transform, Unit> { internal static readonly remove mask texture@128 @_instance = new remove mask texture@128(); [CompilerGenerated] [DebuggerNonUserCode] internal remove mask texture@128() { } public override Unit Invoke(Transform _arg5) { ((Component)_arg5).gameObject.SetActive(false); return null; } } [Serializable] internal sealed class fix teleporter not working when masked enemy is spawned on player death@135 : FSharpFunc<FSharpFunc<PlayerControllerB, Unit>, PlayerControllerB[], Unit> { internal static readonly fix teleporter not working when masked enemy is spawned on player death@135 @_instance = new fix teleporter not working when masked enemy is spawned on player death@135(); [CompilerGenerated] [DebuggerNonUserCode] internal fix teleporter not working when masked enemy is spawned on player death@135() { } public override Unit Invoke(FSharpFunc<PlayerControllerB, Unit> action, PlayerControllerB[] source) { Iterate val = null; Iterate.Iterate<PlayerControllerB>(source, action); return null; } } [Serializable] internal sealed class fix teleporter not working when masked enemy is spawned on player death@135-1 : FSharpFunc<PlayerControllerB, Unit> { internal static readonly fix teleporter not working when masked enemy is spawned on player death@135-1 @_instance = new fix teleporter not working when masked enemy is spawned on player death@135-1(); [CompilerGenerated] [DebuggerNonUserCode] internal fix teleporter not working when masked enemy is spawned on player death@135-1() { } public override Unit Invoke(PlayerControllerB player) { player.deadBody = null; return null; } } [Serializable] internal sealed class spawnRateSuccess@44 : FSharpFunc<Unit, bool> { public Mirage.Core.Config.SyncedConfig config; [CompilerGenerated] [DebuggerNonUserCode] internal spawnRateSuccess@44(Mirage.Core.Config.SyncedConfig config) { this.config = config; } public override bool Invoke(Unit unitVar0) { if (SpawnMaskedEnemy.init@19 < 1) { IntrinsicFunctions.FailStaticInit(); } return SpawnMaskedEnemy.random.Next(1, 101) <= config.spawnOnPlayerDeath@; } } [Serializable] internal sealed class clo@65-32 : FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, FSharpFunc<Unit, FSharpResult<Unit, string>>> { internal static readonly clo@65-32 @_instance = new clo@65-32(); [CompilerGenerated] [DebuggerNonUserCode] internal clo@65-32() { } public override FSharpFunc<Unit, FSharpResult<Unit, string>> Invoke(Tuple<Return, FSharpResult<Unit, string>> tupledArg) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) return Return.Return<Unit, string>(tupledArg.Item2, tupledArg.Item1); } } [Serializable] internal sealed class clo@55-31 : FSharpFunc<HauntedMaskItem, FSharpResult<Unit, string>> { public PlayerControllerB player; [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public MonadFxStrictBuilder<FSharpResult<Unit, string>> builder@; [CompilerGenerated] [DebuggerNonUserCode] internal clo@55-31(PlayerControllerB player, MonadFxStrictBuilder<FSharpResult<Unit, string>> builder@) { this.player = player; this.builder@ = builder@; } public override FSharpResult<Unit, string> Invoke(HauntedMaskItem _arg1) { //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_0041: 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_0095: 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_00a3: Unknown result type (might be due to invalid IL or missing references) float y = ((Component)player).transform.eulerAngles.y; GameObject val = Object.Instantiate<GameObject>(_arg1.mimicEnemy.enemyPrefab, ((Component)player).transform.position, Quaternion.Euler(new Vector3(0f, y, 0f))); MaskedPlayerEnemy component = val.GetComponent<MaskedPlayerEnemy>(); component.mimickingPlayer = player; val.GetComponentInChildren<NetworkObject>().Spawn(true); ((Component)player).GetComponent<Mirage.Unity.PlayerReanimator.PlayerReanimator>().DeactivateBody((EnemyAI)(object)component); MonadFxStrictBuilder<FSharpResult<Unit, string>> val2 = builder@; return FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, Unit>.InvokeFast<FSharpResult<Unit, string>>((FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, FSharpFunc<Unit, FSharpResult<Unit, string>>>)clo@65-32.@_instance, new Tuple<Return, FSharpResult<Unit, string>>(null, default(FSharpResult<Unit, string>)), (Unit)null); } } [Serializable] internal sealed class clo@47-33 : FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, FSharpFunc<Unit, FSharpResult<Unit, string>>> { internal static readonly clo@47-33 @_instance = new clo@47-33(); [CompilerGenerated] [DebuggerNonUserCode] internal clo@47-33() { } public override FSharpFunc<Unit, FSharpResult<Unit, string>> Invoke(Tuple<Return, FSharpResult<Unit, string>> tupledArg) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) return Return.Return<Unit, string>(tupledArg.Item2, tupledArg.Item1); } } [Serializable] internal sealed class clo@28-34 : FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, FSharpFunc<Unit, FSharpResult<Unit, string>>> { internal static readonly clo@28-34 @_instance = new clo@28-34(); [CompilerGenerated] [DebuggerNonUserCode] internal clo@28-34() { } public override FSharpFunc<Unit, FSharpResult<Unit, string>> Invoke(Tuple<Return, FSharpResult<Unit, string>> tupledArg) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) return Return.Return<Unit, string>(tupledArg.Item2, tupledArg.Item1); } } internal static FSharpFunc<FSharpRef<FSharpOption<A>>, FSharpFunc<string, FSharpFunc<string, FSharpResult<A, string>>>> get<A>() { string className = "SpawnMaskedEnemy"; return (FSharpFunc<FSharpRef<FSharpOption<A>>, FSharpFunc<string, FSharpFunc<string, FSharpResult<A, string>>>>)(object)new get@17-4<A>(className); } } } namespace <StartupCode$Mirage>.$Mirage.Patch { internal static class SpawnMaskedEnemy { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] internal static int init@; static SpawnMaskedEnemy() { Mirage.Patch.SpawnMaskedEnemy.SpawnMaskedEnemy.random = new Random(); Mirage.Patch.SpawnMaskedEnemy.SpawnMaskedEnemy.init@19 = 1; Mirage.Patch.SpawnMaskedEnemy.SpawnMaskedEnemy.killedPlayers = new HashSet<ulong>(); Mirage.Patch.SpawnMaskedEnemy.SpawnMaskedEnemy.init@19 = 2; Mirage.Patch.SpawnMaskedEnemy.SpawnMaskedEnemy.MaskItem = Mirage.Core.Field.field<HauntedMaskItem>(); Mirage.Patch.SpawnMaskedEnemy.SpawnMaskedEnemy.init@19 = 3; if (Mirage.Patch.SpawnMaskedEnemy.SpawnMaskedEnemy.init@19 < 3) { IntrinsicFunctions.FailStaticInit(); } FSharpRef<FSharpOption<HauntedMaskItem>> maskItem = Mirage.Patch.SpawnMaskedEnemy.SpawnMaskedEnemy.MaskItem; Mirage.Patch.SpawnMaskedEnemy.SpawnMaskedEnemy.getMaskItem = FSharpFunc<FSharpRef<FSharpOption<HauntedMaskItem>>, string>.InvokeFast<FSharpFunc<string, FSharpResult<HauntedMaskItem, string>>>(Mirage.Patch.SpawnMaskedEnemy.get<HauntedMaskItem>(), maskItem, "MaskItem"); Mirage.Patch.SpawnMaskedEnemy.SpawnMaskedEnemy.init@19 = 4; } } } namespace Mirage.Patch { [CompilationMapping(/*Could not decode attribute arguments.*/)] public static class RemovePenalty { [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] public class RemovePenalty { [HarmonyPrefix] [HarmonyPatch(typeof(HUDManager), "ApplyPenalty")] public static bool disable credits penalty on end of round() { return Mirage.Core.Config.getConfig().enablePenalty@; } } } } namespace <StartupCode$Mirage>.$Mirage.Patch { internal static class RemovePenalty { } } namespace Mirage.Patch { [CompilationMapping(/*Could not decode attribute arguments.*/)] public static class SyncConfig { [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] public class SyncConfig { [HarmonyPostfix] [HarmonyPatch(typeof(PlayerControllerB), "ConnectClientToPlayerObject")] public static void synchronize config when joining a game() { if (NetworkManager.Singleton.IsHost) { Mirage.Core.Config.registerHandler(Mirage.Core.Config.SyncAction.RequestSync); return; } Mirage.Core.Config.registerHandler(Mirage.Core.Config.SyncAction.ReceiveSync); Mirage.Core.Config.requestSync(); } [HarmonyPostfix] [HarmonyPatch(typeof(GameNetworkManager), "StartDisconnect")] public static void desynchronize config after leaving the game() { Mirage.Core.Config.revertSync(); } } } } namespace <StartupCode$Mirage>.$Mirage.Patch { internal static class SyncConfig { } } namespace Mirage.Patch { [CompilationMapping(/*Could not decode attribute arguments.*/)] public static class RegisterPrefab { [Serializable] internal sealed class initPrefabs@22 : FSharpFunc<Component, Unit> { internal static readonly initPrefabs@22 @_instance = new initPrefabs@22(); [CompilerGenerated] [DebuggerNonUserCode] internal initPrefabs@22() { } public override Unit Invoke(Component _arg1) { return null; } } [Serializable] internal sealed class initPrefabs@22-1 : FSharpFunc<Type, Component> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public GameObject objectArg; [CompilerGenerated] [DebuggerNonUserCode] internal initPrefabs@22-1(GameObject objectArg) { this.objectArg = objectArg; } public override Component Invoke(Type componentType) { return objectArg.AddComponent(componentType); } } [Serializable] internal sealed class initPrefabs@22-2 : FSharpFunc<Type, Unit> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public FSharpFunc<Component, Unit> func2; [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public FSharpFunc<Type, Component> func1; [CompilerGenerated] [DebuggerNonUserCode] internal initPrefabs@22-2(FSharpFunc<Component, Unit> func2, FSharpFunc<Type, Component> func1) { this.func2 = func2; this.func1 = func1; } public override Unit Invoke(Type x) { return func2.Invoke(func1.Invoke(x)); } } [Serializable] internal sealed class get@28-3<A> : FSharpFunc<FSharpRef<FSharpOption<A>>, string, string, FSharpResult<A, string>> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public string className; [CompilerGenerated] [DebuggerNonUserCode] internal get@28-3(string className) { ((FSharpFunc<FSharpRef<FSharpOption<FSharpRef<FSharpOption<A>>>>, string, string, FSharpResult<FSharpRef<FSharpOption<A>>, string>>)(object)this)..ctor(); this.className = className; } public override FSharpResult<A, string> Invoke(FSharpRef<FSharpOption<A>> field, string fieldName, string methodName) { //IL_0048: Unknown result type (might be due to invalid IL or missing references) return Option.toResultWith<string, A>(ExtraTopLevelOperators.PrintFormatToString<string>((PrintfFormat<string, Unit, string, string>)(object)new PrintfFormat<string, Unit, string, string, Tuple<string, string, string>>("%P()#%P() was called while %P() has not been initialized yet.", new object[3] { className, methodName, fieldName }, (Type[])null)), ((FSharpRef<FSharpOption<FSharpOption<A>>>)(object)field).Value); } } [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] public class RegisterPrefab { internal static FSharpRef<FSharpOption<MaskedPlayerEnemy>> Prefab; internal static FSharpFunc<string, FSharpResult<MaskedPlayerEnemy, string>> getPrefab; internal static int init@30; [HarmonyPostfix] [HarmonyPatch(typeof(GameNetworkManager), "Start")] public static void register network prefab(GameNetworkManager __instance) { //IL_0053: 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_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_0067: Unknown result type (might be due to invalid IL or missing references) //IL_0069: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) FSharpFunc<FSharpResult<Unit, string>, Unit> handleResult = Mirage.Core.Logger.handleResult; MonadFxStrictBuilder<FSharpResult<Unit, string>> val = GenericBuilders.monad'<FSharpResult<Unit, string>>(); StrictBuilder<FSharpResult<Unit, string>> val2 = (StrictBuilder<FSharpResult<Unit, string>>)(object)val; StrictBuilder<FSharpResult<Unit, string>> val3 = (StrictBuilder<FSharpResult<Unit, string>>)(object)val; NetworkManager component = ((Component)__instance).GetComponent<NetworkManager>(); FSharpFunc<NetworkPrefab, Unit> @_instance; @_instance = register network prefab@39.@_instance; List<NetworkPrefab> prefabs = component.NetworkConfig.Prefabs.m_Prefabs; Iterate val4 = null; Iterate.Iterate<NetworkPrefab>(prefabs, @_instance); Builder<FSharpResult<Unit, string>> val5 = (Builder<FSharpResult<Unit, string>>)(object)val; FSharpOption<MaskedPlayerEnemy> val6 = Mirage.Unity.Network.findNetworkPrefab<MaskedPlayerEnemy>().Invoke(component); FSharpResult<MaskedPlayerEnemy, string> val7 = Option.toResultWith<string, MaskedPlayerEnemy>("MaskedPlayerEnemy network prefab is missing. This is likely due to a mod incompatibility", val6); Bind val8 = null; FSharpResult<Unit, string> val9 = default(FSharpResult<Unit, string>); handleResult.Invoke(Bind.op_GreaterGreaterEquals<MaskedPlayerEnemy, string, Unit>(val7, (FSharpFunc<MaskedPlayerEnemy, FSharpResult<Unit, string>>)new register network prefab@45-1(val))); } [HarmonyPostfix] [HarmonyPatch(typeof(TimeOfDay), "Start")] public static void modify natural spawns for masked enemies() { //IL_0088: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_0096: 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_0059: Unknown result type (might be due to invalid IL or missing references) //IL_0060: Unknown result type (might be due to invalid IL or missing references) //IL_0066: Unknown result type (might be due to invalid IL or missing references) //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_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) FSharpFunc<FSharpResult<Unit, string>, Unit> handleResult = Mirage.Core.Logger.handleResult; MonadFxStrictBuilder<FSharpResult<Unit, string>> val = GenericBuilders.monad'<FSharpResult<Unit, string>>(); StrictBuilder<FSharpResult<Unit, string>> val2 = (StrictBuilder<FSharpResult<Unit, string>>)(object)val; StrictBuilder<FSharpResult<Unit, string>> val3 = (StrictBuilder<FSharpResult<Unit, string>>)(object)val; StartOfRound instance = StartOfRound.Instance; Mirage.Core.Config.SyncedConfig config = Mirage.Core.Config.getConfig(); FSharpResult<Unit, string> val8; if (((NetworkBehaviour)instance).IsHost && config.enableOverrideSpawnChance@) { Builder<FSharpResult<Unit, string>> val4 = (Builder<FSharpResult<Unit, string>>)(object)val; if (init@30 < 2) { IntrinsicFunctions.FailStaticInit(); } FSharpResult<MaskedPlayerEnemy, string> val5 = getPrefab.Invoke("``modify natural spawns for masked enemies``"); Bind val6 = null; FSharpResult<Unit, string> val7 = default(FSharpResult<Unit, string>); val8 = Bind.op_GreaterGreaterEquals<MaskedPlayerEnemy, string, Unit>(val5, (FSharpFunc<MaskedPlayerEnemy, FSharpResult<Unit, string>>)new modify natural spawns for masked enemies@57(val, instance, config)); } else { MonadFxStrictBuilder<FSharpResult<Unit, string>> val9 = val; val8 = FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, Unit>.InvokeFast<FSharpResult<Unit, string>>((FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, FSharpFunc<Unit, FSharpResult<Unit, string>>>)modify natural spawns for masked enemies@55-13.@_instance, new Tuple<Return, FSharpResult<Unit, string>>(null, default(FSharpResult<Unit, string>)), (Unit)null); } handleResult.Invoke(val8); } [HarmonyPostfix] [HarmonyPatch(typeof(PlayerControllerB), "Awake")] public static void register player reanimator prefab(PlayerControllerB __instance) { Mirage.Unity.PlayerReanimator.PlayerReanimator playerReanimator = ((Component)__instance).gameObject.AddComponent<Mirage.Unity.PlayerReanimator.PlayerReanimator>(); } static RegisterPrefab() { <StartupCode$Mirage>.$Mirage.Patch.RegisterPrefab.init@ = 0; _ = <StartupCode$Mirage>.$Mirage.Patch.RegisterPrefab.init@; } } [Serializable] internal sealed class register network prefab@39 : FSharpFunc<NetworkPrefab, Unit> { internal static readonly register network prefab@39 @_instance = new register network prefab@39(); [CompilerGenerated] [DebuggerNonUserCode] internal register network prefab@39() { } public override Unit Invoke(NetworkPrefab prefab) { if (Mirage.Unity.Network.isPrefab<EnemyAI>(prefab)) { Mirage.Patch.RegisterPrefab.initPrefabs<EnemyAI>(prefab); return null; } return null; } } [Serializable] internal sealed class register network prefab@46-2 : FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, FSharpFunc<Unit, FSharpResult<Unit, string>>> { internal static readonly register network prefab@46-2 @_instance = new register network prefab@46-2(); [CompilerGenerated] [DebuggerNonUserCode] internal register network prefab@46-2() { } public override FSharpFunc<Unit, FSharpResult<Unit, string>> Invoke(Tuple<Return, FSharpResult<Unit, string>> tupledArg) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) return Return.Return<Unit, string>(tupledArg.Item2, tupledArg.Item1); } } [Serializable] internal sealed class register network prefab@45-1 : FSharpFunc<MaskedPlayerEnemy, FSharpResult<Unit, string>> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public MonadFxStrictBuilder<FSharpResult<Unit, string>> builder@; [CompilerGenerated] [DebuggerNonUserCode] internal register network prefab@45-1(MonadFxStrictBuilder<FSharpResult<Unit, string>> builder@) { this.builder@ = builder@; } public override FSharpResult<Unit, string> Invoke(MaskedPlayerEnemy _arg1) { //IL_0047: 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_0055: Unknown result type (might be due to invalid IL or missing references) ((EnemyAI)_arg1).enemyType.MaxCount = 2; if (RegisterPrefab.init@30 < 1) { IntrinsicFunctions.FailStaticInit(); } FSharpRef<FSharpOption<MaskedPlayerEnemy>> prefab = RegisterPrefab.Prefab; prefab.Value = FSharpOption<MaskedPlayerEnemy>.Some(_arg1); MonadFxStrictBuilder<FSharpResult<Unit, string>> val = builder@; return FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, Unit>.InvokeFast<FSharpResult<Unit, string>>((FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, FSharpFunc<Unit, FSharpResult<Unit, string>>>)register network prefab@46-2.@_instance, new Tuple<Return, FSharpResult<Unit, string>>(null, default(FSharpResult<Unit, string>)), (Unit)null); } } [Serializable] internal sealed class addKey@61-1 : FSharpFunc<int, Unit> { internal static readonly addKey@61-1 @_instance = new addKey@61-1(); [CompilerGenerated] [DebuggerNonUserCode] internal addKey@61-1() { } public override Unit Invoke(int _arg1) { return null; } } [Serializable] internal sealed class addKey@61-2 : FSharpFunc<Keyframe, int> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public AnimationCurve objectArg; [CompilerGenerated] [DebuggerNonUserCode] internal addKey@61-2(AnimationCurve objectArg) { this.objectArg = objectArg; } public override int Invoke(Keyframe key) { //IL_0006: Unknown result type (might be due to invalid IL or missing references) return objectArg.AddKey(key); } } [Serializable] internal sealed class addKey@61 : FSharpFunc<float, float, Unit> { public AnimationCurve spawnCurve; [CompilerGenerated] [DebuggerNonUserCode] internal addKey@61(AnimationCurve spawnCurve) { this.spawnCurve = spawnCurve; } public override Unit Invoke(float time, float value) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) FSharpFunc<int, Unit> @_instance; @_instance = addKey@61-1.@_instance; AnimationCurve objectArg = spawnCurve; FSharpFunc<Keyframe, int> val = new addKey@61-2(objectArg); Keyframe val2 = new Keyframe(time, value); return @_instance.Invoke(val.Invoke(val2)); } } [Serializable] internal sealed class isMaskedEnemy@75-1 : FSharpFunc<bool, bool> { internal static readonly isMaskedEnemy@75-1 @_instance = new isMaskedEnemy@75-1(); [CompilerGenerated] [DebuggerNonUserCode] internal isMaskedEnemy@75-1() { } public override bool Invoke(bool value) { return !value; } } [Serializable] internal sealed class isMaskedEnemy@75-2 : FSharpFunc<MaskedPlayerEnemy, bool> { internal static readonly isMaskedEnemy@75-2 @_instance = new isMaskedEnemy@75-2(); [CompilerGenerated] [DebuggerNonUserCode] internal isMaskedEnemy@75-2() { } public override bool Invoke(MaskedPlayerEnemy value) { if (value == null) { return true; } return false; } } [Serializable] internal sealed class isMaskedEnemy@75 : FSharpFunc<SpawnableEnemyWithRarity, bool> { internal static readonly isMaskedEnemy@75 @_instance = new isMaskedEnemy@75(); [CompilerGenerated] [DebuggerNonUserCode] internal isMaskedEnemy@75() { } public override bool Invoke(SpawnableEnemyWithRarity enemy) { FSharpFunc<bool, bool> val = isMaskedEnemy@75-1.@_instance; FSharpFunc<MaskedPlayerEnemy, bool> val2 = isMaskedEnemy@75-2.@_instance; MaskedPlayerEnemy component = enemy.enemyType.enemyPrefab.GetComponent<MaskedPlayerEnemy>(); return val.Invoke(val2.Invoke(component)); } } [Serializable] internal sealed class modify natural spawns for masked enemies@77-3 : FSharpFunc<Unit, FSharpResult<Unit, string>> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public FSharpFunc<FSharpFunc<Unit, bool>, FSharpFunc<FSharpFunc<Unit, FSharpResult<Unit, string>>, FSharpResult<Unit, string>>> loop; [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public FSharpFunc<Unit, bool> guard; [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public FSharpFunc<Unit, FSharpResult<Unit, string>> body; [CompilerGenerated] [DebuggerNonUserCode] internal modify natural spawns for masked enemies@77-3(FSharpFunc<FSharpFunc<Unit, bool>, FSharpFunc<FSharpFunc<Unit, FSharpResult<Unit, string>>, FSharpResult<Unit, string>>> loop, FSharpFunc<Unit, bool> guard, FSharpFunc<Unit, FSharpResult<Unit, string>> body) { this.loop = loop; this.guard = guard; this.body = body; } public override FSharpResult<Unit, string> Invoke(Unit unitVar0) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) return FSharpFunc<FSharpFunc<Unit, bool>, FSharpFunc<Unit, FSharpResult<Unit, string>>>.InvokeFast<FSharpResult<Unit, string>>(loop, guard, body); } } [Serializable] internal sealed class modify natural spawns for masked enemies@77-4 : FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, FSharpFunc<Unit, FSharpResult<Unit, string>>> { internal static readonly modify natural spawns for masked enemies@77-4 @_instance = new modify natural spawns for masked enemies@77-4(); [CompilerGenerated] [DebuggerNonUserCode] internal modify natural spawns for masked enemies@77-4() { } public override FSharpFunc<Unit, FSharpResult<Unit, string>> Invoke(Tuple<Return, FSharpResult<Unit, string>> tupledArg) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) return Return.Return<Unit, string>(tupledArg.Item2, tupledArg.Item1); } } [Serializable] internal sealed class modify natural spawns for masked enemies@77-2 : FSharpFunc<FSharpFunc<Unit, bool>, FSharpFunc<Unit, FSharpResult<Unit, string>>, FSharpResult<Unit, string>> { internal static readonly modify natural spawns for masked enemies@77-2 @_instance = new modify natural spawns for masked enemies@77-2(); [CompilerGenerated] [DebuggerNonUserCode] internal modify natural spawns for masked enemies@77-2() { } public override FSharpResult<Unit, string> Invoke(FSharpFunc<Unit, bool> guard, FSharpFunc<Unit, FSharpResult<Unit, string>> body) { //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003d: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_000b: Unknown result type (might be due to invalid IL or missing references) //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) //IL_0026: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_0029: Unknown result type (might be due to invalid IL or missing references) if (guard.Invoke((Unit)null)) { FSharpResult<Unit, string> val = body.Invoke((Unit)null); FSharpFunc<Unit, FSharpResult<Unit, string>> val2 = new modify natural spawns for masked enemies@77-3((FSharpFunc<FSharpFunc<Unit, bool>, FSharpFunc<FSharpFunc<Unit, FSharpResult<Unit, string>>, FSharpResult<Unit, string>>>)(object)this, guard, body); Bind val3 = null; FSharpResult<Unit, string> val4 = default(FSharpResult<Unit, string>); return Bind.op_GreaterGreaterEquals<Unit, string, Unit>(val, val2); } return FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, Unit>.InvokeFast<FSharpResult<Unit, string>>((FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, FSharpFunc<Unit, FSharpResult<Unit, string>>>)modify natural spawns for masked enemies@77-4.@_instance, new Tuple<Return, FSharpResult<Unit, string>>(null, default(FSharpResult<Unit, string>)), (Unit)null); } } [Serializable] internal sealed class modify natural spawns for masked enemies@77-5 : FSharpFunc<Unit, bool> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public IEnumerator<SelectableLevel> @enum; [CompilerGenerated] [DebuggerNonUserCode] internal modify natural spawns for masked enemies@77-5(IEnumerator<SelectableLevel> @enum) { this.@enum = @enum; } public override bool Invoke(Unit unitVar) { return @enum.MoveNext(); } } [Serializable] [SpecialName] [StructLayout(LayoutKind.Auto, CharSet = CharSet.Auto)] [CompilationMapping(/*Could not decode attribute arguments.*/)] internal sealed class modify natural spawns for masked enemies@78-7 { public FSharpFunc<SpawnableEnemyWithRarity, bool> isMaskedEnemy; public modify natural spawns for masked enemies@78-7(FSharpFunc<SpawnableEnemyWithRarity, bool> isMaskedEnemy) { this.isMaskedEnemy = isMaskedEnemy; base..ctor(); } internal bool Invoke(SpawnableEnemyWithRarity delegateArg0) { return isMaskedEnemy.Invoke(delegateArg0); } } [Serializable] internal sealed class Pipe #1 stage #1 at line 81@81 : FSharpFunc<SpawnableEnemyWithRarity, int> { internal static readonly Pipe #1 stage #1 at line 81@81 @_instance = new Pipe #1 stage #1 at line 81@81(); [CompilerGenerated] [DebuggerNonUserCode] internal Pipe #1 stage #1 at line 81@81() { } public override int Invoke(SpawnableEnemyWithRarity _arg4) { return _arg4.rarity; } } [Serializable] internal sealed class totalWeight@82 : FSharpFunc<int, int, int> { internal static readonly totalWeight@82 @_instance = new totalWeight@82(); [CompilerGenerated] [DebuggerNonUserCode] internal totalWeight@82() { } public override int Invoke(int x, int y) { Default1 val = null; return x + y; } } [Serializable] internal sealed class weight@84 : FSharpFunc<double, int> { internal static readonly weight@84 @_instance = new weight@84(); [CompilerGenerated] [DebuggerNonUserCode] internal weight@84() { } public override int Invoke(double value) { return (int)value; } } [Serializable] internal sealed class weight@84-1 : FSharpFunc<double, double> { internal static readonly weight@84-1 @_instance = new weight@84-1(); [CompilerGenerated] [DebuggerNonUserCode] internal weight@84-1() { } public override double Invoke(double value) { return Math.Ceiling(value); } } [Serializable] internal sealed class modify natural spawns for masked enemies@91-8 : FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, FSharpFunc<Unit, FSharpResult<Unit, string>>> { internal static readonly modify natural spawns for masked enemies@91-8 @_instance = new modify natural spawns for masked enemies@91-8(); [CompilerGenerated] [DebuggerNonUserCode] internal modify natural spawns for masked enemies@91-8() { } public override FSharpFunc<Unit, FSharpResult<Unit, string>> Invoke(Tuple<Return, FSharpResult<Unit, string>> tupledArg) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) return Return.Return<Unit, string>(tupledArg.Item2, tupledArg.Item1); } } [Serializable] internal sealed class modify natural spawns for masked enemies@83-9 : FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, FSharpFunc<Unit, FSharpResult<Unit, string>>> { internal static readonly modify natural spawns for masked enemies@83-9 @_instance = new modify natural spawns for masked enemies@83-9(); [CompilerGenerated] [DebuggerNonUserCode] internal modify natural spawns for masked enemies@83-9() { } public override FSharpFunc<Unit, FSharpResult<Unit, string>> Invoke(Tuple<Return, FSharpResult<Unit, string>> tupledArg) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) return Return.Return<Unit, string>(tupledArg.Item2, tupledArg.Item1); } } [Serializable] internal sealed class modify natural spawns for masked enemies@77-6 : FSharpFunc<Unit, FSharpResult<Unit, string>> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public MonadFxStrictBuilder<FSharpResult<Unit, string>> builder@; public EnemyType enemyType; public double minSpawnChance; public FSharpFunc<SpawnableEnemyWithRarity, bool> isMaskedEnemy; public List<string> logs; [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public IEnumerator<SelectableLevel> @enum; [CompilerGenerated] [DebuggerNonUserCode] internal modify natural spawns for masked enemies@77-6(MonadFxStrictBuilder<FSharpResult<Unit, string>> builder@, EnemyType enemyType, double minSpawnChance, FSharpFunc<SpawnableEnemyWithRarity, bool> isMaskedEnemy, List<string> logs, IEnumerator<SelectableLevel> @enum) { this.builder@ = builder@; this.enemyType = enemyType; this.minSpawnChance = minSpawnChance; this.isMaskedEnemy = isMaskedEnemy; this.logs = logs; this.@enum = @enum; } public override FSharpResult<Unit, string> Invoke(Unit unitVar0) { //IL_017f: Unknown result type (might be due to invalid IL or missing references) //IL_0185: Unknown result type (might be due to invalid IL or missing references) //IL_018d: Unknown result type (might be due to invalid IL or missing references) //IL_0121: Unknown result type (might be due to invalid IL or missing references) //IL_0128: Expected O, but got Unknown //IL_015b: Unknown result type (might be due to invalid IL or missing references) //IL_0161: 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) SelectableLevel current = @enum.Current; SelectableLevel val = current; int num = val.Enemies.RemoveAll(new modify natural spawns for masked enemies@78-7(isMaskedEnemy).Invoke); List<SpawnableEnemyWithRarity> enemies = val.Enemies; FSharpFunc<SpawnableEnemyWithRarity, int> @_instance; @_instance = Pipe #1 stage #1 at line 81@81.@_instance; List<SpawnableEnemyWithRarity> item = enemies; Map val2 = null; List<int> list = null; List<int> list2 = Map.Map<SpawnableEnemyWithRarity, int>(new Tuple<List<SpawnableEnemyWithRarity>, FSharpFunc<SpawnableEnemyWithRarity, int>>(item, @_instance), val2); List<int> list3 = list2; totalWeight@82 @_instance2; @_instance2 = totalWeight@82.@_instance; Zero val3 = null; int num2 = 0; Default1 val4 = (Default1)(object)val3; int num3 = Fold.Fold<int, int>((IEnumerable<int>)list3, (FSharpFunc<int, FSharpFunc<int, int>>)(object)@_instance2, 0, (Fold)null); if (num3 != 0) { FSharpFunc<double, int> @_instance3; @_instance3 = weight@84.@_instance; FSharpFunc<double, double> @_instance4; @_instance4 = weight@84-1.@_instance; double num4 = (double)num3 * minSpawnChance / (100.0 - minSpawnChance); int num5 = @_instance3.Invoke(@_instance4.Invoke(num4)); num3 += num5; double num6 = (double)num5 / (double)num3 * 100.0; logs.Add(ExtraTopLevelOperators.PrintFormatToString<string>((PrintfFormat<string, Unit, string, string>)(object)new PrintfFormat<string, Unit, string, string, Tuple<string, int, double>>("Level: %P(). Weight: %P(). SpawnChance: %P(F2)%%", new object[3] { val.PlanetName, num5, num6 }, (Type[])null))); SpawnableEnemyWithRarity val5 = new SpawnableEnemyWithRarity(); val5.rarity = num5; val5.enemyType = enemyType; val.Enemies.Add(val5); MonadFxStrictBuilder<FSharpResult<Unit, string>> val6 = builder@; return FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, Unit>.InvokeFast<FSharpResult<Unit, string>>((FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, FSharpFunc<Unit, FSharpResult<Unit, string>>>)modify natural spawns for masked enemies@91-8.@_instance, new Tuple<Return, FSharpResult<Unit, string>>(null, default(FSharpResult<Unit, string>)), (Unit)null); } MonadFxStrictBuilder<FSharpResult<Unit, string>> val7 = builder@; return FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, Unit>.InvokeFast<FSharpResult<Unit, string>>((FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, FSharpFunc<Unit, FSharpResult<Unit, string>>>)modify natural spawns for masked enemies@83-9.@_instance, new Tuple<Return, FSharpResult<Unit, string>>(null, default(FSharpResult<Unit, string>)), (Unit)null); } } [Serializable] internal sealed class modify natural spawns for masked enemies@77-1 : FSharpFunc<IDisposable, FSharpResult<Unit, string>> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public MonadFxStrictBuilder<FSharpResult<Unit, string>> builder@; public EnemyType enemyType; public double minSpawnChance; public FSharpFunc<SpawnableEnemyWithRarity, bool> isMaskedEnemy; public List<string> logs; [CompilerGenerated] [DebuggerNonUserCode] internal modify natural spawns for masked enemies@77-1(MonadFxStrictBuilder<FSharpResult<Unit, string>> builder@, EnemyType enemyType, double minSpawnChance, FSharpFunc<SpawnableEnemyWithRarity, bool> isMaskedEnemy, List<string> logs) { this.builder@ = builder@; this.enemyType = enemyType; this.minSpawnChance = minSpawnChance; this.isMaskedEnemy = isMaskedEnemy; this.logs = logs; } public override FSharpResult<Unit, string> Invoke(IDisposable @enum) { //IL_0038: Unknown result type (might be due to invalid IL or missing references) IEnumerator<SelectableLevel> enum2 = (IEnumerator<SelectableLevel>)(object)@enum; FSharpFunc<FSharpFunc<Unit, bool>, FSharpFunc<FSharpFunc<Unit, FSharpResult<Unit, string>>, FSharpResult<Unit, string>>> @_instance; @_instance = (FSharpFunc<FSharpFunc<Unit, bool>, FSharpFunc<FSharpFunc<Unit, FSharpResult<Unit, string>>, FSharpResult<Unit, string>>>)(object)modify natural spawns for masked enemies@77-2.@_instance; return FSharpFunc<FSharpFunc<Unit, bool>, FSharpFunc<Unit, FSharpResult<Unit, string>>>.InvokeFast<FSharpResult<Unit, string>>(@_instance, (FSharpFunc<Unit, bool>)new modify natural spawns for masked enemies@77-5(enum2), (FSharpFunc<Unit, FSharpResult<Unit, string>>)new modify natural spawns for masked enemies@77-6(builder@, enemyType, minSpawnChance, isMaskedEnemy, logs, enum2)); } } [Serializable] internal sealed class modify natural spawns for masked enemies@92-11 : FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, FSharpFunc<Unit, FSharpResult<Unit, string>>> { internal static readonly modify natural spawns for masked enemies@92-11 @_instance = new modify natural spawns for masked enemies@92-11(); [CompilerGenerated] [DebuggerNonUserCode] internal modify natural spawns for masked enemies@92-11() { } public override FSharpFunc<Unit, FSharpResult<Unit, string>> Invoke(Tuple<Return, FSharpResult<Unit, string>> tupledArg) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) return Return.Return<Unit, string>(tupledArg.Item2, tupledArg.Item1); } } [Serializable] internal sealed class modify natural spawns for masked enemies@92-10 : FSharpFunc<Unit, FSharpResult<Unit, string>> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public MonadFxStrictBuilder<FSharpResult<Unit, string>> builder@; public List<string> logs; [CompilerGenerated] [DebuggerNonUserCode] internal modify natural spawns for masked enemies@92-10(MonadFxStrictBuilder<FSharpResult<Unit, string>> builder@, List<string> logs) { this.builder@ = builder@; this.logs = logs; } public override FSharpResult<Unit, string> Invoke(Unit unitVar) { //IL_0034: Unknown result type (might be due to invalid IL or missing references) //IL_003a: Unknown result type (might be due to invalid IL or missing references) //IL_0041: Unknown result type (might be due to invalid IL or missing references) Mirage.Core.Logger.logInfo.Invoke("Adjusting spawn weights for masked enemies:\n" + string.Join("\n", logs)); MonadFxStrictBuilder<FSharpResult<Unit, string>> val = builder@; return FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, Unit>.InvokeFast<FSharpResult<Unit, string>>((FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, FSharpFunc<Unit, FSharpResult<Unit, string>>>)modify natural spawns for masked enemies@92-11.@_instance, new Tuple<Return, FSharpResult<Unit, string>>(null, default(FSharpResult<Unit, string>)), (Unit)null); } } [Serializable] internal sealed class modify natural spawns for masked enemies@77-12 : FSharpFunc<Unit, FSharpResult<Unit, string>> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public FSharpFunc<Unit, FSharpResult<Unit, string>> b; [CompilerGenerated] [DebuggerNonUserCode] internal modify natural spawns for masked enemies@77-12(FSharpFunc<Unit, FSharpResult<Unit, string>> b) { this.b = b; } public override FSharpResult<Unit, string> Invoke(Unit unitVar0) { //IL_0007: Unknown result type (might be due to invalid IL or missing references) return b.Invoke((Unit)null); } } [Serializable] internal sealed class modify natural spawns for masked enemies@57 : FSharpFunc<MaskedPlayerEnemy, FSharpResult<Unit, string>> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public MonadFxStrictBuilder<FSharpResult<Unit, string>> builder@; public StartOfRound playerManager; public Mirage.Core.Config.SyncedConfig config; [CompilerGenerated] [DebuggerNonUserCode] internal modify natural spawns for masked enemies@57(MonadFxStrictBuilder<FSharpResult<Unit, string>> builder@, StartOfRound playerManager, Mirage.Core.Config.SyncedConfig config) { this.builder@ = builder@; this.playerManager = playerManager; this.config = config; } public unsafe override FSharpResult<Unit, string> Invoke(MaskedPlayerEnemy _arg2) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Expected O, but got Unknown //IL_00fb: Expected O, but got Ref //IL_0116: Unknown result type (might be due to invalid IL or missing references) //IL_011c: Unknown result type (might be due to invalid IL or missing references) //IL_011e: Unknown result type (might be due to invalid IL or missing references) //IL_0130: Unknown result type (might be due to invalid IL or missing references) //IL_0135: Unknown result type (might be due to invalid IL or missing references) //IL_015c: Unknown result type (might be due to invalid IL or missing references) //IL_0162: Unknown result type (might be due to invalid IL or missing references) //IL_0164: Unknown result type (might be due to invalid IL or missing references) //IL_0166: Unknown result type (might be due to invalid IL or missing references) //IL_016a: Unknown result type (might be due to invalid IL or missing references) EnemyType obj; if (config.useCustomSpawnCurve@) { EnemyType val = (EnemyType)(object)Object.Instantiate((Object)(object)((EnemyAI)_arg2).enemyType); AnimationCurve probabilityCurve = val.probabilityCurve; FSharpFunc<float, FSharpFunc<float, Unit>> val2 = (FSharpFunc<float, FSharpFunc<float, Unit>>)(object)new addKey@61(probabilityCurve); probabilityCurve.ClearKeys(); FSharpFunc<float, float>.InvokeFast<Unit>(val2, 0f, 0f); FSharpFunc<float, float>.InvokeFast<Unit>(val2, 0.19f, 0f); FSharpFunc<float, float>.InvokeFast<Unit>(val2, 0.2f, 0.5f); FSharpFunc<float, float>.InvokeFast<Unit>(val2, 0.5f, 10f); FSharpFunc<float, float>.InvokeFast<Unit>(val2, 0.9f, 15f); FSharpFunc<float, float>.InvokeFast<Unit>(val2, 1f, 1f); obj = val; } else { obj = ((EnemyAI)_arg2).enemyType; } EnemyType enemyType = obj; double minSpawnChance = config.overrideSpawnChance@; FSharpFunc<SpawnableEnemyWithRarity, bool> @_instance; @_instance = isMaskedEnemy@75.@_instance; List<string> logs = new List<string>(); MonadFxStrictBuilder<FSharpResult<Unit, string>> val3 = builder@; MonadFxStrictBuilder<FSharpResult<Unit, string>> val4 = builder@; SelectableLevel[] levels = playerManager.levels; SelectableLevel[] array = levels; IDisposable enumerator = ((IEnumerable<SelectableLevel>)(SelectableLevel[])(&array)).GetEnumerator(); FSharpFunc<IDisposable, FSharpResult<Unit, string>> val5 = new modify natural spawns for masked enemies@77-1(builder@, enemyType, minSpawnChance, @_instance, logs); Using val6 = null; FSharpResult<Unit, string> val7 = default(FSharpResult<Unit, string>); IDisposable disposable = enumerator; FSharpFunc<IDisposable, FSharpResult<Unit, string>> val8 = val5; Default3 val9 = (Default3)(object)val6; FSharpResult<Unit, string> val10 = Operators.Using<IDisposable, FSharpResult<Unit, string>>(disposable, val8); StrictBuilder<FSharpResult<Unit, string>> val11 = (StrictBuilder<FSharpResult<Unit, string>>)(object)builder@; FSharpFunc<Unit, FSharpResult<Unit, string>> b = new modify natural spawns for masked enemies@92-10(builder@, logs); FSharpFunc<Unit, FSharpResult<Unit, string>> val12 = new modify natural spawns for masked enemies@77-12(b); Bind val13 = null; FSharpResult<Unit, string> val14 = default(FSharpResult<Unit, string>); return Bind.op_GreaterGreaterEquals<Unit, string, Unit>(val10, val12); } } [Serializable] internal sealed class modify natural spawns for masked enemies@55-13 : FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, FSharpFunc<Unit, FSharpResult<Unit, string>>> { internal static readonly modify natural spawns for masked enemies@55-13 @_instance = new modify natural spawns for masked enemies@55-13(); [CompilerGenerated] [DebuggerNonUserCode] internal modify natural spawns for masked enemies@55-13() { } public override FSharpFunc<Unit, FSharpResult<Unit, string>> Invoke(Tuple<Return, FSharpResult<Unit, string>> tupledArg) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) return Return.Return<Unit, string>(tupledArg.Item2, tupledArg.Item1); } } internal static void initPrefabs<A>(NetworkPrefab networkPrefab) where A : class, EnemyAI { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0016: Expected O, but got Unknown EnemyAI val = (EnemyAI)(object)networkPrefab.Prefab.GetComponent<A>(); if (val != null && 0 == 0) { FSharpFunc<Component, Unit> @_instance; @_instance = initPrefabs@22.@_instance; GameObject gameObject = ((Component)val).gameObject; FSharpFunc<Type, Component> func = new initPrefabs@22-1(gameObject); FSharpFunc<Type, Unit> val2 = new initPrefabs@22-2(@_instance, func); FSharpList<Type> val3 = FSharpList<Type>.Cons(typeof(Mirage.Unity.AudioStream.AudioStream), FSharpList<Type>.Cons(typeof(Mirage.Unity.MimicPlayer.MimicPlayer), FSharpList<Type>.Cons(typeof(Mirage.Unity.MimicVoice.MimicVoice), FSharpList<Type>.Empty))); Iterate val4 = null; Iterate.Iterate<Type>(val3, val2); } } internal static FSharpFunc<FSharpRef<FSharpOption<A>>, FSharpFunc<string, FSharpFunc<string, FSharpResult<A, string>>>> get<A>() { string className = "RegisterPrefab"; return (FSharpFunc<FSharpRef<FSharpOption<A>>, FSharpFunc<string, FSharpFunc<string, FSharpResult<A, string>>>>)(object)new get@28-3<A>(className); } } } namespace <StartupCode$Mirage>.$Mirage.Patch { internal static class RegisterPrefab { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] internal static int init@; static RegisterPrefab() { Mirage.Patch.RegisterPrefab.RegisterPrefab.Prefab = Mirage.Core.Field.field<MaskedPlayerEnemy>(); Mirage.Patch.RegisterPrefab.RegisterPrefab.init@30 = 1; if (Mirage.Patch.RegisterPrefab.RegisterPrefab.init@30 < 1) { IntrinsicFunctions.FailStaticInit(); } FSharpRef<FSharpOption<MaskedPlayerEnemy>> prefab = Mirage.Patch.RegisterPrefab.RegisterPrefab.Prefab; Mirage.Patch.RegisterPrefab.RegisterPrefab.getPrefab = FSharpFunc<FSharpRef<FSharpOption<MaskedPlayerEnemy>>, string>.InvokeFast<FSharpFunc<string, FSharpResult<MaskedPlayerEnemy, string>>>(Mirage.Patch.RegisterPrefab.get<MaskedPlayerEnemy>(), prefab, "Prefab"); Mirage.Patch.RegisterPrefab.RegisterPrefab.init@30 = 2; } } } namespace Mirage.Patch { [CompilationMapping(/*Could not decode attribute arguments.*/)] public static class RecordAudio { [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] public class RecordAudio : IVoiceActivationListener, IMicrophoneSubscriber { internal static FSharpRef<FSharpOption<AudioFileWriter>> Recording; internal static FSharpRef<FSharpOption<string>> RecordingName; internal static FSharpRef<FSharpOption<DissonanceComms>> Dissonance; internal static bool roundStarted; internal static bool voiceActivated; internal static int vadDisabledFrames; internal static int framesWritten; internal static int init@15; [HarmonyPostfix] [HarmonyPatch(typeof(DissonanceComms), "Start")] public static void store dissonance for later use(DissonanceComms __instance) { if (init@15 < 3) { IntrinsicFunctions.FailStaticInit(); } FSharpRef<FSharpOption<DissonanceComms>> dissonance = Dissonance; dissonance.Value = FSharpOption<DissonanceComms>.Some(__instance); RecordAudio recordAudio = new RecordAudio(); __instance.SubscribeToRecordedAudio((IMicrophoneSubscriber)(object)recordAudio); __instance.SubcribeToVoiceActivation((IVoiceActivationListener)(object)recordAudio); } [HarmonyPrefix] [HarmonyPatch(typeof(StartOfRound), "Awake")] public static void stop recording when a new round starts() { if (init@15 < 4) { IntrinsicFunctions.FailStaticInit(); } roundStarted = false; } [HarmonyPostfix] [HarmonyPatch(typeof(StartOfRound), "ResetPlayersLoadedValueClientRpc")] public static void deleting recordings if per-round is enabled() { if (init@15 < 4) { IntrinsicFunctions.FailStaticInit(); } roundStarted = true; if (Mirage.Core.Config.getConfig().deleteRecordingsPerRound@) { Mirage.Core.Audio.Recording.deleteRecordings(); } } virtual void IMicrophoneSubscriber.ReceiveMicrophoneData(ArraySegment<float> buffer, WaveFormat format) { MonadFxStrictBuilder<FSharpOption<Unit>> val = GenericBuilders.monad'<FSharpOption<Unit>>(); StrictBuilder<FSharpOption<Unit>> val2 = (StrictBuilder<FSharpOption<Unit>>)(object)val; StrictBuilder<FSharpOption<Unit>> val3 = (StrictBuilder<FSharpOption<Unit>>)(object)val; Builder<FSharpOption<Unit>> val4 = (Builder<FSharpOption<Unit>>)(object)val; if (init@15 < 3) { IntrinsicFunctions.FailStaticInit(); } FSharpOption<DissonanceComms> val5 = get<DissonanceComms>(Dissonance); Bind val6 = null; FSharpOption<Unit> val7 = null; FSharpOption<Unit> val8 = Bind.op_GreaterGreaterEquals<DissonanceComms, Unit>(val5, (FSharpFunc<DissonanceComms, FSharpOption<Unit>>)new Dissonance-Audio-Capture-IMicrophoneSubscriber-ReceiveMicrophoneData@56(format, buffer, val)); } virtual void IMicrophoneSubscriber.Reset() { if (init@15 < 6) { IntrinsicFunctions.FailStaticInit(); } vadDisabledFrames = 0; FSharpFunc<AudioFileWriter, Unit> @_instance; @_instance = Dissonance-Audio-Capture-IMicrophoneSubscriber-Reset@88.@_instance; if (init@15 < 1) { IntrinsicFunctions.FailStaticInit(); } FSharpOption<AudioFileWriter> value = Recording.Value; Iterate val = null; Iterate.Iterate<AudioFileWriter>(value, @_instance); if (init@15 < 1) { IntrinsicFunctions.FailStaticInit(); } Recording.Value = null; if (init@15 < 2) { IntrinsicFunctions.FailStaticInit(); } RecordingName.Value = null; } virtual void IVoiceActivationListener.VoiceActivationStart() { if (init@15 < 5) { IntrinsicFunctions.FailStaticInit(); } voiceActivated = true; } virtual void IVoiceActivationListener.VoiceActivationStop() { if (init@15 < 5) { IntrinsicFunctions.FailStaticInit(); } voiceActivated = false; } static RecordAudio() { <StartupCode$Mirage>.$Mirage.Patch.RecordAudio.init@ = 0; _ = <StartupCode$Mirage>.$Mirage.Patch.RecordAudio.init@; } } [Serializable] internal sealed class Dissonance-Audio-Capture-IMicrophoneSubscriber-ReceiveMicrophoneData@58-1 : FSharpFunc<Tuple<Return, FSharpOption<Unit>>, FSharpFunc<Unit, FSharpOption<Unit>>> { internal static readonly Dissonance-Audio-Capture-IMicrophoneSubscriber-ReceiveMicrophoneData@58-1 @_instance = new Dissonance-Audio-Capture-IMicrophoneSubscriber-ReceiveMicrophoneData@58-1(); [CompilerGenerated] [DebuggerNonUserCode] internal Dissonance-Audio-Capture-IMicrophoneSubscriber-ReceiveMicrophoneData@58-1() { } public override FSharpFunc<Unit, FSharpOption<Unit>> Invoke(Tuple<Return, FSharpOption<Unit>> tupledArg) { return Return.Return<Unit>(tupledArg.Item2, tupledArg.Item1); } } [Serializable] internal sealed class Dissonance-Audio-Capture-IMicrophoneSubscriber-ReceiveMicrophoneData@60-2 : FSharpFunc<Tuple<Return, FSharpOption<Unit>>, FSharpFunc<Unit, FSharpOption<Unit>>> { internal static readonly Dissonance-Audio-Capture-IMicrophoneSubscriber-ReceiveMicrophoneData@60-2 @_instance = new Dissonance-Audio-Capture-IMicrophoneSubscriber-ReceiveMicrophoneData@60-2(); [CompilerGenerated] [DebuggerNonUserCode] internal Dissonance-Audio-Capture-IMicrophoneSubscriber-ReceiveMicrophoneData@60-2() { } public override FSharpFunc<Unit, FSharpOption<Unit>> Invoke(Tuple<Return, FSharpOption<Unit>> tupledArg) { return Return.Return<Unit>(tupledArg.Item2, tupledArg.Item1); } } [Serializable] internal sealed class defaultRecording@64 : FSharpFunc<Unit, AudioFileWriter> { public WaveFormat format; [CompilerGenerated] [DebuggerNonUserCode] internal defaultRecording@64(WaveFormat format) { this.format = format; } public override AudioFileWriter Invoke(Unit unitVar0) { if (RecordAudio.init@15 < 7) { IntrinsicFunctions.FailStaticInit(); } RecordAudio.framesWritten = 0; Tuple<string, AudioFileWriter> tuple = Mirage.Core.Audio.Recording.createRecording(format); AudioFileWriter item = tuple.Item2; string item2 = tuple.Item1; if (RecordAudio.init@15 < 1) { IntrinsicFunctions.FailStaticInit(); } FSharpRef<FSharpOption<AudioFileWriter>> recording = RecordAudio.Recording; AudioFileWriter val = item; recording.Value = FSharpOption<AudioFileWriter>.Some(val); if (RecordAudio.init@15 < 2) { IntrinsicFunctions.FailStaticInit(); } FSharpRef<FSharpOption<string>> recordingName = RecordAudio.RecordingName; string text = item2; recordingName.Value = FSharpOption<string>.Some(text); return item; } } [Serializable] internal sealed class Dissonance-Audio-Capture-IMicrophoneSubscriber-ReceiveMicrophoneData@70-4 : FSharpFunc<Tuple<Return, FSharpOption<Unit>>, FSharpFunc<Unit, FSharpOption<Unit>>> { internal static readonly Dissonance-Audio-Capture-IMicrophoneSubscriber-ReceiveMicrophoneData@70-4 @_instance = new Dissonance-Audio-Capture-IMicrophoneSubscriber-ReceiveMicrophoneData@70-4(); [CompilerGenerated] [DebuggerNonUserCode] internal Dissonance-Audio-Capture-IMicrophoneSubscriber-ReceiveMicrophoneData@70-4() { } public override FSharpFunc<Unit, FSharpOption<Unit>> Invoke(Tuple<Return, FSharpOption<Unit>> tupledArg) { return Return.Return<Unit>(tupledArg.Item2, tupledArg.Item1); } } [Serializable] internal sealed class Dissonance-Audio-Capture-IMicrophoneSubscriber-ReceiveMicrophoneData@78-8 : FSharpFunc<Tuple<Return, FSharpOption<Unit>>, FSharpFunc<Unit, FSharpOption<Unit>>> { internal static readonly Dissonance-Audio-Capture-IMicrophoneSubscriber-ReceiveMicrophoneData@78-8 @_instance = new Dissonance-Audio-Capture-IMicrophoneSubscriber-ReceiveMicrophoneData@78-8(); [CompilerGenerated] [DebuggerNonUserCode] internal Dissonance-Audio-Capture-IMicrophoneSubscriber-ReceiveMicrophoneData@78-8() { } public override FSharpFunc<Unit, FSharpOption<Unit>> Invoke(Tuple<Return, FSharpOption<Unit>> tupledArg) { return Return.Return<Unit>(tupledArg.Item2, tupledArg.Item1); } } [Serializable] internal sealed class Dissonance-Audio-Capture-IMicrophoneSubscriber-ReceiveMicrophoneData@78-7 : FSharpFunc<Unit, FSharpOption<Unit>> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public MonadFxStrictBuilder<FSharpOption<Unit>> builder@; public string filePath; [CompilerGenerated] [DebuggerNonUserCode] internal Dissonance-Audio-Capture-IMicrophoneSubscriber-ReceiveMicrophoneData@78-7(MonadFxStrictBuilder<FSharpOption<Unit>> builder@, string filePath) { this.builder@ = builder@; this.filePath = filePath; } public override FSharpOption<Unit> Invoke(Unit unitVar) { File.Delete(filePath); MonadFxStrictBuilder<FSharpOption<Unit>> val = builder@; return FSharpFunc<Tuple<Return, FSharpOption<Unit>>, Unit>.InvokeFast<FSharpOption<Unit>>((FSharpFunc<Tuple<Return, FSharpOption<Unit>>, FSharpFunc<Unit, FSharpOption<Unit>>>)Dissonance-Audio-Capture-IMicrophoneSubscriber-ReceiveMicrophoneData@78-8.@_instance, new Tuple<Return, FSharpOption<Unit>>(null, null), (Unit)null); } } [Serializable] internal sealed class Dissonance-Audio-Capture-IMicrophoneSubscriber-ReceiveMicrophoneData@79-10 : FSharpFunc<Tuple<Return, FSharpOption<Unit>>, FSharpFunc<Unit, FSharpOption<Unit>>> { internal static readonly Dissonance-Audio-Capture-IMicrophoneSubscriber-ReceiveMicrophoneData@79-10 @_instance = new Dissonance-Audio-Capture-IMicrophoneSubscriber-ReceiveMicrophoneData@79-10(); [CompilerGenerated] [DebuggerNonUserCode] internal Dissonance-Audio-Capture-IMicrophoneSubscriber-ReceiveMicrophoneData@79-10() { } public override FSharpFunc<Unit, FSharpOption<Unit>> Invoke(Tuple<Return, FSharpOption<Unit>> tupledArg) { return Return.Return<Unit>(tupledArg.Item2, tupledArg.Item1); } } [Serializable] internal sealed class Dissonance-Audio-Capture-IMicrophoneSubscriber-ReceiveMicrophoneData@77-9 : FSharpFunc<Exception, FSharpOption<Unit>> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public MonadFxStrictBuilder<FSharpOption<Unit>> builder@; [CompilerGenerated] [DebuggerNonUserCode] internal Dissonance-Audio-Capture-IMicrophoneSubscriber-ReceiveMicrophoneData@77-9(MonadFxStrictBuilder<FSharpOption<Unit>> builder@) { this.builder@ = builder@; } public override FSharpOption<Unit> Invoke(Exception _arg4) { MonadFxStrictBuilder<FSharpOption<Unit>> val = builder@; return FSharpFunc<Tuple<Return, FSharpOption<Unit>>, Unit>.InvokeFast<FSharpOption<Unit>>((FSharpFunc<Tuple<Return, FSharpOption<Unit>>, FSharpFunc<Unit, FSharpOption<Unit>>>)Dissonance-Audio-Capture-IMicrophoneSubscriber-ReceiveMicrophoneData@79-10.@_instance, new Tuple<Return, FSharpOption<Unit>>(null, null), (Unit)null); } } [Serializable] internal sealed class Dissonance-Audio-Capture-IMicrophoneSubscriber-ReceiveMicrophoneData@76-11 : FSharpFunc<Tuple<Return, FSharpOption<Unit>>, FSharpFunc<Unit, FSharpOption<Unit>>> { internal static readonly Dissonance-Audio-Capture-IMicrophoneSubscriber-ReceiveMicrophoneData@76-11 @_instance = new Dissonance-Audio-Capture-IMicrophoneSubscriber-ReceiveMicrophoneData@76-11(); [CompilerGenerated] [DebuggerNonUserCode] internal Dissonance-Audio-Capture-IMicrophoneSubscriber-ReceiveMicrophoneData@76-11() { } public override FSharpFunc<Unit, FSharpOption<Unit>> Invoke(Tuple<Return, FSharpOption<Unit>> tupledArg) { return Return.Return<Unit>(tupledArg.Item2, tupledArg.Item1); } } [Serializable] internal sealed class Dissonance-Audio-Capture-IMicrophoneSubscriber-ReceiveMicrophoneData@83-13 : FSharpFunc<Tuple<Return, FSharpOption<Unit>>, FSharpFunc<Unit, FSharpOption<Unit>>> { internal static readonly Dissonance-Audio-Capture-IMicrophoneSubscriber-ReceiveMicrophoneData@83-13 @_instance = new Dissonance-Audio-Capture-IMicrophoneSubscriber-ReceiveMicrophoneData@83-13(); [CompilerGenerated] [DebuggerNonUserCode] internal Dissonance-Audio-Capture-IMicrophoneSubscriber-ReceiveMicrophoneData@83-13() { } public override FSharpFunc<Unit, FSharpOption<Unit>> Invoke(Tuple<Return, FSharpOption<Unit>> tupledArg) { return Return.Return<Unit>(tupledArg.Item2, tupledArg.Item1); } } [Serializable] internal sealed class Dissonance-Audio-Capture-IMicrophoneSubscriber-ReceiveMicrophoneData@80-12 : FSharpFunc<Unit, FSharpOption<Unit>> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public MonadFxStrictBuilder<FSharpOption<Unit>> builder@; [CompilerGenerated] [DebuggerNonUserCode] internal Dissonance-Audio-Capture-IMicrophoneSubscriber-ReceiveMicrophoneData@80-12(MonadFxStrictBuilder<FSharpOption<Unit>> builder@) { this.builder@ = builder@; } public override FSharpOption<Unit> Invoke(Unit unitVar) { if (RecordAudio.init@15 < 6) { IntrinsicFunctions.FailStaticInit(); } RecordAudio.vadDisabledFrames = 0; if (RecordAudio.init@15 < 7) { IntrinsicFunctions.FailStaticInit(); } RecordAudio.framesWritten = 0; if (RecordAudio.init@15 < 1) { IntrinsicFunctions.FailStaticInit(); } RecordAudio.Recording.Value = null; if (RecordAudio.init@15 < 2) { IntrinsicFunctions.FailStaticInit(); } RecordAudio.RecordingName.Value = null; MonadFxStrictBuilder<FSharpOption<Unit>> val = builder@; return FSharpFunc<Tuple<Return, FSharpOption<Unit>>, Unit>.InvokeFast<FSharpOption<Unit>>((FSharpFunc<Tuple<Return, FSharpOption<Unit>>, FSharpFunc<Unit, FSharpOption<Unit>>>)Dissonance-Audio-Capture-IMicrophoneSubscriber-ReceiveMicrophoneData@83-13.@_instance, new Tuple<Return, FSharpOption<Unit>>(null, null), (Unit)null); } } [Serializable] internal sealed class Dissonance-Audio-Capture-IMicrophoneSubscriber-ReceiveMicrophoneData@76-14 : FSharpFunc<Unit, FSharpOption<Unit>> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public FSharpFunc<Unit, FSharpOption<Unit>> b; [CompilerGenerated] [DebuggerNonUserCode] internal Dissonance-Audio-Capture-IMicrophoneSubscriber-ReceiveMicrophoneData@7