Decompiled source of Mirage v1.5.0
BepInEx\plugins\Mirage.dll
Decompiled 6 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.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.Configuration; using BepInEx.Logging; using Cysharp.Threading.Tasks; using FSharpPlus; using FSharpPlus.Control; using FSharpPlus.Data; using FSharpPlus.Internals; using FSharpx.Control; using HarmonyLib; 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 MyceliumNetworking; using NAudio.Dsp; using NAudio.Lame; using NAudio.Wave; using Photon.Pun; using Photon.Voice.PUN; using Photon.Voice.Unity; using UnityEngine; using WebRtcVadSharp; using Zorro.Recorder; [assembly: FSharpInterfaceDataVersion(2, 0, 0)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: IgnoresAccessChecksTo("NAudio.Core")] [assembly: AssemblyCompany("Mirage")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0+ba7d495a6a74eb6a80f4f229f314fbc892ad5cb8")] [assembly: AssemblyProduct("Mirage")] [assembly: AssemblyTitle("Mirage")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default)] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: NetcodePatchedAssembly] namespace Mirage { [Serializable] [BepInPlugin("qwbarch.Mirage", "Mirage", "1.5.0")] [CompilationMapping(/*Could not decode attribute arguments.*/)] public class Plugin : BaseUnityPlugin { public void Awake() { //IL_0017: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0021: 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) //IL_003d: 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) FSharpFunc<FSharpResult<Unit, string>, Unit> handleResult = Mirage.Core.Logger.handleResult; MonadFxStrictBuilder<FSharpResult<Unit, string>> val = new MonadFxStrictBuilder<FSharpResult<Unit, string>>(); Mirage.Core.Logger.initAsyncLogger(); FSharpResult<Unit, string> val2 = Mirage.Core.Config.initConfig(((BaseUnityPlugin)this).Config); Bind val3 = null; FSharpResult<Unit, string> val4 = default(FSharpResult<Unit, string>); handleResult.Invoke((val2.Tag == 0) ? $Plugin.f@1-51(this, val2.ResultValue) : FSharpResult<Unit, string>.NewError(val2.ErrorValue)); } } } [CompilationMapping(/*Could not decode attribute arguments.*/)] public static class AssemblyInfo { } namespace <StartupCode$Mirage> { internal static class $AssemblyInfo { } internal static class $Plugin { [Serializable] [SpecialName] [StructLayout(LayoutKind.Auto, CharSet = CharSet.Auto)] [CompilationMapping(/*Could not decode attribute arguments.*/)] internal static class Awake@28 { internal static void Invoke() { Mirage.Core.Audio.Recording.deleteRecordings(); } } [Serializable] internal sealed class Awake@30-1 : FSharpFunc<Type, Unit> { public Harmony harmony; [CompilerGenerated] [DebuggerNonUserCode] internal Awake@30-1(Harmony harmony) { this.harmony = harmony; } public override Unit Invoke(Type x) { harmony.PatchAll((Type)(object)x); return null; } } [Serializable] internal sealed class Awake@30-2 : FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, FSharpFunc<Unit, FSharpResult<Unit, string>>> { internal static readonly Awake@30-2 @_instance = new Awake@30-2(); [CompilerGenerated] [DebuggerNonUserCode] internal Awake@30-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); } } [CompilerGenerated] internal static FSharpResult<Unit, string> f@1-51(Plugin @this, Unit unitVar0) { //IL_003f: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Expected O, but got Unknown //IL_0092: Unknown result type (might be due to invalid IL or missing references) //IL_0098: Unknown result type (might be due to invalid IL or missing references) //IL_00a0: Unknown result type (might be due to invalid IL or missing references) bool flag = LameDLL.LoadNativeDLL(new string[1] { Path.GetDirectoryName(((BaseUnityPlugin)@this).Info.Location) }); Mirage.Core.Audio.Recording.deleteRecordings(); Application.quitting += Awake@28.Invoke; Harmony harmony = new Harmony("qwbarch.Mirage"); FSharpFunc<Type, Unit> val = new Awake@30-1(harmony); FSharpList<Type> val2 = FSharpList<Type>.Cons(typeof(Mirage.Patch.RegisterPrefab.RegisterPrefab), FSharpList<Type>.Cons(typeof(Mirage.Patch.RecordAudio.RecordAudio), FSharpList<Type>.Cons(typeof(Mirage.Patch.SyncConfig.SyncConfig), FSharpList<Type>.Empty))); Iterate val3 = null; Iterate.Iterate<Type>(val2, val); return FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, Unit>.InvokeFast<FSharpResult<Unit, string>>((FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, FSharpFunc<Unit, FSharpResult<Unit, string>>>)Awake@30-2.@_instance, new Tuple<Return, FSharpResult<Unit, string>>(null, default(FSharpResult<Unit, string>)), (Unit)null); } } } 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(SurfaceNetworkHandler), "Awake")] public static void create config handler if not initialized(MainMenuHandler __instance) { Mirage.Unity.ConfigHandler.ConfigHandler configHandler = ((Component)__instance).gameObject.AddComponent<Mirage.Unity.ConfigHandler.ConfigHandler>(); } [HarmonyPostfix] [HarmonyPatch(typeof(MainMenuHandler), "Start")] public static void revert synced config for all clients on game finish(MainMenuHandler __instance) { Mirage.Core.Config.SyncedConfig.contents = null; } [HarmonyPostfix] [HarmonyPatch(typeof(SurfaceNetworkHandler), "RPCM_StartGame")] public static void sync config to clients on game start(SurfaceNetworkHandler __instance) { Mirage.Unity.ConfigHandler.ConfigHandler.Instance.SyncToAllClients(); } } } } namespace <StartupCode$Mirage>.$Mirage.Patch { internal static class SyncConfig { } } namespace Mirage.Patch { [CompilationMapping(/*Could not decode attribute arguments.*/)] public static class RecordAudio { [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] public sealed class MicrophoneAudio : IEquatable<MicrophoneAudio>, IStructuralEquatable, IComparable<MicrophoneAudio>, IComparable, IStructuralComparable { [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal float[] samples@; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal int sampleRate@; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal int channels@; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal bool isRecording@; [CompilationMapping(/*Could not decode attribute arguments.*/)] internal float[] samples { [CompilerGenerated] [DebuggerNonUserCode] get { return samples@; } } [CompilationMapping(/*Could not decode attribute arguments.*/)] internal int sampleRate { [CompilerGenerated] [DebuggerNonUserCode] get { return sampleRate@; } } [CompilationMapping(/*Could not decode attribute arguments.*/)] internal int channels { [CompilerGenerated] [DebuggerNonUserCode] get { return channels@; } } [CompilationMapping(/*Could not decode attribute arguments.*/)] internal bool isRecording { [CompilerGenerated] [DebuggerNonUserCode] get { return isRecording@; } } [DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(MicrophoneAudio))] internal MicrophoneAudio(float[] samples, int sampleRate, int channels, bool isRecording) { samples@ = samples; sampleRate@ = sampleRate; channels@ = channels; isRecording@ = isRecording; } [CompilerGenerated] public override string ToString() { return ExtraTopLevelOperators.PrintFormatToString<FSharpFunc<MicrophoneAudio, string>>((PrintfFormat<FSharpFunc<MicrophoneAudio, string>, Unit, string, string>)(object)new PrintfFormat<FSharpFunc<MicrophoneAudio, string>, Unit, string, string, MicrophoneAudio>("%+A")).Invoke(this); } [CompilerGenerated] public sealed int CompareTo(MicrophoneAudio obj) { if (this != null) { if (obj != null) { int num = HashCompare.GenericComparisonWithComparerIntrinsic<float[]>(LanguagePrimitives.GenericComparer, samples@, obj.samples@); if (num < 0) { return num; } if (num > 0) { return num; } IComparer genericComparer = LanguagePrimitives.GenericComparer; int num2 = sampleRate@; int num3 = obj.sampleRate@; int num4 = ((num2 > num3) ? 1 : 0) - ((num2 < num3) ? 1 : 0); if (num4 < 0) { return num4; } if (num4 > 0) { return num4; } genericComparer = LanguagePrimitives.GenericComparer; num3 = channels@; int num5 = obj.channels@; num2 = ((num3 > num5) ? 1 : 0) - ((num3 < num5) ? 1 : 0); if (num2 < 0) { return num2; } if (num2 > 0) { return num2; } genericComparer = LanguagePrimitives.GenericComparer; bool flag = isRecording@; bool flag2 = obj.isRecording@; return (flag ? 1 : 0) - (flag2 ? 1 : 0); } return 1; } if (obj != null) { return -1; } return 0; } [CompilerGenerated] public sealed int CompareTo(object obj) { return CompareTo((MicrophoneAudio)obj); } [CompilerGenerated] public sealed int CompareTo(object obj, IComparer comp) { MicrophoneAudio microphoneAudio = (MicrophoneAudio)obj; if (this != null) { if ((MicrophoneAudio)obj != null) { int num = HashCompare.GenericComparisonWithComparerIntrinsic<float[]>(comp, samples@, microphoneAudio.samples@); if (num < 0) { return num; } if (num > 0) { return num; } int num2 = sampleRate@; int num3 = microphoneAudio.sampleRate@; int num4 = ((num2 > num3) ? 1 : 0) - ((num2 < num3) ? 1 : 0); if (num4 < 0) { return num4; } if (num4 > 0) { return num4; } num3 = channels@; int num5 = microphoneAudio.channels@; num2 = ((num3 > num5) ? 1 : 0) - ((num3 < num5) ? 1 : 0); if (num2 < 0) { return num2; } if (num2 > 0) { return num2; } bool flag = isRecording@; bool flag2 = microphoneAudio.isRecording@; return (flag ? 1 : 0) - (flag2 ? 1 : 0); } return 1; } if ((MicrophoneAudio)obj != null) { return -1; } return 0; } [CompilerGenerated] public sealed int GetHashCode(IEqualityComparer comp) { if (this != null) { int num = 0; num = -1640531527 + ((isRecording@ ? 1 : 0) + ((num << 6) + (num >> 2))); num = -1640531527 + (channels@ + ((num << 6) + (num >> 2))); num = -1640531527 + (sampleRate@ + ((num << 6) + (num >> 2))); return -1640531527 + (HashCompare.GenericHashWithComparerIntrinsic<float[]>(comp, samples@) + ((num << 6) + (num >> 2))); } return 0; } [CompilerGenerated] public sealed override int GetHashCode() { return GetHashCode(LanguagePrimitives.GenericEqualityComparer); } [CompilerGenerated] public sealed bool Equals(object obj, IEqualityComparer comp) { if (this != null) { if (obj is MicrophoneAudio microphoneAudio) { if (HashCompare.GenericEqualityWithComparerIntrinsic<float[]>(comp, samples@, microphoneAudio.samples@)) { if (sampleRate@ == microphoneAudio.sampleRate@) { if (channels@ == microphoneAudio.channels@) { return isRecording@ == microphoneAudio.isRecording@; } return false; } return false; } return false; } return false; } return obj == null; } [CompilerGenerated] public sealed bool Equals(MicrophoneAudio obj) { if (this != null) { if (obj != null) { if (HashCompare.GenericEqualityERIntrinsic<float[]>(samples@, obj.samples@)) { if (sampleRate@ == obj.sampleRate@) { if (channels@ == obj.channels@) { return isRecording@ == obj.isRecording@; } return false; } return false; } return false; } return false; } return obj == null; } [CompilerGenerated] public sealed override bool Equals(object obj) { if (obj is MicrophoneAudio obj2) { return Equals(obj2); } return false; } } [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] public class RecordAudio { internal static PhotonVoiceView VoiceView; internal static BlockingQueueAgent<MicrophoneAudio> audioChannel; internal static int init@32; [HarmonyPostfix] [HarmonyPatch(typeof(PhotonVoiceView), "Start")] public static void save photon voice view for later use(PhotonVoiceView __instance) { if (__instance.RecorderInUse != null) { if (init@32 < 2) { IntrinsicFunctions.FailStaticInit(); } VoiceView = __instance; } } [HarmonyPostfix] [HarmonyPatch(typeof(RecorderAudioListener), "SendMic")] public static void record audio to disk(float[] buffer, int sampleRate, int channels) { if (init@32 < 3) { IntrinsicFunctions.FailStaticInit(); } BlockingQueueAgent<MicrophoneAudio> obj = audioChannel; if (init@32 < 2) { IntrinsicFunctions.FailStaticInit(); } obj.Add(new MicrophoneAudio(buffer, sampleRate, channels, VoiceView.RecorderInUse.IsCurrentlyTransmitting && Player.localPlayer != null && !Player.localPlayer.data.dead)); } static RecordAudio() { <StartupCode$Mirage>.$Mirage.Patch.RecordAudio.init@ = 0; _ = <StartupCode$Mirage>.$Mirage.Patch.RecordAudio.init@; } } [Serializable] internal sealed class -cctor@77-6 : FSharpFunc<Tuple<Return, FSharpOption<Unit>>, FSharpFunc<Unit, FSharpOption<Unit>>> { internal static readonly -cctor@77-6 @_instance = new -cctor@77-6(); [CompilerGenerated] [DebuggerNonUserCode] internal -cctor@77-6() { } public override FSharpFunc<Unit, FSharpOption<Unit>> Invoke(Tuple<Return, FSharpOption<Unit>> tupledArg) { return Return.Return<Unit>(tupledArg.Item2, tupledArg.Item1); } } [Serializable] internal sealed class -cctor@77-5 : FSharpFunc<Unit, FSharpOption<Unit>> { public string filePath; [CompilerGenerated] [DebuggerNonUserCode] internal -cctor@77-5(string filePath) { this.filePath = filePath; } public override FSharpOption<Unit> Invoke(Unit unitVar) { File.Delete(filePath); return FSharpFunc<Tuple<Return, FSharpOption<Unit>>, Unit>.InvokeFast<FSharpOption<Unit>>((FSharpFunc<Tuple<Return, FSharpOption<Unit>>, FSharpFunc<Unit, FSharpOption<Unit>>>)-cctor@77-6.@_instance, new Tuple<Return, FSharpOption<Unit>>(null, null), (Unit)null); } } [Serializable] internal sealed class -cctor@78-8 : FSharpFunc<Tuple<Return, FSharpOption<Unit>>, FSharpFunc<Unit, FSharpOption<Unit>>> { internal static readonly -cctor@78-8 @_instance = new -cctor@78-8(); [CompilerGenerated] [DebuggerNonUserCode] internal -cctor@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 -cctor@77-7 : FSharpFunc<Exception, FSharpOption<Unit>> { internal static readonly -cctor@77-7 @_instance = new -cctor@77-7(); [CompilerGenerated] [DebuggerNonUserCode] internal -cctor@77-7() { } public override FSharpOption<Unit> Invoke(Exception _arg5) { return FSharpFunc<Tuple<Return, FSharpOption<Unit>>, Unit>.InvokeFast<FSharpOption<Unit>>((FSharpFunc<Tuple<Return, FSharpOption<Unit>>, FSharpFunc<Unit, FSharpOption<Unit>>>)-cctor@78-8.@_instance, new Tuple<Return, FSharpOption<Unit>>(null, null), (Unit)null); } } [Serializable] internal sealed class -cctor@76-9 : FSharpFunc<Tuple<Return, FSharpOption<Unit>>, FSharpFunc<Unit, FSharpOption<Unit>>> { internal static readonly -cctor@76-9 @_instance = new -cctor@76-9(); [CompilerGenerated] [DebuggerNonUserCode] internal -cctor@76-9() { } public override FSharpFunc<Unit, FSharpOption<Unit>> Invoke(Tuple<Return, FSharpOption<Unit>> tupledArg) { return Return.Return<Unit>(tupledArg.Item2, tupledArg.Item1); } } [Serializable] internal sealed class -cctor@80-10 : FSharpFunc<Tuple<Return, FSharpOption<Unit>>, FSharpFunc<Unit, FSharpOption<Unit>>> { internal static readonly -cctor@80-10 @_instance = new -cctor@80-10(); [CompilerGenerated] [DebuggerNonUserCode] internal -cctor@80-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 -cctor@82-11 : FSharpFunc<Unit, FSharpAsync<Unit>> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public Lazy<FSharpAsync<Unit>> consumer; [CompilerGenerated] [DebuggerNonUserCode] internal -cctor@82-11(Lazy<FSharpAsync<Unit>> consumer) { this.consumer = consumer; } public override FSharpAsync<Unit> Invoke(Unit unitVar) { return consumer.Value; } } [Serializable] internal sealed class -cctor@55-12 : FSharpFunc<Unit, FSharpAsync<Unit>> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public FSharpAsync<Unit> computation2; [CompilerGenerated] [DebuggerNonUserCode] internal -cctor@55-12(FSharpAsync<Unit> computation2) { this.computation2 = computation2; } public override FSharpAsync<Unit> Invoke(Unit unitVar0) { return computation2; } } [Serializable] internal sealed class -cctor@55-13 : FSharpFunc<AsyncActivation<Unit>, AsyncReturn> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public FSharpAsync<Unit> computation1; [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public FSharpFunc<Unit, FSharpAsync<Unit>> part2; [CompilerGenerated] [DebuggerNonUserCode] internal -cctor@55-13(FSharpAsync<Unit> computation1, FSharpFunc<Unit, FSharpAsync<Unit>> part2) { this.computation1 = computation1; this.part2 = part2; } public override AsyncReturn Invoke(AsyncActivation<Unit> ctxt) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) return AsyncPrimitives.Bind<Unit, Unit>(ctxt, computation1, part2); } } [Serializable] internal sealed class -cctor@55-4 : FSharpFunc<Unit, FSharpAsync<Unit>> { public FSharpRef<int> vadDisabledFrames; public FSharpRef<int> framesWritten; public FSharpRef<FSharpOption<WaveFileWriter>> Recording; public FSharpRef<FSharpOption<string>> FilePath; [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public Lazy<FSharpAsync<Unit>> consumer; public MicrophoneAudio audio; [CompilerGenerated] [DebuggerNonUserCode] internal -cctor@55-4(FSharpRef<int> vadDisabledFrames, FSharpRef<int> framesWritten, FSharpRef<FSharpOption<WaveFileWriter>> Recording, FSharpRef<FSharpOption<string>> FilePath, Lazy<FSharpAsync<Unit>> consumer, MicrophoneAudio audio) { this.vadDisabledFrames = vadDisabledFrames; this.framesWritten = framesWritten; this.Recording = Recording; this.FilePath = FilePath; this.consumer = consumer; this.audio = audio; } public override FSharpAsync<Unit> Invoke(Unit unitVar) { FSharpAsync<Unit> obj; if (audio.isRecording@ && vadDisabledFrames.contents <= 8) { FSharpOption<WaveFileWriter> contents = Recording.contents; WaveFileWriter val = ((contents != null) ? contents.Value : defaultRecording@56(Recording, FilePath, audio, framesWritten, null)); obj = FSharpAsync.AwaitTask(((System.IO.Stream)(object)val).WriteAsync((ReadOnlyMemory<byte>)Mirage.Core.Audio.Format.toPCMBytes(audio.samples@), default(CancellationToken)).AsTask()); } else { MonadFxStrictBuilder<FSharpOption<Unit>> val2 = new MonadFxStrictBuilder<FSharpOption<Unit>>(); FSharpOption<WaveFileWriter> contents = Recording.contents; Bind val3 = null; FSharpOption<Unit> val4 = null; object obj2; if (contents == null) { obj2 = null; } else { FSharpOption<WaveFileWriter> val5 = contents; obj2 = f@1-48(Recording, FilePath, vadDisabledFrames, framesWritten, val5.Value); } FSharpOption<Unit> val6 = (FSharpOption<Unit>)obj2; obj = ExtraTopLevelOperators.DefaultAsyncBuilder.Zero(); } FSharpAsync<Unit> computation = obj; FSharpAsync<Unit> computation2 = ExtraTopLevelOperators.DefaultAsyncBuilder.Delay<Unit>((FSharpFunc<Unit, FSharpAsync<Unit>>)new -cctor@82-11(consumer)); FSharpFunc<Unit, FSharpAsync<Unit>> part = new -cctor@55-12(computation2); return AsyncPrimitives.MakeAsync<Unit>((FSharpFunc<AsyncActivation<Unit>, AsyncReturn>)new -cctor@55-13(computation, part)); } } [Serializable] internal sealed class -cctor@49-14 : FSharpFunc<Unit, FSharpAsync<Unit>> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public FSharpAsync<Unit> computation2; [CompilerGenerated] [DebuggerNonUserCode] internal -cctor@49-14(FSharpAsync<Unit> computation2) { this.computation2 = computation2; } public override FSharpAsync<Unit> Invoke(Unit unitVar0) { return computation2; } } [Serializable] internal sealed class -cctor@49-15 : FSharpFunc<AsyncActivation<Unit>, AsyncReturn> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public FSharpAsync<Unit> computation1; [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public FSharpFunc<Unit, FSharpAsync<Unit>> part2; [CompilerGenerated] [DebuggerNonUserCode] internal -cctor@49-15(FSharpAsync<Unit> computation1, FSharpFunc<Unit, FSharpAsync<Unit>> part2) { this.computation1 = computation1; this.part2 = part2; } public override AsyncReturn Invoke(AsyncActivation<Unit> ctxt) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) return AsyncPrimitives.Bind<Unit, Unit>(ctxt, computation1, part2); } } [Serializable] internal sealed class -cctor@48-3 : FSharpFunc<Unit, FSharpAsync<Unit>> { public WebRtcVad vad; public FSharpRef<int> vadDisabledFrames; public FSharpRef<int> framesWritten; public FSharpRef<FSharpOption<WaveFileWriter>> Recording; public FSharpRef<FSharpOption<string>> FilePath; public FSharpRef<FSharpOption<Mirage.Core.Audio.Resampler.Resampler>> resampler; [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public Lazy<FSharpAsync<Unit>> consumer; public MicrophoneAudio audio; [CompilerGenerated] [DebuggerNonUserCode] internal -cctor@48-3(WebRtcVad vad, FSharpRef<int> vadDisabledFrames, FSharpRef<int> framesWritten, FSharpRef<FSharpOption<WaveFileWriter>> Recording, FSharpRef<FSharpOption<string>> FilePath, FSharpRef<FSharpOption<Mirage.Core.Audio.Resampler.Resampler>> resampler, Lazy<FSharpAsync<Unit>> consumer, MicrophoneAudio audio) { this.vad = vad; this.vadDisabledFrames = vadDisabledFrames; this.framesWritten = framesWritten; this.Recording = Recording; this.FilePath = FilePath; this.resampler = resampler; this.consumer = consumer; this.audio = audio; } public override FSharpAsync<Unit> Invoke(Unit unitVar) { byte[] array = Mirage.Core.Audio.Format.toPCMBytes(Mirage.Core.Audio.Resampler.resample(resampler.contents.Value, audio.samples@)); FSharpAsync<Unit> obj; if (vad.HasSpeech(array, (SampleRate)16000, (FrameLength)20)) { vadDisabledFrames.contents = 0; framesWritten.contents += 1; obj = ExtraTopLevelOperators.DefaultAsyncBuilder.Zero(); } else { vadDisabledFrames.contents += 1; obj = ExtraTopLevelOperators.DefaultAsyncBuilder.Zero(); } FSharpAsync<Unit> computation = obj; FSharpAsync<Unit> computation2 = ExtraTopLevelOperators.DefaultAsyncBuilder.Delay<Unit>((FSharpFunc<Unit, FSharpAsync<Unit>>)new -cctor@55-4(vadDisabledFrames, framesWritten, Recording, FilePath, consumer, audio)); FSharpFunc<Unit, FSharpAsync<Unit>> part = new -cctor@49-14(computation2); return AsyncPrimitives.MakeAsync<Unit>((FSharpFunc<AsyncActivation<Unit>, AsyncReturn>)new -cctor@49-15(computation, part)); } } [Serializable] internal sealed class -cctor@46-16 : FSharpFunc<Unit, FSharpAsync<Unit>> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public FSharpAsync<Unit> computation2; [CompilerGenerated] [DebuggerNonUserCode] internal -cctor@46-16(FSharpAsync<Unit> computation2) { this.computation2 = computation2; } public override FSharpAsync<Unit> Invoke(Unit unitVar0) { return computation2; } } [Serializable] internal sealed class -cctor@46-17 : FSharpFunc<AsyncActivation<Unit>, AsyncReturn> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public FSharpAsync<Unit> computation1; [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public FSharpFunc<Unit, FSharpAsync<Unit>> part2; [CompilerGenerated] [DebuggerNonUserCode] internal -cctor@46-17(FSharpAsync<Unit> computation1, FSharpFunc<Unit, FSharpAsync<Unit>> part2) { this.computation1 = computation1; this.part2 = part2; } public override AsyncReturn Invoke(AsyncActivation<Unit> ctxt) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) return AsyncPrimitives.Bind<Unit, Unit>(ctxt, computation1, part2); } } [Serializable] internal sealed class -cctor@46-2 : FSharpFunc<MicrophoneAudio, FSharpAsync<Unit>> { public WebRtcVad vad; public FSharpRef<int> vadDisabledFrames; public FSharpRef<int> framesWritten; public FSharpRef<FSharpOption<WaveFileWriter>> Recording; public FSharpRef<FSharpOption<string>> FilePath; public FSharpRef<FSharpOption<Mirage.Core.Audio.Resampler.Resampler>> resampler; [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public Lazy<FSharpAsync<Unit>> consumer; [CompilerGenerated] [DebuggerNonUserCode] internal -cctor@46-2(WebRtcVad vad, FSharpRef<int> vadDisabledFrames, FSharpRef<int> framesWritten, FSharpRef<FSharpOption<WaveFileWriter>> Recording, FSharpRef<FSharpOption<string>> FilePath, FSharpRef<FSharpOption<Mirage.Core.Audio.Resampler.Resampler>> resampler, Lazy<FSharpAsync<Unit>> consumer) { this.vad = vad; this.vadDisabledFrames = vadDisabledFrames; this.framesWritten = framesWritten; this.Recording = Recording; this.FilePath = FilePath; this.resampler = resampler; this.consumer = consumer; } public override FSharpAsync<Unit> Invoke(MicrophoneAudio audio) { FSharpAsync<Unit> obj; if (resampler.contents == null) { resampler.contents = FSharpOption<Mirage.Core.Audio.Resampler.Resampler>.Some(Mirage.Core.Audio.Resampler.defaultResampler(audio.sampleRate@, 16000)); obj = ExtraTopLevelOperators.DefaultAsyncBuilder.Zero(); } else { obj = ExtraTopLevelOperators.DefaultAsyncBuilder.Zero(); } FSharpAsync<Unit> computation = obj; FSharpAsync<Unit> computation2 = ExtraTopLevelOperators.DefaultAsyncBuilder.Delay<Unit>((FSharpFunc<Unit, FSharpAsync<Unit>>)new -cctor@48-3(vad, vadDisabledFrames, framesWritten, Recording, FilePath, resampler, consumer, audio)); FSharpFunc<Unit, FSharpAsync<Unit>> part = new -cctor@46-16(computation2); return AsyncPrimitives.MakeAsync<Unit>((FSharpFunc<AsyncActivation<Unit>, AsyncReturn>)new -cctor@46-17(computation, part)); } } [Serializable] internal sealed class -cctor@45-18 : FSharpFunc<AsyncActivation<Unit>, AsyncReturn> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public FSharpAsync<MicrophoneAudio> computation; [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public FSharpFunc<MicrophoneAudio, FSharpAsync<Unit>> binder; [CompilerGenerated] [DebuggerNonUserCode] internal -cctor@45-18(FSharpAsync<MicrophoneAudio> computation, FSharpFunc<MicrophoneAudio, FSharpAsync<Unit>> binder) { this.computation = computation; this.binder = binder; } public override AsyncReturn Invoke(AsyncActivation<Unit> ctxt) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) return AsyncPrimitives.Bind<Unit, MicrophoneAudio>(ctxt, computation, binder); } } [Serializable] internal sealed class -cctor@45-1 : FSharpFunc<Unit, FSharpAsync<Unit>> { public WebRtcVad vad; public FSharpRef<int> vadDisabledFrames; public FSharpRef<int> framesWritten; public FSharpRef<FSharpOption<WaveFileWriter>> Recording; public FSharpRef<FSharpOption<string>> FilePath; public BlockingQueueAgent<MicrophoneAudio> channel; public FSharpRef<FSharpOption<Mirage.Core.Audio.Resampler.Resampler>> resampler; [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public Lazy<FSharpAsync<Unit>> consumer; [CompilerGenerated] [DebuggerNonUserCode] internal -cctor@45-1(WebRtcVad vad, FSharpRef<int> vadDisabledFrames, FSharpRef<int> framesWritten, FSharpRef<FSharpOption<WaveFileWriter>> Recording, FSharpRef<FSharpOption<string>> FilePath, BlockingQueueAgent<MicrophoneAudio> channel, FSharpRef<FSharpOption<Mirage.Core.Audio.Resampler.Resampler>> resampler, Lazy<FSharpAsync<Unit>> consumer) { this.vad = vad; this.vadDisabledFrames = vadDisabledFrames; this.framesWritten = framesWritten; this.Recording = Recording; this.FilePath = FilePath; this.channel = channel; this.resampler = resampler; this.consumer = consumer; } public override FSharpAsync<Unit> Invoke(Unit unitVar) { FSharpAsync<MicrophoneAudio> computation = channel.AsyncGet((FSharpOption<int>)null); FSharpFunc<MicrophoneAudio, FSharpAsync<Unit>> binder = new -cctor@46-2(vad, vadDisabledFrames, framesWritten, Recording, FilePath, resampler, consumer); return AsyncPrimitives.MakeAsync<Unit>((FSharpFunc<AsyncActivation<Unit>, AsyncReturn>)new -cctor@45-18(computation, binder)); } } [Serializable] internal sealed class -cctor@43 : FSharpFunc<Unit, FSharpAsync<Unit>> { public WebRtcVad vad; public FSharpRef<int> vadDisabledFrames; public FSharpRef<int> framesWritten; public FSharpRef<FSharpOption<WaveFileWriter>> Recording; public FSharpRef<FSharpOption<string>> FilePath; public BlockingQueueAgent<MicrophoneAudio> channel; public FSharpRef<FSharpOption<Mirage.Core.Audio.Resampler.Resampler>> resampler; [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public Lazy<FSharpAsync<Unit>> consumer; [CompilerGenerated] [DebuggerNonUserCode] internal -cctor@43(WebRtcVad vad, FSharpRef<int> vadDisabledFrames, FSharpRef<int> framesWritten, FSharpRef<FSharpOption<WaveFileWriter>> Recording, FSharpRef<FSharpOption<string>> FilePath, BlockingQueueAgent<MicrophoneAudio> channel, FSharpRef<FSharpOption<Mirage.Core.Audio.Resampler.Resampler>> resampler, Lazy<FSharpAsync<Unit>> consumer) { this.vad = vad; this.vadDisabledFrames = vadDisabledFrames; this.framesWritten = framesWritten; this.Recording = Recording; this.FilePath = FilePath; this.channel = channel; this.resampler = resampler; this.consumer = consumer; } public override FSharpAsync<Unit> Invoke(Unit unitVar) { return ExtraTopLevelOperators.DefaultAsyncBuilder.Delay<Unit>((FSharpFunc<Unit, FSharpAsync<Unit>>)new -cctor@45-1(vad, vadDisabledFrames, framesWritten, Recording, FilePath, channel, resampler, consumer)); } } internal static FSharpOption<A> get<A>(FSharpRef<FSharpOption<A>> field) { return field.contents; } internal static WaveFileWriter defaultRecording@56(FSharpRef<FSharpOption<WaveFileWriter>> Recording, FSharpRef<FSharpOption<string>> FilePath, MicrophoneAudio audio, FSharpRef<int> framesWritten, Unit unitVar0) { //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006d: Expected O, but got Unknown //IL_0068: Unknown result type (might be due to invalid IL or missing references) //IL_006e: Expected O, but got Unknown framesWritten.contents = 0; DirectoryInfo directoryInfo = Directory.CreateDirectory(Mirage.Core.Audio.Recording.RecordingDirectory); string text = Path.Join((ReadOnlySpan<char>)Mirage.Core.Audio.Recording.RecordingDirectory, (ReadOnlySpan<char>)(string?)PrintfModule.PrintFormatToStringThen<object>((PrintfFormat<object, Unit, string, string>)(object)new PrintfFormat<object, object, object, object, long>("%P().wav", new object[1] { DateTime.UtcNow.ToFileTime() }, (Type[])null))); WaveFileWriter val = new WaveFileWriter(text, new WaveFormat(audio.sampleRate@, audio.channels@)); FilePath.contents = FSharpOption<string>.Some(text); Recording.contents = FSharpOption<WaveFileWriter>.Some(val); return val; } [CompilerGenerated] internal static FSharpOption<Unit> f@1-50(FSharpRef<int> vadDisabledFrames, FSharpRef<int> framesWritten, Unit unitVar0) { vadDisabledFrames.contents = 0; framesWritten.contents = 0; return FSharpFunc<Tuple<Return, FSharpOption<Unit>>, Unit>.InvokeFast<FSharpOption<Unit>>((FSharpFunc<Tuple<Return, FSharpOption<Unit>>, FSharpFunc<Unit, FSharpOption<Unit>>>)-cctor@80-10.@_instance, new Tuple<Return, FSharpOption<Unit>>(null, null), (Unit)null); } [CompilerGenerated] internal static FSharpOption<Unit> f@1-49(FSharpRef<FSharpOption<WaveFileWriter>> Recording, FSharpRef<FSharpOption<string>> FilePath, WaveFileWriter recording, FSharpRef<int> vadDisabledFrames, FSharpRef<int> framesWritten, string filePath) { Recording.contents = null; FilePath.contents = null; Operators.dispose((IDisposable)recording); FSharpOption<Unit> obj; FSharpOption<Unit> val2; if (framesWritten.contents <= 16) { TryWith val = null; val2 = null; obj = TryWith.TryWith<FSharpOption<Unit>>((FSharpFunc<Unit, FSharpOption<Unit>>)new -cctor@77-5(filePath), (FSharpFunc<Exception, FSharpOption<Unit>>)-cctor@77-7.@_instance, (Default4)(object)val, True.True); } else { obj = FSharpFunc<Tuple<Return, FSharpOption<Unit>>, Unit>.InvokeFast<FSharpOption<Unit>>((FSharpFunc<Tuple<Return, FSharpOption<Unit>>, FSharpFunc<Unit, FSharpOption<Unit>>>)-cctor@76-9.@_instance, new Tuple<Return, FSharpOption<Unit>>(null, null), (Unit)null); } FSharpOption<Unit> val3 = obj; Bind val4 = null; val2 = null; if (val3 == null) { return null; } FSharpOption<Unit> val5 = val3; return f@1-50(vadDisabledFrames, framesWritten, val5.Value); } [CompilerGenerated] internal static FSharpOption<Unit> f@1-48(FSharpRef<FSharpOption<WaveFileWriter>> Recording, FSharpRef<FSharpOption<string>> FilePath, FSharpRef<int> vadDisabledFrames, FSharpRef<int> framesWritten, WaveFileWriter recording) { FSharpOption<string> contents = FilePath.contents; Bind val = null; FSharpOption<Unit> val2 = null; if (contents == null) { return null; } FSharpOption<string> val3 = contents; return f@1-49(Recording, FilePath, recording, vadDisabledFrames, framesWritten, val3.Value); } } } namespace <StartupCode$Mirage>.$Mirage.Patch { internal static class RecordAudio { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] internal static int init@; static RecordAudio() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Expected O, but got Unknown WebRtcVad vad = new WebRtcVad(); Mirage.Patch.RecordAudio.RecordAudio.VoiceView = null; Mirage.Patch.RecordAudio.RecordAudio.init@32 = 2; FSharpRef<int> vadDisabledFrames = new FSharpRef<int>(0); FSharpRef<int> framesWritten = new FSharpRef<int>(0); FSharpRef<FSharpOption<WaveFileWriter>> recording = new FSharpRef<FSharpOption<WaveFileWriter>>((FSharpOption<WaveFileWriter>)null); FSharpRef<FSharpOption<string>> filePath = new FSharpRef<FSharpOption<string>>((FSharpOption<string>)null); BlockingQueueAgent<Mirage.Patch.RecordAudio.MicrophoneAudio> val = new BlockingQueueAgent<Mirage.Patch.RecordAudio.MicrophoneAudio>(int.MaxValue); FSharpRef<FSharpOption<Mirage.Core.Audio.Resampler.Resampler>> resampler = new FSharpRef<FSharpOption<Mirage.Core.Audio.Resampler.Resampler>>((FSharpOption<Mirage.Core.Audio.Resampler.Resampler>)null); Lazy<FSharpAsync<Unit>> consumer = default(Lazy<FSharpAsync<Unit>>); FSharpFunc<Unit, FSharpAsync<Unit>> val2 = new Mirage.Patch.RecordAudio.-cctor@43(vad, vadDisabledFrames, framesWritten, recording, filePath, val, resampler, consumer); consumer = LazyExtensions.Create<FSharpAsync<Unit>>(val2); ((Mirage.Patch.RecordAudio.-cctor@43)val2).consumer = consumer; FSharpAsync<Unit> value = consumer.Value; FSharpAsync.Start(value, (FSharpOption<CancellationToken>)null); Mirage.Patch.RecordAudio.RecordAudio.audioChannel = val; Mirage.Patch.RecordAudio.RecordAudio.init@32 = 3; } } } namespace Mirage.Patch { [CompilationMapping(/*Could not decode attribute arguments.*/)] public static class RegisterPrefab { [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] public class RegisterPrefab { internal static bool registered; internal static int init@14; [HarmonyPostfix] [HarmonyPatch(typeof(Player), "Start")] public static void save playback prefab(Player __instance) { if (Mirage.Unity.MimicVoice.PlaybackPrefab == null) { Mirage.Unity.MimicVoice.PlaybackPrefab = Object.Instantiate<GameObject>(((Component)((Component)Player.localPlayer).transform.Find("HeadPosition/Voice")).gameObject); Object.DontDestroyOnLoad((Object)(object)Mirage.Unity.MimicVoice.PlaybackPrefab); Mirage.Unity.MimicVoice.PlaybackPrefab.SetActive(false); GameObject playbackPrefab = Mirage.Unity.MimicVoice.PlaybackPrefab; FSharpFunc<Type, Component> func = new removeComponent@24(playbackPrefab); FSharpFunc<Type, Unit> val = new removeComponent@24-1(func); FSharpList<Type> val2 = FSharpList<Type>.Cons(typeof(PhotonVoiceView), FSharpList<Type>.Cons(typeof(PhotonView), FSharpList<Type>.Cons(typeof(Speaker), FSharpList<Type>.Cons(typeof(Recorder), FSharpList<Type>.Cons(typeof(PlayerVoiceHandler), FSharpList<Type>.Empty))))); Iterate val3 = null; Iterate.Iterate<Type>(val2, val); } } [HarmonyPostfix] [HarmonyPatch(typeof(RoundSpawner), "Start")] public static void register prefabs for enemies(RoundSpawner __instance) { //IL_0049: Unknown result type (might be due to invalid IL or missing references) //IL_004f: Expected O, but got Unknown if (init@14 < 1) { IntrinsicFunctions.FailStaticInit(); } if (registered) { return; } if (init@14 < 1) { IntrinsicFunctions.FailStaticInit(); } registered = true; GameObject[] possibleSpawns = __instance.possibleSpawns; foreach (GameObject val in possibleSpawns) { if (val.GetComponent<MonsterGroupClose>() == null) { Transform[] componentsInChildren = val.GetComponentsInChildren<Transform>(); FSharpFunc<Transform, bool> @_instance; @_instance = parentTransform@43.@_instance; TryFind val2 = null; FSharpOption<Transform> val3 = ArrayModule.TryFind<Transform>(@_instance, componentsInChildren); FSharpFunc<Transform, Unit> @_instance2; @_instance2 = register prefabs for enemies@44.@_instance; Iterate val4 = null; Iterate.Iterate<Transform>(val3, @_instance2); } } } [HarmonyPostfix] [HarmonyPatch(typeof(Player), "Awake")] public static void register prefab for angler mimic(Player __instance) { FSharpList<string> val = FSharpList<string>.Cons("AnglerMimic", FSharpList<string>.Cons("Infiltrator2", FSharpList<string>.Empty)); FSharpFunc<string, Unit> val2 = new register prefab for angler mimic@58(__instance); Iterate val3 = null; Iterate.Iterate<string>(val, val2); } static RegisterPrefab() { <StartupCode$Mirage>.$Mirage.Patch.RegisterPrefab.init@ = 0; _ = <StartupCode$Mirage>.$Mirage.Patch.RegisterPrefab.init@; } } [Serializable] internal sealed class removeComponent@24 : FSharpFunc<Type, Component> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public GameObject objectArg; [CompilerGenerated] [DebuggerNonUserCode] internal removeComponent@24(GameObject objectArg) { this.objectArg = objectArg; } public override Component Invoke(Type type) { return objectArg.GetComponent(type); } } [Serializable] internal sealed class removeComponent@24-1 : FSharpFunc<Type, Unit> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public FSharpFunc<Type, Component> func1; [CompilerGenerated] [DebuggerNonUserCode] internal removeComponent@24-1(FSharpFunc<Type, Component> func1) { this.func1 = func1; } public override Unit Invoke(Type x) { Component val = func1.Invoke(x); Object.Destroy((Object)(object)val); return null; } } [Serializable] internal sealed class parentTransform@43 : FSharpFunc<Transform, bool> { internal static readonly parentTransform@43 @_instance = new parentTransform@43(); [CompilerGenerated] [DebuggerNonUserCode] internal parentTransform@43() { } public override bool Invoke(Transform _arg1) { return ((Object)_arg1).name.StartsWith("Bot"); } } [Serializable] internal sealed class register prefabs for enemies@45-1 : FSharpFunc<Type, Component> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public GameObject objectArg; [CompilerGenerated] [DebuggerNonUserCode] internal register prefabs for enemies@45-1(GameObject objectArg) { this.objectArg = objectArg; } public override Component Invoke(Type componentType) { return objectArg.AddComponent(componentType); } } [Serializable] internal sealed class register prefabs for enemies@45-2 : FSharpFunc<Type, Unit> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public FSharpFunc<Type, Component> func1; [CompilerGenerated] [DebuggerNonUserCode] internal register prefabs for enemies@45-2(FSharpFunc<Type, Component> func1) { this.func1 = func1; } public override Unit Invoke(Type x) { Component val = func1.Invoke(x); return null; } } [Serializable] internal sealed class register prefabs for enemies@44 : FSharpFunc<Transform, Unit> { internal static readonly register prefabs for enemies@44 @_instance = new register prefabs for enemies@44(); [CompilerGenerated] [DebuggerNonUserCode] internal register prefabs for enemies@44() { } public override Unit Invoke(Transform parent) { GameObject gameObject = ((Component)parent).gameObject; FSharpFunc<Type, Component> func = new register prefabs for enemies@45-1(gameObject); FSharpFunc<Type, Unit> val = new register prefabs for enemies@45-2(func); FSharpList<Type> val2 = 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 val3 = null; Iterate.Iterate<Type>(val2, val); return null; } } [Serializable] internal sealed class parentTransform@62-1 : FSharpFunc<Transform, bool> { internal static readonly parentTransform@62-1 @_instance = new parentTransform@62-1(); [CompilerGenerated] [DebuggerNonUserCode] internal parentTransform@62-1() { } public override bool Invoke(Transform _arg2) { return ((Object)_arg2).name.StartsWith("Bot"); } } [Serializable] internal sealed class register prefab for angler mimic@64-2 : FSharpFunc<Type, Component> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public GameObject objectArg; [CompilerGenerated] [DebuggerNonUserCode] internal register prefab for angler mimic@64-2(GameObject objectArg) { this.objectArg = objectArg; } public override Component Invoke(Type componentType) { return objectArg.AddComponent(componentType); } } [Serializable] internal sealed class register prefab for angler mimic@64-3 : FSharpFunc<Type, Unit> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public FSharpFunc<Type, Component> func1; [CompilerGenerated] [DebuggerNonUserCode] internal register prefab for angler mimic@64-3(FSharpFunc<Type, Component> func1) { this.func1 = func1; } public override Unit Invoke(Type x) { Component val = func1.Invoke(x); return null; } } [Serializable] internal sealed class register prefab for angler mimic@63-1 : FSharpFunc<Transform, Unit> { internal static readonly register prefab for angler mimic@63-1 @_instance = new register prefab for angler mimic@63-1(); [CompilerGenerated] [DebuggerNonUserCode] internal register prefab for angler mimic@63-1() { } public override Unit Invoke(Transform parent) { GameObject gameObject = ((Component)parent).gameObject; FSharpFunc<Type, Component> func = new register prefab for angler mimic@64-2(gameObject); FSharpFunc<Type, Unit> val = new register prefab for angler mimic@64-3(func); FSharpList<Type> val2 = 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 val3 = null; Iterate.Iterate<Type>(val2, val); return null; } } [Serializable] internal sealed class register prefab for angler mimic@58 : FSharpFunc<string, Unit> { public Player __instance; [CompilerGenerated] [DebuggerNonUserCode] internal register prefab for angler mimic@58(Player __instance) { this.__instance = __instance; } public override Unit Invoke(string target) { if (string.Equals(((Object)__instance).name, PrintfModule.PrintFormatToStringThen<string>((PrintfFormat<string, Unit, string, string>)(object)new PrintfFormat<string, Unit, string, string, string>("%P()(Clone)", new object[1] { target }, (Type[])null)))) { Transform[] componentsInChildren = ((Component)__instance).GetComponentsInChildren<Transform>(); FSharpFunc<Transform, bool> @_instance; @_instance = parentTransform@62-1.@_instance; TryFind val = null; FSharpOption<Transform> val2 = ArrayModule.TryFind<Transform>(@_instance, componentsInChildren); FSharpFunc<Transform, Unit> @_instance2; @_instance2 = register prefab for angler mimic@63-1.@_instance; Iterate val3 = null; Iterate.Iterate<Transform>(val2, @_instance2); return null; } return null; } } } } namespace <StartupCode$Mirage>.$Mirage.Patch { internal static class RegisterPrefab { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] internal static int init@; static RegisterPrefab() { Mirage.Patch.RegisterPrefab.RegisterPrefab.registered = false; Mirage.Patch.RegisterPrefab.RegisterPrefab.init@14 = 1; } } } namespace Mirage.Unity { [CompilationMapping(/*Could not decode attribute arguments.*/)] public static class MimicVoice { [Serializable] internal sealed class get@19-1<A> : FSharpFunc<FSharpRef<FSharpOption<A>>, string, string, FSharpResult<A, string>> { internal static readonly get@19-1<A> @_instance = new get@19-1<A>(); [CompilerGenerated] [DebuggerNonUserCode] internal get@19-1() { ((FSharpFunc<FSharpRef<FSharpOption<FSharpRef<FSharpOption<A>>>>, string, string, FSharpResult<FSharpRef<FSharpOption<A>>, string>>)(object)this)..ctor(); } public override FSharpResult<A, string> Invoke(FSharpRef<FSharpOption<A>> field, string fieldName, string methodName) { //IL_0047: Unknown result type (might be due to invalid IL or missing references) return Option.toResultWith<string, A>(PrintfModule.PrintFormatToStringThen<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] { "MimicVoice", methodName, fieldName }, (Type[])null)), ((FSharpRef<FSharpOption<FSharpOption<A>>>)(object)field).contents); } } [Serializable] [AllowNullLiteral] [CompilationMapping(/*Could not decode attribute arguments.*/)] public class MimicVoice : RpcBehaviour.RpcBehaviour { internal FSharpRef<MimicVoice> self = new FSharpRef<MimicVoice>((MimicVoice)null); internal Random random; internal Mirage.Core.Audio.Recording.RecordingManager recordingManager; internal FSharpRef<FSharpOption<GameObject>> Playback; internal FSharpRef<FSharpOption<MimicPlayer.MimicPlayer>> MimicPlayer; internal FSharpRef<FSharpOption<AudioStream.AudioStream>> AudioStream; internal FSharpFunc<string, FSharpResult<MimicPlayer.MimicPlayer, string>> getMimicPlayer; internal FSharpFunc<string, FSharpResult<AudioStream.AudioStream, string>> getAudioStream; internal int init@22; public MimicVoice() { FSharpRef<MimicVoice> val = self; base..ctor(); self.contents = this; random = new Random(); recordingManager = new Mirage.Core.Audio.Recording.RecordingManager(new List<string>(), new Random()); Playback = new FSharpRef<FSharpOption<GameObject>>((FSharpOption<GameObject>)null); MimicPlayer = new FSharpRef<FSharpOption<MimicPlayer.MimicPlayer>>((FSharpOption<MimicPlayer.MimicPlayer>)null); AudioStream = new FSharpRef<FSharpOption<AudioStream.AudioStream>>((FSharpOption<AudioStream.AudioStream>)null); FSharpRef<FSharpOption<MimicPlayer.MimicPlayer>> mimicPlayer = MimicPlayer; getMimicPlayer = FSharpFunc<FSharpRef<FSharpOption<Mirage.Unity.MimicPlayer.MimicPlayer>>, string>.InvokeFast<FSharpFunc<string, FSharpResult<MimicPlayer.MimicPlayer, string>>>(get<MimicPlayer.MimicPlayer>(), mimicPlayer, "MimicPlayer"); FSharpRef<FSharpOption<AudioStream.AudioStream>> audioStream = AudioStream; getAudioStream = FSharpFunc<FSharpRef<FSharpOption<Mirage.Unity.AudioStream.AudioStream>>, string>.InvokeFast<FSharpFunc<string, FSharpResult<AudioStream.AudioStream, string>>>(get<AudioStream.AudioStream>(), audioStream, "AudioStream"); init@22 = 1; } public override void Awake() { if (init@22 < 1) { IntrinsicFunctions.FailInit(); } base.Awake(); GameObject val = Object.Instantiate<GameObject>(PlaybackPrefab); val.transform.parent = ((Component)this).transform; Playback.contents = ((val != null) ? FSharpOption<GameObject>.Some(val) : null); val.SetActive(true); AudioStream.AudioStream component = ((Component)this).GetComponent<AudioStream.AudioStream>(); AudioSource component2 = val.GetComponent<AudioSource>(); component.AudioSource.contents = FSharpOption<AudioSource>.Some(component2); AudioStream.contents = ((component != null) ? FSharpOption<Mirage.Unity.AudioStream.AudioStream>.Some(component) : null); MimicPlayer.MimicPlayer component3 = ((Component)this).gameObject.GetComponent<MimicPlayer.MimicPlayer>(); MimicPlayer.contents = ((component3 != null) ? FSharpOption<Mirage.Unity.MimicPlayer.MimicPlayer>.Some(component3) : null); } public void Start() { if (init@22 < 1) { IntrinsicFunctions.FailInit(); } startVoiceMimic(); } public void LateUpdate() { if (init@22 < 1) { IntrinsicFunctions.FailInit(); } FSharpOption<GameObject> contents = Playback.contents; FSharpFunc<GameObject, Unit> val = new LateUpdate@88(this); Iterate val2 = null; Iterate.Iterate<GameObject>(contents, val); } public void Update() { //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0031: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003c: 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_0052: Unknown result type (might be due to invalid IL or missing references) //IL_0062: Unknown result type (might be due to invalid IL or missing references) if (init@22 < 1) { IntrinsicFunctions.FailInit(); } FSharpFunc<FSharpResult<Unit, string>, Unit> handleResult = Mirage.Core.Logger.handleResult; MonadFxStrictBuilder<FSharpResult<Unit, string>> val = new MonadFxStrictBuilder<FSharpResult<Unit, string>>(); FSharpResult<AudioStream.AudioStream, string> val2 = getAudioStream.Invoke("Update"); Bind val3 = null; FSharpResult<Unit, string> val4 = default(FSharpResult<Unit, string>); handleResult.Invoke((val2.Tag == 0) ? k@1-16(this, val2.ResultValue) : FSharpResult<Unit, string>.NewError(val2.ErrorValue)); } [CompilerGenerated] internal void startVoiceMimic() { //IL_0058: Unknown result type (might be due to invalid IL or missing references) Lazy<FSharpAsync<object>> runMimicLoop = default(Lazy<FSharpAsync<object>>); FSharpFunc<Unit, FSharpAsync<object>> val = new clo@56-19(this, runMimicLoop); runMimicLoop = LazyExtensions.Create<FSharpAsync<object>>(val); ((clo@56-19)val).runMimicLoop = runMimicLoop; FSharpAsync<object> value = runMimicLoop.Value; CancellationToken destroyCancellationToken = ((MonoBehaviour)IntrinsicFunctions.CheckThis<MimicVoice>(self.contents)).destroyCancellationToken; FSharpAsync<object> val2 = ExtraTopLevelOperators.DefaultAsyncBuilder.Delay<object>((FSharpFunc<Unit, FSharpAsync<object>>)new clo@66-24(value)); UniTaskExtensions.Forget<object>(UniTaskExtensions.AsUniTask<object>(FSharpAsync.StartImmediateAsTask<object>(val2, FSharpOption<CancellationToken>.Some(destroyCancellationToken)), true)); } } [Serializable] internal sealed class LateUpdate@88 : FSharpFunc<GameObject, Unit> { public MimicVoice @this; [CompilerGenerated] [DebuggerNonUserCode] internal LateUpdate@88(MimicVoice @this) { this.@this = @this; } public override Unit Invoke(GameObject playback) { //IL_0011: Unknown result type (might be due to invalid IL or missing references) playback.transform.position = ((Component)this.@this).transform.position; return null; } } [Serializable] internal sealed class Update@98 : FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, FSharpFunc<Unit, FSharpResult<Unit, string>>> { internal static readonly Update@98 @_instance = new Update@98(); [CompilerGenerated] [DebuggerNonUserCode] internal Update@98() { } 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 Update@102-1 : FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, FSharpFunc<Unit, FSharpResult<Unit, string>>> { internal static readonly Update@102-1 @_instance = new Update@102-1(); [CompilerGenerated] [DebuggerNonUserCode] internal Update@102-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 Update@101-2 : FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, FSharpFunc<Unit, FSharpResult<Unit, string>>> { internal static readonly Update@101-2 @_instance = new Update@101-2(); [CompilerGenerated] [DebuggerNonUserCode] internal Update@101-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 Update@109-3 : FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, FSharpFunc<Unit, FSharpResult<Unit, string>>> { internal static readonly Update@109-3 @_instance = new Update@109-3(); [CompilerGenerated] [DebuggerNonUserCode] internal Update@109-3() { } 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 mimicVoice@40-1 : FSharpFunc<FSharpAsync<FSharpOption<Unit>>, Unit> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public CancellationToken token; [CompilerGenerated] [DebuggerNonUserCode] internal mimicVoice@40-1(CancellationToken token) { this.token = token; } public override Unit Invoke(FSharpAsync<FSharpOption<Unit>> program) { //IL_0012: Unknown result type (might be due to invalid IL or missing references) UniTaskExtensions.Forget<FSharpOption<Unit>>(UniTaskExtensions.AsUniTask<FSharpOption<Unit>>(FSharpAsync.StartImmediateAsTask<FSharpOption<Unit>>(program, FSharpOption<CancellationToken>.Some(token)), true)); return null; } } [Serializable] internal sealed class mimicVoice@40-2 : FSharpFunc<FSharpAsync<FSharpOption<Unit>>, Unit> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public FSharpFunc<FSharpAsync<FSharpOption<Unit>>, Unit> func1; [CompilerGenerated] [DebuggerNonUserCode] internal mimicVoice@40-2(FSharpFunc<FSharpAsync<FSharpOption<Unit>>, Unit> func1) { this.func1 = func1; } public override Unit Invoke(FSharpAsync<FSharpOption<Unit>> x) { func1.Invoke(x); return null; } } [Serializable] internal sealed class mimicVoice@42-3 : FSharpFunc<Tuple<Return, FSharpAsync<FSharpOption<Player>>>, FSharpFunc<FSharpOption<Player>, FSharpAsync<FSharpOption<Player>>>> { internal static readonly mimicVoice@42-3 @_instance = new mimicVoice@42-3(); [CompilerGenerated] [DebuggerNonUserCode] internal mimicVoice@42-3() { } public override FSharpFunc<FSharpOption<Player>, FSharpAsync<FSharpOption<Player>>> Invoke(Tuple<Return, FSharpAsync<FSharpOption<Player>>> tupledArg) { return Return.Return<FSharpOption<Player>>(tupledArg.Item2, tupledArg.Item1); } } [Serializable] internal sealed class mimicVoice@46-6 : FSharpFunc<Tuple<Return, FSharpAsync<FSharpOption<Unit>>>, FSharpFunc<FSharpOption<Unit>, FSharpAsync<FSharpOption<Unit>>>> { internal static readonly mimicVoice@46-6 @_instance = new mimicVoice@46-6(); [CompilerGenerated] [DebuggerNonUserCode] internal mimicVoice@46-6() { } public override FSharpFunc<FSharpOption<Unit>, FSharpAsync<FSharpOption<Unit>>> Invoke(Tuple<Return, FSharpAsync<FSharpOption<Unit>>> tupledArg) { return Return.Return<FSharpOption<Unit>>(tupledArg.Item2, tupledArg.Item1); } } [Serializable] internal sealed class mimicVoice@46-5 : FSharpFunc<Unit, OptionT<FSharpAsync<FSharpOption<Unit>>>> { internal static readonly mimicVoice@46-5 @_instance = new mimicVoice@46-5(); [CompilerGenerated] [DebuggerNonUserCode] internal mimicVoice@46-5() { } public override OptionT<FSharpAsync<FSharpOption<Unit>>> Invoke(Unit x) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) FSharpOption<Unit> val = FSharpOption<Unit>.Some(x); return OptionT<FSharpAsync<FSharpOption<Unit>>>.NewOptionT(FSharpFunc<Tuple<Return, FSharpAsync<FSharpOption<Unit>>>, FSharpOption<Unit>>.InvokeFast<FSharpAsync<FSharpOption<Unit>>>((FSharpFunc<Tuple<Return, FSharpAsync<FSharpOption<Unit>>>, FSharpFunc<FSharpOption<Unit>, FSharpAsync<FSharpOption<Unit>>>>)mimicVoice@46-6.@_instance, new Tuple<Return, FSharpAsync<FSharpOption<Unit>>>(null, null), val)); } } [Serializable] internal sealed class mimicVoice@46-4 : FSharpFunc<Tuple<Return, OptionT<FSharpAsync<FSharpOption<Unit>>>>, FSharpFunc<Unit, OptionT<FSharpAsync<FSharpOption<Unit>>>>> { internal static readonly mimicVoice@46-4 @_instance = new mimicVoice@46-4(); [CompilerGenerated] [DebuggerNonUserCode] internal mimicVoice@46-4() { } public override FSharpFunc<Unit, OptionT<FSharpAsync<FSharpOption<Unit>>>> Invoke(Tuple<Return, OptionT<FSharpAsync<FSharpOption<Unit>>>> tupledArg) { Default1 item = (Default1)(object)tupledArg.Item1; return mimicVoice@46-5.@_instance; } } [Serializable] internal sealed class mimicVoice@48-9 : FSharpFunc<Tuple<Return, FSharpAsync<FSharpOption<Unit>>>, FSharpFunc<FSharpOption<Unit>, FSharpAsync<FSharpOption<Unit>>>> { internal static readonly mimicVoice@48-9 @_instance = new mimicVoice@48-9(); [CompilerGenerated] [DebuggerNonUserCode] internal mimicVoice@48-9() { } public override FSharpFunc<FSharpOption<Unit>, FSharpAsync<FSharpOption<Unit>>> Invoke(Tuple<Return, FSharpAsync<FSharpOption<Unit>>> tupledArg) { return Return.Return<FSharpOption<Unit>>(tupledArg.Item2, tupledArg.Item1); } } [Serializable] internal sealed class mimicVoice@48-8 : FSharpFunc<Unit, OptionT<FSharpAsync<FSharpOption<Unit>>>> { internal static readonly mimicVoice@48-8 @_instance = new mimicVoice@48-8(); [CompilerGenerated] [DebuggerNonUserCode] internal mimicVoice@48-8() { } public override OptionT<FSharpAsync<FSharpOption<Unit>>> Invoke(Unit x) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) FSharpOption<Unit> val = FSharpOption<Unit>.Some(x); return OptionT<FSharpAsync<FSharpOption<Unit>>>.NewOptionT(FSharpFunc<Tuple<Return, FSharpAsync<FSharpOption<Unit>>>, FSharpOption<Unit>>.InvokeFast<FSharpAsync<FSharpOption<Unit>>>((FSharpFunc<Tuple<Return, FSharpAsync<FSharpOption<Unit>>>, FSharpFunc<FSharpOption<Unit>, FSharpAsync<FSharpOption<Unit>>>>)mimicVoice@48-9.@_instance, new Tuple<Return, FSharpAsync<FSharpOption<Unit>>>(null, null), val)); } } [Serializable] internal sealed class mimicVoice@48-7 : FSharpFunc<Tuple<Return, OptionT<FSharpAsync<FSharpOption<Unit>>>>, FSharpFunc<Unit, OptionT<FSharpAsync<FSharpOption<Unit>>>>> { internal static readonly mimicVoice@48-7 @_instance = new mimicVoice@48-7(); [CompilerGenerated] [DebuggerNonUserCode] internal mimicVoice@48-7() { } public override FSharpFunc<Unit, OptionT<FSharpAsync<FSharpOption<Unit>>>> Invoke(Tuple<Return, OptionT<FSharpAsync<FSharpOption<Unit>>>> tupledArg) { Default1 item = (Default1)(object)tupledArg.Item1; return mimicVoice@48-8.@_instance; } } [Serializable] internal sealed class mimicVoice@44-11 : FSharpFunc<Tuple<Return, FSharpAsync<FSharpOption<Unit>>>, FSharpFunc<FSharpOption<Unit>, FSharpAsync<FSharpOption<Unit>>>> { internal static readonly mimicVoice@44-11 @_instance = new mimicVoice@44-11(); [CompilerGenerated] [DebuggerNonUserCode] internal mimicVoice@44-11() { } public override FSharpFunc<FSharpOption<Unit>, FSharpAsync<FSharpOption<Unit>>> Invoke(Tuple<Return, FSharpAsync<FSharpOption<Unit>>> tupledArg) { return Return.Return<FSharpOption<Unit>>(tupledArg.Item2, tupledArg.Item1); } } [Serializable] internal sealed class mimicVoice@44-10 : FSharpFunc<FSharpOption<string>, FSharpAsync<FSharpOption<Unit>>> { public AudioStream.AudioStream audioStream; public Player player; [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public MimicVoice @this; [CompilerGenerated] [DebuggerNonUserCode] internal mimicVoice@44-10(AudioStream.AudioStream audioStream, Player player, MimicVoice @this) { this.audioStream = audioStream; this.player = player; this.@this = @this; } public override FSharpAsync<FSharpOption<Unit>> Invoke(FSharpOption<string> maybe_value) { //IL_001f: Unknown result type (might be due to invalid IL or missing references) //IL_0024: Unknown result type (might be due to invalid IL or missing references) if (maybe_value != null) { string value = maybe_value.Value; return f@1-47(this.@this, audioStream, player, value).Item; } FSharpOption<Unit> val = null; return FSharpFunc<Tuple<Return, FSharpAsync<FSharpOption<Unit>>>, FSharpOption<Unit>>.InvokeFast<FSharpAsync<FSharpOption<Unit>>>((FSharpFunc<Tuple<Return, FSharpAsync<FSharpOption<Unit>>>, FSharpFunc<FSharpOption<Unit>, FSharpAsync<FSharpOption<Unit>>>>)mimicVoice@44-11.@_instance, new Tuple<Return, FSharpAsync<FSharpOption<Unit>>>(null, null), val); } } [Serializable] internal sealed class mimicVoice@43-14 : FSharpFunc<Tuple<Return, FSharpAsync<FSharpOption<Unit>>>, FSharpFunc<FSharpOption<Unit>, FSharpAsync<FSharpOption<Unit>>>> { internal static readonly mimicVoice@43-14 @_instance = new mimicVoice@43-14(); [CompilerGenerated] [DebuggerNonUserCode] internal mimicVoice@43-14() { } public override FSharpFunc<FSharpOption<Unit>, FSharpAsync<FSharpOption<Unit>>> Invoke(Tuple<Return, FSharpAsync<FSharpOption<Unit>>> tupledArg) { return Return.Return<FSharpOption<Unit>>(tupledArg.Item2, tupledArg.Item1); } } [Serializable] internal sealed class mimicVoice@43-13 : FSharpFunc<Unit, OptionT<FSharpAsync<FSharpOption<Unit>>>> { internal static readonly mimicVoice@43-13 @_instance = new mimicVoice@43-13(); [CompilerGenerated] [DebuggerNonUserCode] internal mimicVoice@43-13() { } public override OptionT<FSharpAsync<FSharpOption<Unit>>> Invoke(Unit x) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) FSharpOption<Unit> val = FSharpOption<Unit>.Some(x); return OptionT<FSharpAsync<FSharpOption<Unit>>>.NewOptionT(FSharpFunc<Tuple<Return, FSharpAsync<FSharpOption<Unit>>>, FSharpOption<Unit>>.InvokeFast<FSharpAsync<FSharpOption<Unit>>>((FSharpFunc<Tuple<Return, FSharpAsync<FSharpOption<Unit>>>, FSharpFunc<FSharpOption<Unit>, FSharpAsync<FSharpOption<Unit>>>>)mimicVoice@43-14.@_instance, new Tuple<Return, FSharpAsync<FSharpOption<Unit>>>(null, null), val)); } } [Serializable] internal sealed class mimicVoice@43-12 : FSharpFunc<Tuple<Return, OptionT<FSharpAsync<FSharpOption<Unit>>>>, FSharpFunc<Unit, OptionT<FSharpAsync<FSharpOption<Unit>>>>> { internal static readonly mimicVoice@43-12 @_instance = new mimicVoice@43-12(); [CompilerGenerated] [DebuggerNonUserCode] internal mimicVoice@43-12() { } public override FSharpFunc<Unit, OptionT<FSharpAsync<FSharpOption<Unit>>>> Invoke(Tuple<Return, OptionT<FSharpAsync<FSharpOption<Unit>>>> tupledArg) { Default1 item = (Default1)(object)tupledArg.Item1; return mimicVoice@43-13.@_instance; } } [Serializable] internal sealed class mimicVoice@42-16 : FSharpFunc<Tuple<Return, FSharpAsync<FSharpOption<Unit>>>, FSharpFunc<FSharpOption<Unit>, FSharpAsync<FSharpOption<Unit>>>> { internal static readonly mimicVoice@42-16 @_instance = new mimicVoice@42-16(); [CompilerGenerated] [DebuggerNonUserCode] internal mimicVoice@42-16() { } public override FSharpFunc<FSharpOption<Unit>, FSharpAsync<FSharpOption<Unit>>> Invoke(Tuple<Return, FSharpAsync<FSharpOption<Unit>>> tupledArg) { return Return.Return<FSharpOption<Unit>>(tupledArg.Item2, tupledArg.Item1); } } [Serializable] internal sealed class mimicVoice@42-15 : FSharpFunc<FSharpOption<Player>, FSharpAsync<FSharpOption<Unit>>> { public AudioStream.AudioStream audioStream; [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public MimicVoice @this; [CompilerGenerated] [DebuggerNonUserCode] internal mimicVoice@42-15(AudioStream.AudioStream audioStream, MimicVoice @this) { this.audioStream = audioStream; this.@this = @this; } public override FSharpAsync<FSharpOption<Unit>> Invoke(FSharpOption<Player> maybe_value) { //IL_0019: 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) if (maybe_value != null) { Player value = maybe_value.Value; return f@1-46(this.@this, audioStream, value).Item; } FSharpOption<Unit> val = null; return FSharpFunc<Tuple<Return, FSharpAsync<FSharpOption<Unit>>>, FSharpOption<Unit>>.InvokeFast<FSharpAsync<FSharpOption<Unit>>>((FSharpFunc<Tuple<Return, FSharpAsync<FSharpOption<Unit>>>, FSharpFunc<FSharpOption<Unit>, FSharpAsync<FSharpOption<Unit>>>>)mimicVoice@42-16.@_instance, new Tuple<Return, FSharpAsync<FSharpOption<Unit>>>(null, null), val); } } [Serializable] internal sealed class mimicVoice@41-17 : FSharpFunc<Unit, FSharpAsync<FSharpOption<Unit>>> { public MimicPlayer.MimicPlayer mimicPlayer; public AudioStream.AudioStream audioStream; [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public MimicVoice @this; [CompilerGenerated] [DebuggerNonUserCode] internal mimicVoice@41-17(MimicPlayer.MimicPlayer mimicPlayer, AudioStream.AudioStream audioStream, MimicVoice @this) { this.mimicPlayer = mimicPlayer; this.audioStream = audioStream; this.@this = @this; } public override FSharpAsync<FSharpOption<Unit>> Invoke(Unit _arg1) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) return x@1-1(this.@this, mimicPlayer, audioStream, null).Item; } } [Serializable] internal sealed class mimicVoice@53-20 : FSharpFunc<Tuple<Return, FSharpAsync<FSharpOption<Unit>>>, FSharpFunc<FSharpOption<Unit>, FSharpAsync<FSharpOption<Unit>>>> { internal static readonly mimicVoice@53-20 @_instance = new mimicVoice@53-20(); [CompilerGenerated] [DebuggerNonUserCode] internal mimicVoice@53-20() { } public override FSharpFunc<FSharpOption<Unit>, FSharpAsync<FSharpOption<Unit>>> Invoke(Tuple<Return, FSharpAsync<FSharpOption<Unit>>> tupledArg) { return Return.Return<FSharpOption<Unit>>(tupledArg.Item2, tupledArg.Item1); } } [Serializable] internal sealed class mimicVoice@53-19 : FSharpFunc<Unit, OptionT<FSharpAsync<FSharpOption<Unit>>>> { internal static readonly mimicVoice@53-19 @_instance = new mimicVoice@53-19(); [CompilerGenerated] [DebuggerNonUserCode] internal mimicVoice@53-19() { } public override OptionT<FSharpAsync<FSharpOption<Unit>>> Invoke(Unit x) { //IL_0019: Unknown result type (might be due to invalid IL or missing references) FSharpOption<Unit> val = FSharpOption<Unit>.Some(x); return OptionT<FSharpAsync<FSharpOption<Unit>>>.NewOptionT(FSharpFunc<Tuple<Return, FSharpAsync<FSharpOption<Unit>>>, FSharpOption<Unit>>.InvokeFast<FSharpAsync<FSharpOption<Unit>>>((FSharpFunc<Tuple<Return, FSharpAsync<FSharpOption<Unit>>>, FSharpFunc<FSharpOption<Unit>, FSharpAsync<FSharpOption<Unit>>>>)mimicVoice@53-20.@_instance, new Tuple<Return, FSharpAsync<FSharpOption<Unit>>>(null, null), val)); } } [Serializable] internal sealed class mimicVoice@53-18 : FSharpFunc<Tuple<Return, OptionT<FSharpAsync<FSharpOption<Unit>>>>, FSharpFunc<Unit, OptionT<FSharpAsync<FSharpOption<Unit>>>>> { internal static readonly mimicVoice@53-18 @_instance = new mimicVoice@53-18(); [CompilerGenerated] [DebuggerNonUserCode] internal mimicVoice@53-18() { } public override FSharpFunc<Unit, OptionT<FSharpAsync<FSharpOption<Unit>>>> Invoke(Tuple<Return, OptionT<FSharpAsync<FSharpOption<Unit>>>> tupledArg) { Default1 item = (Default1)(object)tupledArg.Item1; return mimicVoice@53-19.@_instance; } } [Serializable] internal sealed class mimicVoice@41-21 : FSharpFunc<Exception, FSharpAsync<FSharpOption<Unit>>> { internal static readonly mimicVoice@41-21 @_instance = new mimicVoice@41-21(); [CompilerGenerated] [DebuggerNonUserCode] internal mimicVoice@41-21() { } public override FSharpAsync<FSharpOption<Unit>> Invoke(Exception x) { //IL_0001: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Unknown result type (might be due to invalid IL or missing references) return catchHandler@1-1(x).Item; } } [Serializable] internal sealed class mimicVoice@41-22 : FSharpFunc<Unit, FSharpAsync<FSharpOption<Unit>>> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public FSharpAsync<FSharpOption<Unit>> arg00; [CompilerGenerated] [DebuggerNonUserCode] internal mimicVoice@41-22(FSharpAsync<FSharpOption<Unit>> arg00) { this.arg00 = arg00; } public override FSharpAsync<FSharpOption<Unit>> Invoke(Unit unitVar0) { return arg00; } } [Serializable] internal sealed class mimicVoice@40-23 : FSharpFunc<Unit, FSharpAsync<FSharpOption<Unit>>> { public MimicPlayer.MimicPlayer mimicPlayer; public AudioStream.AudioStream audioStream; [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public MimicVoice @this; [CompilerGenerated] [DebuggerNonUserCode] internal mimicVoice@40-23(MimicPlayer.MimicPlayer mimicPlayer, AudioStream.AudioStream audioStream, MimicVoice @this) { this.mimicPlayer = mimicPlayer; this.audioStream = audioStream; this.@this = @this; } public override FSharpAsync<FSharpOption<Unit>> Invoke(Unit _arg1) { //IL_0013: Unknown result type (might be due to invalid IL or missing references) //IL_0018: Unknown result type (might be due to invalid IL or missing references) return x@1(this.@this, mimicPlayer, audioStream, null).Item; } } [Serializable] internal sealed class mimicVoice@40-24 : FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, FSharpFunc<Unit, FSharpResult<Unit, string>>> { internal static readonly mimicVoice@40-24 @_instance = new mimicVoice@40-24(); [CompilerGenerated] [DebuggerNonUserCode] internal mimicVoice@40-24() { } 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@62-21 : FSharpFunc<Unit, FSharpAsync<object>> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public Lazy<FSharpAsync<object>> runMimicLoop; [CompilerGenerated] [DebuggerNonUserCode] internal clo@62-21(Lazy<FSharpAsync<object>> runMimicLoop) { this.runMimicLoop = runMimicLoop; } public override FSharpAsync<object> Invoke(Unit unitVar) { return runMimicLoop.Value; } } [Serializable] internal sealed class clo@61-22 : FSharpFunc<Unit, FSharpAsync<object>> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public FSharpAsync<object> computation2; [CompilerGenerated] [DebuggerNonUserCode] internal clo@61-22(FSharpAsync<object> computation2) { this.computation2 = computation2; } public override FSharpAsync<object> Invoke(Unit unitVar0) { return computation2; } } [Serializable] internal sealed class clo@61-23 : FSharpFunc<AsyncActivation<object>, AsyncReturn> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public FSharpAsync<Unit> computation1; [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public FSharpFunc<Unit, FSharpAsync<object>> part2; [CompilerGenerated] [DebuggerNonUserCode] internal clo@61-23(FSharpAsync<Unit> computation1, FSharpFunc<Unit, FSharpAsync<object>> part2) { this.computation1 = computation1; this.part2 = part2; } public override AsyncReturn Invoke(AsyncActivation<object> ctxt) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) return AsyncPrimitives.Bind<object, Unit>(ctxt, computation1, part2); } } [Serializable] internal sealed class clo@60-20 : FSharpFunc<Unit, FSharpAsync<object>> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public MimicVoice @this; [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public Lazy<FSharpAsync<object>> runMimicLoop; public int delay; [CompilerGenerated] [DebuggerNonUserCode] internal clo@60-20(MimicVoice @this, Lazy<FSharpAsync<object>> runMimicLoop, int delay) { this.@this = @this; this.runMimicLoop = runMimicLoop; this.delay = delay; } public override FSharpAsync<object> Invoke(Unit unitVar) { mimicVoice@35(this.@this, null); FSharpAsync<Unit> computation = FSharpAsync.Sleep(delay); FSharpAsync<object> computation2 = ExtraTopLevelOperators.DefaultAsyncBuilder.Delay<object>((FSharpFunc<Unit, FSharpAsync<object>>)new clo@62-21(runMimicLoop)); FSharpFunc<Unit, FSharpAsync<object>> part = new clo@61-22(computation2); return AsyncPrimitives.MakeAsync<object>((FSharpFunc<AsyncActivation<object>, AsyncReturn>)new clo@61-23(computation, part)); } } [Serializable] internal sealed class clo@56-19 : FSharpFunc<Unit, FSharpAsync<object>> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public MimicVoice @this; [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public Lazy<FSharpAsync<object>> runMimicLoop; [CompilerGenerated] [DebuggerNonUserCode] internal clo@56-19(MimicVoice @this, Lazy<FSharpAsync<object>> runMimicLoop) { this.@this = @this; this.runMimicLoop = runMimicLoop; } public override FSharpAsync<object> Invoke(Unit unitVar) { Mirage.Core.Config.SyncedConfig config = Mirage.Core.Config.getConfig(); int delay = this.@this.random.Next(config.mimicMinDelay@, config.mimicMaxDelay@ + 1); return ExtraTopLevelOperators.DefaultAsyncBuilder.Delay<object>((FSharpFunc<Unit, FSharpAsync<object>>)new clo@60-20(this.@this, runMimicLoop, delay)); } } [Serializable] internal sealed class clo@67-25 : FSharpFunc<Unit, FSharpAsync<object>> { public FSharpAsync<object> runMimicLoop; [CompilerGenerated] [DebuggerNonUserCode] internal clo@67-25(FSharpAsync<object> runMimicLoop) { this.runMimicLoop = runMimicLoop; } public override FSharpAsync<object> Invoke(Unit unitVar) { return runMimicLoop; } } [Serializable] internal sealed class clo@66-26 : FSharpFunc<Unit, FSharpAsync<object>> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public FSharpAsync<object> computation2; [CompilerGenerated] [DebuggerNonUserCode] internal clo@66-26(FSharpAsync<object> computation2) { this.computation2 = computation2; } public override FSharpAsync<object> Invoke(Unit unitVar0) { return computation2; } } [Serializable] internal sealed class clo@66-27 : FSharpFunc<AsyncActivation<object>, AsyncReturn> { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public FSharpAsync<Unit> computation1; [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] public FSharpFunc<Unit, FSharpAsync<object>> part2; [CompilerGenerated] [DebuggerNonUserCode] internal clo@66-27(FSharpAsync<Unit> computation1, FSharpFunc<Unit, FSharpAsync<object>> part2) { this.computation1 = computation1; this.part2 = part2; } public override AsyncReturn Invoke(AsyncActivation<object> ctxt) { //IL_0000: Unknown result type (might be due to invalid IL or missing references) return AsyncPrimitives.Bind<object, Unit>(ctxt, computation1, part2); } } [Serializable] internal sealed class clo@66-24 : FSharpFunc<Unit, FSharpAsync<object>> { public FSharpAsync<object> runMimicLoop; [CompilerGenerated] [DebuggerNonUserCode] internal clo@66-24(FSharpAsync<object> runMimicLoop) { this.runMimicLoop = runMimicLoop; } public override FSharpAsync<object> Invoke(Unit unitVar) { FSharpAsync<Unit> computation = FSharpAsync.Sleep(5000); FSharpAsync<object> computation2 = ExtraTopLevelOperators.DefaultAsyncBuilder.Delay<object>((FSharpFunc<Unit, FSharpAsync<object>>)new clo@67-25(runMimicLoop)); FSharpFunc<Unit, FSharpAsync<object>> part = new clo@66-26(computation2); return AsyncPrimitives.MakeAsync<object>((FSharpFunc<AsyncActivation<object>, AsyncReturn>)new clo@66-27(computation, part)); } } [CompilationMapping(/*Could not decode attribute arguments.*/)] internal static GameObject PlaybackPrefab { get { return <StartupCode$Mirage>.$Mirage.Unity.MimicVoice.PlaybackPrefab@18; } set { <StartupCode$Mirage>.$Mirage.Unity.MimicVoice.PlaybackPrefab@18 = value; } } internal static FSharpFunc<FSharpRef<FSharpOption<A>>, FSharpFunc<string, FSharpFunc<string, FSharpResult<A, string>>>> get<A>() { return (FSharpFunc<FSharpRef<FSharpOption<A>>, FSharpFunc<string, FSharpFunc<string, FSharpResult<A, string>>>>)(object)get@19-1<A>.@_instance; } internal static bool isMimicLocalPlayerMuted@103(Player mimickingPlayer, Mirage.Core.Config.SyncedConfig config, Unit unitVar0) { bool result = Mirage.Core.Config.getLocalConfig().LocalPlayerVolume@.Value == 0f; bool flag = config.muteLocalPlayerVoice@ && !mimickingPlayer.data.dead; if (HashCompare.GenericEqualityIntrinsic<Player>(mimickingPlayer, Player.localPlayer)) { if (flag) { return true; } return result; } return false; } [CompilerGenerated] internal static FSharpResult<Unit, string> f@1-45(AudioSource audioSource, Player mimickingPlayer, Mirage.Core.Config.SyncedConfig config, Unit unitVar0) { //IL_0016: Unknown result type (might be due to invalid IL or missing references) //IL_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) audioSource.mute = isMimicLocalPlayerMuted@103(mimickingPlayer, config, null); return FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, Unit>.InvokeFast<FSharpResult<Unit, string>>((FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, FSharpFunc<Unit, FSharpResult<Unit, string>>>)Update@109-3.@_instance, new Tuple<Return, FSharpResult<Unit, string>>(null, default(FSharpResult<Unit, string>)), (Unit)null); } [CompilerGenerated] internal static FSharpResult<Unit, string> k@1-18(AudioSource audioSource, MimicPlayer.MimicPlayer mimicPlayer) { //IL_001b: Unknown result type (might be due to invalid IL or missing references) //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Unknown result type (might be due to invalid IL or missing references) //IL_0087: 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_0095: 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_006f: Unknown result type (might be due to invalid IL or missing references) //IL_0077: Unknown result type (might be due to invalid IL or missing references) //IL_009b: Unknown result type (might be due to invalid IL or missing references) //IL_00a1: Unknown result type (might be due to invalid IL or missing references) //IL_00a7: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00cf: Unknown result type (might be due to invalid IL or missing references) FSharpOption<Player> mimickingPlayer = mimicPlayer.GetMimickingPlayer(); if (mimickingPlayer == null) { audioSource.mute = true; return FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, Unit>.InvokeFast<FSharpResult<Unit, string>>((FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, FSharpFunc<Unit, FSharpResult<Unit, string>>>)Update@98.@_instance, new Tuple<Return, FSharpResult<Unit, string>>(null, default(FSharpResult<Unit, string>)), (Unit)null); } FSharpOption<Player> val = mimickingPlayer; Player value = val.Value; Mirage.Core.Config.SyncedConfig config = Mirage.Core.Config.getConfig(); FSharpResult<Unit, string> val2; if (HashCompare.GenericEqualityIntrinsic<Player>(value, Player.localPlayer)) { audioSource.volume = Mirage.Core.Config.getLocalConfig().LocalPlayerVolume@.Value; val2 = FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, Unit>.InvokeFast<FSharpResult<Unit, string>>((FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, FSharpFunc<Unit, FSharpResult<Unit, string>>>)Update@102-1.@_instance, new Tuple<Return, FSharpResult<Unit, string>>(null, default(FSharpResult<Unit, string>)), (Unit)null); } else { val2 = FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, Unit>.InvokeFast<FSharpResult<Unit, string>>((FSharpFunc<Tuple<Return, FSharpResult<Unit, string>>, FSharpFunc<Unit, FSharpResult<Unit, string>>>)Update@101-2.@_instance, new Tuple<Return, FSharpResult<Unit, string>>(null, default(FSharpResult<Unit, string>)), (Unit)null); } FSharpResult<Unit, string> val3 = val2; Bind val4 = null; FSharpResult<Unit, string> val5 = default(FSharpResult<Unit, string>); if (val3.Tag != 0) { return FSharpResult<Unit, string>.NewError(val3.ErrorValue); } return f@1-45(audioSource, value, config, val3.ResultValue); } [CompilerGenerated] internal static FSharpResult<Unit, string> k@1-17(MimicVoice _, AudioSource audioSource) { //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_0015: 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_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) FSharpResult<MimicPlayer.MimicPlayer, string> val = _.getMimicPlayer.Invoke("Update"); Bind val2 = null; FSharpResult<Unit, string> val3 = default(FSharpResult<Unit, string>); if (val.Tag != 0) { return FSharpResult<Unit, string>.NewError(val.ErrorValue); } return k@1-18(audioSource, val.ResultValue); } [CompilerGenerated] internal static FSharpResult<Unit, string> k@1-16(MimicVoice _, AudioStream.AudioStream audioStream) { //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_0015: 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_001c: Unknown result type (might be due to invalid IL or missing references) //IL_0030: Unknown result type (might be due to invalid IL or missing references) //IL_003e: Unknown result type (might be due to invalid IL or missing references) FSharpResult<AudioSource, string> val = audioStream.getAudioSource.Invoke("GetAudioSource"); Bind val2 = null; FSharpResult<Unit, string> val3 = default(FSharpResult<Unit, string>); if (val.Tag != 0) { return FSharpResult<Unit, string>.NewError(val.ErrorValue); } return k@1-17(_, val.ResultValue); } [CompilerGenerated] internal static FSharpAsync<FSharpOption<Player>> func1@1(FSharpOption<Player> x) { return FSharpFunc<Tuple<Return, FSharpAsync<FSharpOption<Player>>>, FSharpOption<Player>>.InvokeFast<FSharpAsync<FSharpOption<Player>>>((FSharpFunc<Tuple<Return, FSharpAsync<FSharpOption<Player>>>, FSharpFunc<FSharpOption<Player>, FSharpAsync<FSharpOption<Player>>>>)mimicVoice@42-3.@_instance, new Tuple<Return, FSharpAsync<FSharpOption<Player>>>(null, null), x); } [CompilerGenerated] internal static OptionT<FSharpAsync<FSharpOption<Unit>>> f@1-47(MimicVoice @this, AudioStream.AudioStream audioStream, Player player, string recording) { //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0063: Unknown result type (might be due to invalid IL or missing references) //IL_006a: Unknown result type (might be due to invalid IL or missing references) //IL_002a: Unknown result type (might be due to invalid IL or missing references) //IL_0030: 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) if (IntrinsicFunctions.CheckThis<MimicVoice>(@this.self.contents).IsHost@) { audioStream.StreamAudioFromFile(recording); return FSharpFunc<Tuple<Return, OptionT<FSharpAsync<FSharpOption<Unit>>>>, Unit>.InvokeFast<OptionT<FSharpAsync<FSharpOption<Unit>>>>((FSharpFunc<Tuple<Return, OptionT<FSharpAsync<FSharpOption<Unit>>>>, FSharpFunc<Unit, OptionT<FSharpAsync<FSharpOption<Unit>>>>>)mimicVoice@46-4.@_instance, new Tuple<Return, OptionT<FSharpAsync<FSharpOption<Unit>>>>(null, default(OptionT<FSharpAsync<FSharpOption<Unit>>>)), (Unit)null); } audioStream.UploadAndStreamAudioFromFile(player.refs.view.ViewID, recording); return FSharpFunc<Tuple<Return, OptionT<FSharpAsync<FSharpOption<Unit>>>>, Unit>.InvokeFast<OptionT<FSharpAsync<FSharpOption<Unit>>>>((FSharpFunc<Tuple<Return, OptionT<FSharpAsync<FSharpOption<Unit>>>>, FSharpFunc<Unit, OptionT<FSharpAsync<FSharpOption<Unit>>>>>)mimicVoice@48-7.@_instance, new Tuple<Return, OptionT<FSharpAsync<FSharpOption<Unit>>>>(null, default(OptionT<FSharpAsync<FSharpOption<Unit>>>)), (Unit)null); } [CompilerGenerated] internal static OptionT<FSharpAsync<FSharpOption<Unit>>> f@1-46(MimicVoice @this, AudioStream.AudioStream audioStream, Player player) { //IL_005e: Unknown result type (might be due to invalid IL or missing references) //IL_0064: Unknown result type (might be due to invalid IL or missing references) //IL_006b: 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_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0025: Unknown result type (might be due to invalid IL or missing references) //IL_002b: Unknown result type (might be due to invalid IL or missing references) //IL_002d: 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) if (HashCompare.GenericEqualityIntrinsic<Player>(player, Player.localPlayer)) { OptionT<FSharpAsync<FSharpOption<string>>> val = OptionT<FSharpAsync<FSharpOption<string>>>.NewOptionT(Mirage.Core.Audio.Recording.getRecording(@this.recordingManager)); Bind val2 = null; OptionT<FSharpAsync<FSharpOption<Unit>>> val3 = default(OptionT<FSharpAsync<FSharpOption<Unit>>>); FSharpAsync<FSharpOption<string>> item = val.Item; FSharpFunc<FSharpOption<string>, FSharpAsync<FSharpOption<Unit>>> val4 = new mimicVoice@44-10(audioStream, player, @this); Bind val5 = null; FSharpAsync<FSharpOption<Unit>> val6 = null; return OptionT<FSharpAsync<FSharpOption<Unit>>>.NewOptionT(Bind.op_GreaterGreaterEquals<FSharpOption<string>, FSharpOption<Unit>>(item, val4)); } return FSharpFunc<Tuple<Return, OptionT<FSharpAsync<FSharpOption<Unit>>>>, Unit>.InvokeFast<OptionT<FSharpAsync<FSharpOption<Unit>>>>((FSharpFunc<Tuple<Return, OptionT<FSharpAsync<FSharpOption<Unit>>>>, FSharpFunc<Unit, OptionT<FSharpAsync<FSharpOption<Unit>>>>>)mimicVoice@43-12.@_instance, new Tuple<Return, OptionT<FSharpAsync<FSharpOption<Unit>>>>(null, default(OptionT<FSharpAsync<FSharpOption<Unit>>>)), (Unit)null); } [CompilerGenerated] internal static OptionT<FSharpAsync<FSharpOption<Unit>>> x@1-1(MimicVoice @this, MimicPlayer.MimicPlayer mimicPlayer, AudioStream.AudioStream audioStream, Unit unitVar) { //IL_0010: Unknown result type (might be due to invalid IL or missing references) //IL_0015: Unknown result type (might be due to invalid IL or missing references) //IL_001a: Unknown result type (might be due to invalid IL or missing references) //IL_0020: Unknown result type (might be due to invalid IL or missing references) //IL_0022: 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) FSharpOption<Player> mimickingPlayer = mimicPlayer.GetMimickingPlayer(); OptionT<FSharpAsync<FSharpOption<Player>>> val = OptionT<FSharpAsync<FSharpOption<Player>>>.NewOptionT(func1@1(mimickingPlayer)); Bind val2 = null; OptionT<FSharpAsync<FSharpOption<Unit>>> val3 = default(OptionT<FSharpAsync<FSharpOption<Unit>>>); FSharpAsync<FSharpOption<Player>> item = val.Item; FSharpFunc<FSharpOption<Player>, FSharpAsync<FSharpOption<Unit>>> val4 = new mimicVoice@42-15(audioStream, @this); Bind val5 = null; FSharpAsync<FSharpOption<Unit>> val6 = null; return OptionT<FSharpAsync<FSharpOption<Unit>>>.NewOptionT(Bind.op_GreaterGreaterEquals<FSharpOption<Player>, FSharpOption<Unit>>(item, val4)); } [CompilerGenerated] internal static OptionT<FSharpAsync<FSharpOption<Unit>>> catchHandler@1-1(Exception error) { //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_0044: Unknown result type (might be due to invalid IL or missing references) Mirage.Core.Logger.logError.Invoke(PrintfModule.PrintFormatToStringThen<string>((PrintfFormat<string, Unit, string, string>)(object)new PrintfFormat<string, Unit, string, string, Exception>("Failed to mimic voice: %P()", new object[1] { error }, (Type[])null))); return FSharpFunc<Tuple<Return, OptionT<FSharpAsync<FSharpOption<Unit>>>>, Unit>.InvokeFast<OptionT<FSharpAsync<FSharpOption<Unit>>>>((FSharpFunc<Tuple<Return, OptionT<FSharpAsync<FSharpOption<Unit>>>>, FSharpFunc<Unit, OptionT<FSharpAsync<FSharpOption<Unit>>>>>)mimicVoice@53-18.@_instance, new Tuple<Return, OptionT<FSharpAsync<FSharpOption<Unit>>>>(null, default(OptionT<FSharpAsync<FSharpOption<Unit>>>)), (Unit)null); } [CompilerGenerated] internal static OptionT<FSharpAsync<FSharpOption<Unit>>> x@1(MimicVoice @this, MimicPlayer.MimicPlayer mimicPlayer, AudioStream.AudioStream audioStream, Unit unitVar) { //IL_0022: 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_002d: 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_0035: 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) Default1 val = null; Delay val2 = null; FSharpFunc<Unit, FSharpAsync<FSharpOption<Unit>>> val3 = new mimicVoice@41-17(mimicPlayer, audioStream, @this); Delay val4 = null; Delay val5 = null; OptionT<FSharpAsync<FSharpOption<Unit>>> val6 = OptionT<FSharpAsync<FSharpOption<Unit>>>.NewOptionT(ExtraTopLevelOperators.DefaultAsyncBuilder.Delay<FSharpOption<Unit>>(val3)); TryWith val7 = null; OptionT<FSharpAsync<FSharpOption<Unit>>> val8 = default(OptionT<FSharpAsync<FSharpOption<Unit>>>); val = (Default1)(object)val7; FSharpAsync<FSharpOption<Unit>> item = val6.Item; FSharpFunc<Exception, FSharpAsync<FSharpOption<Unit>>> @_instance; @_instance = mimicVoice@41-21.@_instance; TryWith val9 = null; val3 = new mimicVoice@41-22(item); FSharpAsync<FSharpOption<Unit>> val10 = null; return OptionT<FSharpAsync<FSharpOption<Unit>>>.NewOptionT(TryWith.TryWith<FSharpOption<Unit>, False>(val3, @_instance, val9, False.False)); } [CompilerGenerated] internal static FSharpResult<Unit, string> k@1-20(MimicVoice @this, MimicPlayer.MimicPlayer mimicPlayer, AudioStream.AudioStream audioStream) { //IL_004f: 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_006c: Unknown result type (might be due to invalid IL or missing references) //IL_0072: Unknown result type (might be due to invalid IL or missing references) //IL_007a: Unknown result type (might be due to invalid IL or missing references) CancellationToken destroyCancellationToken = ((MonoBehaviour)IntrinsicFunctions.CheckThis<MimicVoice>(@this.self.contents)).destroyCancellationToken; FSharpFunc<FSharpAsync<FSharpOption<Unit>>, Unit> func = new mimicVoice@40-1(destroyCancellationToken); FSharpFunc<FSharpAsync<FSharpOption<Unit>>, Unit> val = new mimicVoice@40-2(func); MonadFxBuilder<OptionT<FSharpAsync<FSharpOption<Unit>>>> val2 = new MonadFxBuilder<OptionT<FSharpAsync<FSharpOption<Unit>>>>();