Decompiled source of BaboonAPI v2.9.0
BepInEx/plugins/BaboonAPI.dll
Decompiled 2 days 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.Globalization; using System.IO; using System.Reflection; using System.Reflection.Emit; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using System.Runtime.Serialization; using System.Runtime.Serialization.Formatters.Binary; using System.Runtime.Versioning; using System.Threading; using System.Threading.Tasks; using <StartupCode$BaboonAPI>; using <StartupCode$BaboonAPI>.$BaboonAPI.Internal; using <StartupCode$BaboonAPI>.$BaboonAPI.Utility; using BaboonAPI; using BaboonAPI.Event; using BaboonAPI.Hooks.Entrypoints; using BaboonAPI.Hooks.Initializer; using BaboonAPI.Hooks.Saves; using BaboonAPI.Hooks.Tracks; using BaboonAPI.Hooks.Tracks.Collections; using BaboonAPI.Internal; using BaboonAPI.Internal.BaseGame; using BaboonAPI.Internal.Tootmaker; using BaboonAPI.Patch; using BaboonAPI.Utility; using BepInEx; using BepInEx.Bootstrap; using BepInEx.Logging; using HarmonyLib; using Microsoft.FSharp.Collections; using Microsoft.FSharp.Control; using Microsoft.FSharp.Core; using Microsoft.FSharp.Core.CompilerServices; using Newtonsoft.Json; using Newtonsoft.Json.Linq; using Steamworks; using UnityEngine; using UnityEngine.Localization; using UnityEngine.Localization.Settings; using UnityEngine.Networking; using UnityEngine.UI; [assembly: FSharpInterfaceDataVersion(2, 0, 0)] [assembly: AssemblyCompany("TromboneChamps")] [assembly: AssemblyConfiguration("Release")] [assembly: AssemblyDescription("Trombone Champ modding API")] [assembly: AssemblyFileVersion("2.9.0.0")] [assembly: AssemblyInformationalVersion("2.9.0+69086e8f2d1d4e76a037b4fda1e2995324cf7c3c")] [assembly: AssemblyProduct("BaboonAPI")] [assembly: AssemblyTitle("BaboonAPI")] [assembly: AssemblyMetadata("RepositoryUrl", "https://github.com/tc-mods/BaboonAPI/")] [assembly: TargetFramework(".NETFramework,Version=v4.7.2", FrameworkDisplayName = ".NET Framework 4.7.2")] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: AssemblyVersion("2.9.0.0")] namespace BaboonAPI.Event { [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] public interface Event<T> { T invoker { get; } virtual void Register(T P_0); virtual void Unregister(T P_0); } [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] public class EventFactory<T> : Event<T> { internal FSharpFunc<FSharpList<T>, T> reducer; internal FSharpList<T> handlers; public EventFactory(FSharpFunc<FSharpList<T>, T> reducer) { this.reducer = reducer; handlers = FSharpList<T>.Empty; } public static Event<T> create(FSharpFunc<FSharpList<T>, T> reducer) { return new EventFactory<T>(reducer); } [SpecialName] virtual T Event<T>.get_invoker() { return ((FSharpFunc<FSharpList<FSharpList<T>>, FSharpList<T>>)(object)reducer).Invoke((FSharpList<FSharpList<T>>)(object)handlers); } virtual void Event<T>.Register(T handler) { handlers = FSharpList<T>.Cons(handler, handlers); } virtual void Event<T>.Unregister(T handler) { handlers = ListModule.Filter<T>((FSharpFunc<T, bool>)new $EventBus.BaboonAPI-Event-Event<'T>-Unregister@18<T>(handler), handlers); } } } namespace BaboonAPI.Hooks.Tracks { [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] public sealed class TrackAudio : IEquatable<TrackAudio>, IStructuralEquatable { [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal AudioClip Clip@; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal float Volume@; [CompilationMapping(/*Could not decode attribute arguments.*/)] public AudioClip Clip { [CompilerGenerated] [DebuggerNonUserCode] get { return Clip@; } } [CompilationMapping(/*Could not decode attribute arguments.*/)] public float Volume { [CompilerGenerated] [DebuggerNonUserCode] get { return Volume@; } } [DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(TrackAudio))] public TrackAudio(AudioClip clip, float volume) { Clip@ = clip; Volume@ = volume; } [CompilerGenerated] public override string ToString() { return ExtraTopLevelOperators.PrintFormatToString<FSharpFunc<TrackAudio, string>>((PrintfFormat<FSharpFunc<TrackAudio, string>, Unit, string, string>)(object)new PrintfFormat<FSharpFunc<TrackAudio, string>, Unit, string, string, TrackAudio>("%+A")).Invoke(this); } [CompilerGenerated] public sealed int GetHashCode(IEqualityComparer comp) { if (this != null) { int num = 0; num = -1640531527 + (HashCompare.GenericHashWithComparerIntrinsic<float>(comp, Volume@) + ((num << 6) + (num >> 2))); return -1640531527 + (HashCompare.GenericHashWithComparerIntrinsic<AudioClip>(comp, Clip@) + ((num << 6) + (num >> 2))); } return 0; } [CompilerGenerated] public sealed override int GetHashCode() { return GetHashCode(LanguagePrimitives.GenericEqualityComparer); } [CompilerGenerated] public bool Equals(TrackAudio obj, IEqualityComparer comp) { if (this != null) { if (obj != null) { if (HashCompare.GenericEqualityWithComparerIntrinsic<AudioClip>(comp, Clip@, obj.Clip@)) { return Volume@ == obj.Volume@; } return false; } return false; } return obj == null; } [CompilerGenerated] public sealed bool Equals(object obj, IEqualityComparer comp) { if (obj is TrackAudio obj2) { return Equals(obj2, comp); } return false; } [CompilerGenerated] public sealed bool Equals(TrackAudio obj) { if (this != null) { if (obj != null) { if (HashCompare.GenericEqualityERIntrinsic<AudioClip>(Clip@, obj.Clip@)) { float volume@ = Volume@; float volume@2 = obj.Volume@; if (volume@ == volume@2) { return true; } if (volume@ != volume@) { return volume@2 != volume@2; } return false; } return false; } return false; } return obj == null; } [CompilerGenerated] public sealed override bool Equals(object obj) { if (obj is TrackAudio obj2) { return Equals(obj2); } return false; } } [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] public class BackgroundContext { internal GameController controller@23; public GameController controller => controller@23; public BackgroundContext(GameController controller) { controller@23 = controller; } } [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] public interface LoadedTromboneTrack : IDisposable { string trackref { get; } virtual TrackAudio LoadAudio(); virtual GameObject LoadBackground(BackgroundContext ctx); [CompilationArgumentCounts(new int[] { 1, 1 })] virtual void SetUpBackgroundDelayed(BGController controller, GameObject bg); } [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] public interface TromboneTrack { string trackref { get; } string trackname_long { get; } string trackname_short { get; } string year { get; } string artist { get; } string desc { get; } string genre { get; } int difficulty { get; } int tempo { get; } int length { get; } virtual SavedLevel LoadChart(); virtual LoadedTromboneTrack LoadTrack(); virtual bool IsVisible(); } [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] public class PauseContext { internal PauseCanvasController controller; public GameController gameController => controller.gc; public BGController backgroundController => controller.gc.bgcontroller; public GameObject backgroundObj => controller.gc.bgcontroller.fullbgobject; public PauseContext(PauseCanvasController controller) { this.controller = controller; } } [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] public interface PauseAware { bool CanResume { get; } virtual void OnPause(PauseContext P_0); virtual void OnResume(PauseContext P_0); } [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] public interface AsyncAudioAware { virtual BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<TrackAudio, string>> LoadAudio(); } [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] public interface Previewable { virtual BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<TrackAudio, string>> LoadClip(); } [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] public interface Sortable { int sortOrder { get; } } [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] public interface FilesystemTrack { string folderPath { get; } } [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] public sealed class SongGraph : IEquatable<SongGraph>, IStructuralEquatable, IComparable<SongGraph>, IComparable, IStructuralComparable { [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal int fury@; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal int tears@; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal int spunk@; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal int doots@; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal int slides@; [CompilationMapping(/*Could not decode attribute arguments.*/)] public int fury { [CompilerGenerated] [DebuggerNonUserCode] get { return fury@; } } [CompilationMapping(/*Could not decode attribute arguments.*/)] public int tears { [CompilerGenerated] [DebuggerNonUserCode] get { return tears@; } } [CompilationMapping(/*Could not decode attribute arguments.*/)] public int spunk { [CompilerGenerated] [DebuggerNonUserCode] get { return spunk@; } } [CompilationMapping(/*Could not decode attribute arguments.*/)] public int doots { [CompilerGenerated] [DebuggerNonUserCode] get { return doots@; } } [CompilationMapping(/*Could not decode attribute arguments.*/)] public int slides { [CompilerGenerated] [DebuggerNonUserCode] get { return slides@; } } public int[] asArray => new int[5] { fury@, tears@, spunk@, doots@, slides@ }; [DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(SongGraph))] public SongGraph(int fury, int tears, int spunk, int doots, int slides) { fury@ = fury; tears@ = tears; spunk@ = spunk; doots@ = doots; slides@ = slides; } [CompilerGenerated] public override string ToString() { return ExtraTopLevelOperators.PrintFormatToString<FSharpFunc<SongGraph, string>>((PrintfFormat<FSharpFunc<SongGraph, string>, Unit, string, string>)(object)new PrintfFormat<FSharpFunc<SongGraph, string>, Unit, string, string, SongGraph>("%+A")).Invoke(this); } [CompilerGenerated] public sealed int CompareTo(SongGraph obj) { if (this != null) { if (obj != null) { IComparer genericComparer = LanguagePrimitives.GenericComparer; int num = fury@; int num2 = obj.fury@; int num3 = ((num > num2) ? 1 : 0) - ((num < num2) ? 1 : 0); if (num3 < 0) { return num3; } if (num3 > 0) { return num3; } return $TrackRegistry.CompareTo$cont@117(this, obj, null); } return 1; } if (obj != null) { return -1; } return 0; } [CompilerGenerated] public sealed int CompareTo(object obj) { return CompareTo((SongGraph)obj); } [CompilerGenerated] public sealed int CompareTo(object obj, IComparer comp) { SongGraph songGraph = (SongGraph)obj; if (this != null) { if ((SongGraph)obj != null) { int num = fury@; int num2 = songGraph.fury@; int num3 = ((num > num2) ? 1 : 0) - ((num < num2) ? 1 : 0); if (num3 < 0) { return num3; } if (num3 > 0) { return num3; } return $TrackRegistry.CompareTo$cont@117-1(this, songGraph, null); } return 1; } if ((SongGraph)obj != null) { return -1; } return 0; } [CompilerGenerated] public sealed int GetHashCode(IEqualityComparer comp) { if (this != null) { int num = 0; num = -1640531527 + (slides@ + ((num << 6) + (num >> 2))); num = -1640531527 + (doots@ + ((num << 6) + (num >> 2))); num = -1640531527 + (spunk@ + ((num << 6) + (num >> 2))); num = -1640531527 + (tears@ + ((num << 6) + (num >> 2))); return -1640531527 + (fury@ + ((num << 6) + (num >> 2))); } return 0; } [CompilerGenerated] public sealed override int GetHashCode() { return GetHashCode(LanguagePrimitives.GenericEqualityComparer); } [CompilerGenerated] public bool Equals(SongGraph obj, IEqualityComparer comp) { if (this != null) { if (obj != null) { if (fury@ == obj.fury@) { if (tears@ == obj.tears@) { if (spunk@ == obj.spunk@) { if (doots@ == obj.doots@) { return slides@ == obj.slides@; } return false; } return false; } return false; } return false; } return false; } return obj == null; } [CompilerGenerated] public sealed bool Equals(object obj, IEqualityComparer comp) { if (obj is SongGraph obj2) { return Equals(obj2, comp); } return false; } public static SongGraph all(int value) { return new SongGraph(value, value, value, value, value); } [CompilerGenerated] public sealed bool Equals(SongGraph obj) { if (this != null) { if (obj != null) { if (fury@ == obj.fury@) { if (tears@ == obj.tears@) { if (spunk@ == obj.spunk@) { if (doots@ == obj.doots@) { return slides@ == obj.slides@; } return false; } return false; } return false; } return false; } return false; } return obj == null; } [CompilerGenerated] public sealed override bool Equals(object obj) { if (obj is SongGraph obj2) { return Equals(obj2); } return false; } } [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] public interface Graphable { virtual FSharpOption<SongGraph> CreateGraph(); } [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] public interface TromboneCollection { IEnumerable<TromboneTrack> tracks { get; } string unique_id { get; } string name { get; } string description { get; } virtual BaboonAPI.Utility.Coroutines.YieldTask<TrackCollection> Resolve(int index); } [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] public sealed class ProgressUpdate : IEquatable<ProgressUpdate>, IStructuralEquatable, IComparable<ProgressUpdate>, IComparable, IStructuralComparable { [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal int loaded@; [CompilationMapping(/*Could not decode attribute arguments.*/)] public int loaded { [CompilerGenerated] [DebuggerNonUserCode] get { return loaded@; } } [DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(ProgressUpdate))] public ProgressUpdate(int loaded) { loaded@ = loaded; } [CompilerGenerated] public override string ToString() { return ExtraTopLevelOperators.PrintFormatToString<FSharpFunc<ProgressUpdate, string>>((PrintfFormat<FSharpFunc<ProgressUpdate, string>, Unit, string, string>)(object)new PrintfFormat<FSharpFunc<ProgressUpdate, string>, Unit, string, string, ProgressUpdate>("%+A")).Invoke(this); } [CompilerGenerated] public sealed int CompareTo(ProgressUpdate obj) { if (this != null) { if (obj != null) { IComparer genericComparer = LanguagePrimitives.GenericComparer; int num = loaded@; int num2 = obj.loaded@; return ((num > num2) ? 1 : 0) - ((num < num2) ? 1 : 0); } return 1; } if (obj != null) { return -1; } return 0; } [CompilerGenerated] public sealed int CompareTo(object obj) { return CompareTo((ProgressUpdate)obj); } [CompilerGenerated] public sealed int CompareTo(object obj, IComparer comp) { ProgressUpdate progressUpdate = (ProgressUpdate)obj; if (this != null) { if ((ProgressUpdate)obj != null) { int num = loaded@; int num2 = progressUpdate.loaded@; return ((num > num2) ? 1 : 0) - ((num < num2) ? 1 : 0); } return 1; } if ((ProgressUpdate)obj != null) { return -1; } return 0; } [CompilerGenerated] public sealed int GetHashCode(IEqualityComparer comp) { if (this != null) { int num = 0; return -1640531527 + (loaded@ + ((num << 6) + (num >> 2))); } return 0; } [CompilerGenerated] public sealed override int GetHashCode() { return GetHashCode(LanguagePrimitives.GenericEqualityComparer); } [CompilerGenerated] public bool Equals(ProgressUpdate obj, IEqualityComparer comp) { if (this != null) { if (obj != null) { return loaded@ == obj.loaded@; } return false; } return obj == null; } [CompilerGenerated] public sealed bool Equals(object obj, IEqualityComparer comp) { if (obj is ProgressUpdate obj2) { return Equals(obj2, comp); } return false; } [CompilerGenerated] public sealed bool Equals(ProgressUpdate obj) { if (this != null) { if (obj != null) { return loaded@ == obj.loaded@; } return false; } return obj == null; } [CompilerGenerated] public sealed override bool Equals(object obj) { if (obj is ProgressUpdate obj2) { return Equals(obj2); } return false; } } [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] public sealed class TracksLoadedInfo : IEquatable<TracksLoadedInfo>, IStructuralEquatable, IComparable<TracksLoadedInfo>, IComparable, IStructuralComparable { [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal int totalTracks@; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal int totalCollections@; [CompilationMapping(/*Could not decode attribute arguments.*/)] public int totalTracks { [CompilerGenerated] [DebuggerNonUserCode] get { return totalTracks@; } } [CompilationMapping(/*Could not decode attribute arguments.*/)] public int totalCollections { [CompilerGenerated] [DebuggerNonUserCode] get { return totalCollections@; } } [DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(TracksLoadedInfo))] public TracksLoadedInfo(int totalTracks, int totalCollections) { totalTracks@ = totalTracks; totalCollections@ = totalCollections; } [CompilerGenerated] public override string ToString() { return ExtraTopLevelOperators.PrintFormatToString<FSharpFunc<TracksLoadedInfo, string>>((PrintfFormat<FSharpFunc<TracksLoadedInfo, string>, Unit, string, string>)(object)new PrintfFormat<FSharpFunc<TracksLoadedInfo, string>, Unit, string, string, TracksLoadedInfo>("%+A")).Invoke(this); } [CompilerGenerated] public sealed int CompareTo(TracksLoadedInfo obj) { if (this != null) { if (obj != null) { IComparer genericComparer = LanguagePrimitives.GenericComparer; int num = totalTracks@; int num2 = obj.totalTracks@; int num3 = ((num > num2) ? 1 : 0) - ((num < num2) ? 1 : 0); if (num3 < 0) { return num3; } if (num3 > 0) { return num3; } genericComparer = LanguagePrimitives.GenericComparer; num = totalCollections@; num2 = obj.totalCollections@; return ((num > num2) ? 1 : 0) - ((num < num2) ? 1 : 0); } return 1; } if (obj != null) { return -1; } return 0; } [CompilerGenerated] public sealed int CompareTo(object obj) { return CompareTo((TracksLoadedInfo)obj); } [CompilerGenerated] public sealed int CompareTo(object obj, IComparer comp) { TracksLoadedInfo tracksLoadedInfo = (TracksLoadedInfo)obj; if (this != null) { if ((TracksLoadedInfo)obj != null) { int num = totalTracks@; int num2 = tracksLoadedInfo.totalTracks@; int num3 = ((num > num2) ? 1 : 0) - ((num < num2) ? 1 : 0); if (num3 < 0) { return num3; } if (num3 > 0) { return num3; } num = totalCollections@; num2 = tracksLoadedInfo.totalCollections@; return ((num > num2) ? 1 : 0) - ((num < num2) ? 1 : 0); } return 1; } if ((TracksLoadedInfo)obj != null) { return -1; } return 0; } [CompilerGenerated] public sealed int GetHashCode(IEqualityComparer comp) { if (this != null) { int num = 0; num = -1640531527 + (totalCollections@ + ((num << 6) + (num >> 2))); return -1640531527 + (totalTracks@ + ((num << 6) + (num >> 2))); } return 0; } [CompilerGenerated] public sealed override int GetHashCode() { return GetHashCode(LanguagePrimitives.GenericEqualityComparer); } [CompilerGenerated] public bool Equals(TracksLoadedInfo obj, IEqualityComparer comp) { if (this != null) { if (obj != null) { if (totalTracks@ == obj.totalTracks@) { return totalCollections@ == obj.totalCollections@; } return false; } return false; } return obj == null; } [CompilerGenerated] public sealed bool Equals(object obj, IEqualityComparer comp) { if (obj is TracksLoadedInfo obj2) { return Equals(obj2, comp); } return false; } [CompilerGenerated] public sealed bool Equals(TracksLoadedInfo obj) { if (this != null) { if (obj != null) { if (totalTracks@ == obj.totalTracks@) { return totalCollections@ == obj.totalCollections@; } return false; } return false; } return obj == null; } [CompilerGenerated] public sealed override bool Equals(object obj) { if (obj is TracksLoadedInfo obj2) { return Equals(obj2); } return false; } } [Serializable] [StructLayout(LayoutKind.Auto, CharSet = CharSet.Auto)] [DebuggerDisplay("{__DebugDisplay(),nq}")] [CompilationMapping(/*Could not decode attribute arguments.*/)] public abstract class Progress : IEquatable<Progress>, IStructuralEquatable, IComparable<Progress>, IComparable, IStructuralComparable { public static class Tags { public const int LoadingTracks = 0; public const int LoadingCollections = 1; public const int FirstStageDone = 2; public const int ResolvingCollections = 3; public const int SecondStageDone = 4; } [Serializable] [SpecialName] [DebuggerTypeProxy(typeof(LoadingTracks@DebugTypeProxy))] [DebuggerDisplay("{__DebugDisplay(),nq}")] public class LoadingTracks : Progress { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] internal readonly ProgressUpdate item; [CompilationMapping(/*Could not decode attribute arguments.*/)] [CompilerGenerated] [DebuggerNonUserCode] public ProgressUpdate Item { [CompilerGenerated] [DebuggerNonUserCode] get { return item; } } [DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(Progress))] [CompilerGenerated] [DebuggerNonUserCode] internal LoadingTracks(ProgressUpdate item) : base(0) { this.item = item; } } [Serializable] [SpecialName] [DebuggerTypeProxy(typeof(LoadingCollections@DebugTypeProxy))] [DebuggerDisplay("{__DebugDisplay(),nq}")] public class LoadingCollections : Progress { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] internal readonly ProgressUpdate item; [CompilationMapping(/*Could not decode attribute arguments.*/)] [CompilerGenerated] [DebuggerNonUserCode] public ProgressUpdate Item { [CompilerGenerated] [DebuggerNonUserCode] get { return item; } } [DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(Progress))] [CompilerGenerated] [DebuggerNonUserCode] internal LoadingCollections(ProgressUpdate item) : base(1) { this.item = item; } } [Serializable] [SpecialName] [DebuggerTypeProxy(typeof(FirstStageDone@DebugTypeProxy))] [DebuggerDisplay("{__DebugDisplay(),nq}")] public class FirstStageDone : Progress { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] internal readonly TracksLoadedInfo item; [CompilationMapping(/*Could not decode attribute arguments.*/)] [CompilerGenerated] [DebuggerNonUserCode] public TracksLoadedInfo Item { [CompilerGenerated] [DebuggerNonUserCode] get { return item; } } [DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(Progress))] [CompilerGenerated] [DebuggerNonUserCode] internal FirstStageDone(TracksLoadedInfo item) : base(2) { this.item = item; } } [Serializable] [SpecialName] [DebuggerTypeProxy(typeof(ResolvingCollections@DebugTypeProxy))] [DebuggerDisplay("{__DebugDisplay(),nq}")] public class ResolvingCollections : Progress { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] internal readonly ProgressUpdate item; [CompilationMapping(/*Could not decode attribute arguments.*/)] [CompilerGenerated] [DebuggerNonUserCode] public ProgressUpdate Item { [CompilerGenerated] [DebuggerNonUserCode] get { return item; } } [DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(Progress))] [CompilerGenerated] [DebuggerNonUserCode] internal ResolvingCollections(ProgressUpdate item) : base(3) { this.item = item; } } [Serializable] [SpecialName] [DebuggerTypeProxy(typeof(SecondStageDone@DebugTypeProxy))] [DebuggerDisplay("{__DebugDisplay(),nq}")] public class SecondStageDone : Progress { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] internal readonly ProgressUpdate item; [CompilationMapping(/*Could not decode attribute arguments.*/)] [CompilerGenerated] [DebuggerNonUserCode] public ProgressUpdate Item { [CompilerGenerated] [DebuggerNonUserCode] get { return item; } } [DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(Progress))] [CompilerGenerated] [DebuggerNonUserCode] internal SecondStageDone(ProgressUpdate item) : base(4) { this.item = item; } } [SpecialName] internal class LoadingTracks@DebugTypeProxy { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] internal LoadingTracks _obj; [CompilationMapping(/*Could not decode attribute arguments.*/)] [CompilerGenerated] [DebuggerNonUserCode] public ProgressUpdate Item { [CompilerGenerated] [DebuggerNonUserCode] get { return _obj.item; } } [DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(Progress))] [CompilerGenerated] [DebuggerNonUserCode] public LoadingTracks@DebugTypeProxy(LoadingTracks obj) { _obj = obj; } } [SpecialName] internal class LoadingCollections@DebugTypeProxy { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] internal LoadingCollections _obj; [CompilationMapping(/*Could not decode attribute arguments.*/)] [CompilerGenerated] [DebuggerNonUserCode] public ProgressUpdate Item { [CompilerGenerated] [DebuggerNonUserCode] get { return _obj.item; } } [DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(Progress))] [CompilerGenerated] [DebuggerNonUserCode] public LoadingCollections@DebugTypeProxy(LoadingCollections obj) { _obj = obj; } } [SpecialName] internal class FirstStageDone@DebugTypeProxy { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] internal FirstStageDone _obj; [CompilationMapping(/*Could not decode attribute arguments.*/)] [CompilerGenerated] [DebuggerNonUserCode] public TracksLoadedInfo Item { [CompilerGenerated] [DebuggerNonUserCode] get { return _obj.item; } } [DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(Progress))] [CompilerGenerated] [DebuggerNonUserCode] public FirstStageDone@DebugTypeProxy(FirstStageDone obj) { _obj = obj; } } [SpecialName] internal class ResolvingCollections@DebugTypeProxy { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] internal ResolvingCollections _obj; [CompilationMapping(/*Could not decode attribute arguments.*/)] [CompilerGenerated] [DebuggerNonUserCode] public ProgressUpdate Item { [CompilerGenerated] [DebuggerNonUserCode] get { return _obj.item; } } [DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(Progress))] [CompilerGenerated] [DebuggerNonUserCode] public ResolvingCollections@DebugTypeProxy(ResolvingCollections obj) { _obj = obj; } } [SpecialName] internal class SecondStageDone@DebugTypeProxy { [DebuggerBrowsable(DebuggerBrowsableState.Never)] [CompilerGenerated] [DebuggerNonUserCode] internal SecondStageDone _obj; [CompilationMapping(/*Could not decode attribute arguments.*/)] [CompilerGenerated] [DebuggerNonUserCode] public ProgressUpdate Item { [CompilerGenerated] [DebuggerNonUserCode] get { return _obj.item; } } [DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(Progress))] [CompilerGenerated] [DebuggerNonUserCode] public SecondStageDone@DebugTypeProxy(SecondStageDone obj) { _obj = obj; } } [CompilerGenerated] [DebuggerNonUserCode] [DebuggerBrowsable(DebuggerBrowsableState.Never)] [field: DebuggerNonUserCode] public int Tag { [DebuggerNonUserCode] get; } [CompilerGenerated] [DebuggerNonUserCode] [DebuggerBrowsable(DebuggerBrowsableState.Never)] public bool IsLoadingTracks { [CompilerGenerated] [DebuggerNonUserCode] get { return Tag == 0; } } [CompilerGenerated] [DebuggerNonUserCode] [DebuggerBrowsable(DebuggerBrowsableState.Never)] public bool IsLoadingCollections { [CompilerGenerated] [DebuggerNonUserCode] get { return Tag == 1; } } [CompilerGenerated] [DebuggerNonUserCode] [DebuggerBrowsable(DebuggerBrowsableState.Never)] public bool IsFirstStageDone { [CompilerGenerated] [DebuggerNonUserCode] get { return Tag == 2; } } [CompilerGenerated] [DebuggerNonUserCode] [DebuggerBrowsable(DebuggerBrowsableState.Never)] public bool IsResolvingCollections { [CompilerGenerated] [DebuggerNonUserCode] get { return Tag == 3; } } [CompilerGenerated] [DebuggerNonUserCode] [DebuggerBrowsable(DebuggerBrowsableState.Never)] public bool IsSecondStageDone { [CompilerGenerated] [DebuggerNonUserCode] get { return Tag == 4; } } [DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicNestedTypes | DynamicallyAccessedMemberTypes.NonPublicNestedTypes | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(Progress))] [CompilerGenerated] [DebuggerNonUserCode] internal Progress(int _tag) { this._tag = _tag; } [CompilationMapping(/*Could not decode attribute arguments.*/)] public static Progress NewLoadingTracks(ProgressUpdate item) { return new LoadingTracks(item); } [CompilationMapping(/*Could not decode attribute arguments.*/)] public static Progress NewLoadingCollections(ProgressUpdate item) { return new LoadingCollections(item); } [CompilationMapping(/*Could not decode attribute arguments.*/)] public static Progress NewFirstStageDone(TracksLoadedInfo item) { return new FirstStageDone(item); } [CompilationMapping(/*Could not decode attribute arguments.*/)] public static Progress NewResolvingCollections(ProgressUpdate item) { return new ResolvingCollections(item); } [CompilationMapping(/*Could not decode attribute arguments.*/)] public static Progress NewSecondStageDone(ProgressUpdate item) { return new SecondStageDone(item); } [SpecialName] [CompilerGenerated] [DebuggerNonUserCode] internal object __DebugDisplay() { return ExtraTopLevelOperators.PrintFormatToString<FSharpFunc<Progress, string>>((PrintfFormat<FSharpFunc<Progress, string>, Unit, string, string>)(object)new PrintfFormat<FSharpFunc<Progress, string>, Unit, string, string, string>("%+0.8A")).Invoke(this); } [CompilerGenerated] public override string ToString() { return ExtraTopLevelOperators.PrintFormatToString<FSharpFunc<Progress, string>>((PrintfFormat<FSharpFunc<Progress, string>, Unit, string, string>)(object)new PrintfFormat<FSharpFunc<Progress, string>, Unit, string, string, Progress>("%+A")).Invoke(this); } [CompilerGenerated] public virtual sealed int CompareTo(Progress obj) { if (this != null) { if (obj != null) { int tag = _tag; int tag2 = obj._tag; if (tag == tag2) { switch (Tag) { default: { LoadingTracks loadingTracks = (LoadingTracks)this; LoadingTracks loadingTracks2 = (LoadingTracks)obj; IComparer genericComparer = LanguagePrimitives.GenericComparer; ProgressUpdate item = loadingTracks.item; ProgressUpdate item2 = loadingTracks2.item; return item.CompareTo(item2, genericComparer); } case 1: { LoadingCollections loadingCollections = (LoadingCollections)this; LoadingCollections loadingCollections2 = (LoadingCollections)obj; IComparer genericComparer = LanguagePrimitives.GenericComparer; ProgressUpdate item = loadingCollections.item; ProgressUpdate item2 = loadingCollections2.item; return item.CompareTo(item2, genericComparer); } case 2: { FirstStageDone firstStageDone = (FirstStageDone)this; FirstStageDone firstStageDone2 = (FirstStageDone)obj; IComparer genericComparer = LanguagePrimitives.GenericComparer; TracksLoadedInfo item3 = firstStageDone.item; TracksLoadedInfo item4 = firstStageDone2.item; return item3.CompareTo(item4, genericComparer); } case 3: { ResolvingCollections resolvingCollections = (ResolvingCollections)this; ResolvingCollections resolvingCollections2 = (ResolvingCollections)obj; IComparer genericComparer = LanguagePrimitives.GenericComparer; ProgressUpdate item = resolvingCollections.item; ProgressUpdate item2 = resolvingCollections2.item; return item.CompareTo(item2, genericComparer); } case 4: { SecondStageDone secondStageDone = (SecondStageDone)this; SecondStageDone secondStageDone2 = (SecondStageDone)obj; IComparer genericComparer = LanguagePrimitives.GenericComparer; ProgressUpdate item = secondStageDone.item; ProgressUpdate item2 = secondStageDone2.item; return item.CompareTo(item2, genericComparer); } } } return tag - tag2; } return 1; } if (obj != null) { return -1; } return 0; } [CompilerGenerated] public virtual sealed int CompareTo(object obj) { return CompareTo((Progress)obj); } [CompilerGenerated] public virtual sealed int CompareTo(object obj, IComparer comp) { Progress progress = (Progress)obj; if (this != null) { if ((Progress)obj != null) { int tag = _tag; int tag2 = progress._tag; if (tag == tag2) { switch (Tag) { default: { LoadingTracks loadingTracks = (LoadingTracks)this; LoadingTracks loadingTracks2 = (LoadingTracks)progress; ProgressUpdate item = loadingTracks.item; ProgressUpdate item2 = loadingTracks2.item; return item.CompareTo(item2, comp); } case 1: { LoadingCollections loadingCollections = (LoadingCollections)this; LoadingCollections loadingCollections2 = (LoadingCollections)progress; ProgressUpdate item = loadingCollections.item; ProgressUpdate item2 = loadingCollections2.item; return item.CompareTo(item2, comp); } case 2: { FirstStageDone firstStageDone = (FirstStageDone)this; FirstStageDone firstStageDone2 = (FirstStageDone)progress; TracksLoadedInfo item3 = firstStageDone.item; TracksLoadedInfo item4 = firstStageDone2.item; return item3.CompareTo(item4, comp); } case 3: { ResolvingCollections resolvingCollections = (ResolvingCollections)this; ResolvingCollections resolvingCollections2 = (ResolvingCollections)progress; ProgressUpdate item = resolvingCollections.item; ProgressUpdate item2 = resolvingCollections2.item; return item.CompareTo(item2, comp); } case 4: { SecondStageDone secondStageDone = (SecondStageDone)this; SecondStageDone secondStageDone2 = (SecondStageDone)progress; ProgressUpdate item = secondStageDone.item; ProgressUpdate item2 = secondStageDone2.item; return item.CompareTo(item2, comp); } } } return tag - tag2; } return 1; } if ((Progress)obj != null) { return -1; } return 0; } [CompilerGenerated] public virtual sealed int GetHashCode(IEqualityComparer comp) { if (this != null) { int num = 0; switch (Tag) { default: { LoadingTracks loadingTracks = (LoadingTracks)this; num = 0; return -1640531527 + (loadingTracks.item.GetHashCode(comp) + ((num << 6) + (num >> 2))); } case 1: { LoadingCollections loadingCollections = (LoadingCollections)this; num = 1; return -1640531527 + (loadingCollections.item.GetHashCode(comp) + ((num << 6) + (num >> 2))); } case 2: { FirstStageDone firstStageDone = (FirstStageDone)this; num = 2; return -1640531527 + (firstStageDone.item.GetHashCode(comp) + ((num << 6) + (num >> 2))); } case 3: { ResolvingCollections resolvingCollections = (ResolvingCollections)this; num = 3; return -1640531527 + (resolvingCollections.item.GetHashCode(comp) + ((num << 6) + (num >> 2))); } case 4: { SecondStageDone secondStageDone = (SecondStageDone)this; num = 4; return -1640531527 + (secondStageDone.item.GetHashCode(comp) + ((num << 6) + (num >> 2))); } } } return 0; } [CompilerGenerated] public sealed override int GetHashCode() { return GetHashCode(LanguagePrimitives.GenericEqualityComparer); } [CompilerGenerated] public bool Equals(Progress obj, IEqualityComparer comp) { if (this != null) { if (obj != null) { int tag = _tag; int tag2 = obj._tag; if (tag == tag2) { switch (Tag) { default: { LoadingTracks loadingTracks = (LoadingTracks)this; LoadingTracks loadingTracks2 = (LoadingTracks)obj; ProgressUpdate item = loadingTracks.item; ProgressUpdate item2 = loadingTracks2.item; return item.Equals(item2, comp); } case 1: { LoadingCollections loadingCollections = (LoadingCollections)this; LoadingCollections loadingCollections2 = (LoadingCollections)obj; ProgressUpdate item = loadingCollections.item; ProgressUpdate item2 = loadingCollections2.item; return item.Equals(item2, comp); } case 2: { FirstStageDone firstStageDone = (FirstStageDone)this; FirstStageDone firstStageDone2 = (FirstStageDone)obj; TracksLoadedInfo item3 = firstStageDone.item; TracksLoadedInfo item4 = firstStageDone2.item; return item3.Equals(item4, comp); } case 3: { ResolvingCollections resolvingCollections = (ResolvingCollections)this; ResolvingCollections resolvingCollections2 = (ResolvingCollections)obj; ProgressUpdate item = resolvingCollections.item; ProgressUpdate item2 = resolvingCollections2.item; return item.Equals(item2, comp); } case 4: { SecondStageDone secondStageDone = (SecondStageDone)this; SecondStageDone secondStageDone2 = (SecondStageDone)obj; ProgressUpdate item = secondStageDone.item; ProgressUpdate item2 = secondStageDone2.item; return item.Equals(item2, comp); } } } return false; } return false; } return obj == null; } [CompilerGenerated] public virtual sealed bool Equals(object obj, IEqualityComparer comp) { if (obj is Progress obj2) { return Equals(obj2, comp); } return false; } [CompilerGenerated] public virtual sealed bool Equals(Progress obj) { if (this != null) { if (obj != null) { int tag = _tag; int tag2 = obj._tag; if (tag == tag2) { switch (Tag) { default: { LoadingTracks loadingTracks = (LoadingTracks)this; LoadingTracks loadingTracks2 = (LoadingTracks)obj; return loadingTracks.item.Equals(loadingTracks2.item); } case 1: { LoadingCollections loadingCollections = (LoadingCollections)this; LoadingCollections loadingCollections2 = (LoadingCollections)obj; return loadingCollections.item.Equals(loadingCollections2.item); } case 2: { FirstStageDone firstStageDone = (FirstStageDone)this; FirstStageDone firstStageDone2 = (FirstStageDone)obj; return firstStageDone.item.Equals(firstStageDone2.item); } case 3: { ResolvingCollections resolvingCollections = (ResolvingCollections)this; ResolvingCollections resolvingCollections2 = (ResolvingCollections)obj; return resolvingCollections.item.Equals(resolvingCollections2.item); } case 4: { SecondStageDone secondStageDone = (SecondStageDone)this; SecondStageDone secondStageDone2 = (SecondStageDone)obj; return secondStageDone.item.Equals(secondStageDone2.item); } } } return false; } return false; } return obj == null; } [CompilerGenerated] public sealed override bool Equals(object obj) { if (obj is Progress obj2) { return Equals(obj2); } return false; } } } namespace BaboonAPI.Hooks.Saves { [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] public interface ICustomSaveData<a> { virtual a Save(); virtual void Load(a data); virtual a Convert(JObject o); } [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] public interface SaverCapability { [CompilationArgumentCounts(new int[] { 1, 1 })] virtual void Attach<a>(string name, ICustomSaveData<a> target); } [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] internal class PluginSaverLoader { internal string pluginGuid; internal FSharpFunc<SaverCapability, Unit> attacher; public PluginSaverLoader(string pluginGuid, FSharpFunc<SaverCapability, Unit> attacher) { this.pluginGuid = pluginGuid; this.attacher = attacher; } internal FSharpMap<string, object> Save(FSharpMap<string, object> pluginData) { FSharpRef<FSharpMap<string, object>> val = new FSharpRef<FSharpMap<string, object>>(pluginData); attacher.Invoke((SaverCapability)new $CustomSaveData.Save@49(this, val)); return val.contents; } internal void Load(FSharpMap<string, JObject> pluginData) { attacher.Invoke((SaverCapability)new $CustomSaveData.Load@56(this, pluginData)); } } } namespace BaboonAPI.Hooks.Initializer { [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] public sealed class LoadError : IEquatable<LoadError>, IStructuralEquatable { [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal PluginInfo PluginInfo@; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal string Message@; [CompilationMapping(/*Could not decode attribute arguments.*/)] public PluginInfo PluginInfo { [CompilerGenerated] [DebuggerNonUserCode] get { return PluginInfo@; } } [CompilationMapping(/*Could not decode attribute arguments.*/)] public string Message { [CompilerGenerated] [DebuggerNonUserCode] get { return Message@; } } [DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(LoadError))] public LoadError(PluginInfo pluginInfo, string message) { PluginInfo@ = pluginInfo; Message@ = message; } [CompilerGenerated] public override string ToString() { return ExtraTopLevelOperators.PrintFormatToString<FSharpFunc<LoadError, string>>((PrintfFormat<FSharpFunc<LoadError, string>, Unit, string, string>)(object)new PrintfFormat<FSharpFunc<LoadError, string>, Unit, string, string, LoadError>("%+A")).Invoke(this); } [CompilerGenerated] public sealed int GetHashCode(IEqualityComparer comp) { if (this != null) { int num = 0; num = -1640531527 + ((Message@?.GetHashCode() ?? 0) + ((num << 6) + (num >> 2))); return -1640531527 + (HashCompare.GenericHashWithComparerIntrinsic<PluginInfo>(comp, PluginInfo@) + ((num << 6) + (num >> 2))); } return 0; } [CompilerGenerated] public sealed override int GetHashCode() { return GetHashCode(LanguagePrimitives.GenericEqualityComparer); } [CompilerGenerated] public bool Equals(LoadError obj, IEqualityComparer comp) { if (this != null) { if (obj != null) { if (HashCompare.GenericEqualityWithComparerIntrinsic<PluginInfo>(comp, PluginInfo@, obj.PluginInfo@)) { return string.Equals(Message@, obj.Message@); } return false; } return false; } return obj == null; } [CompilerGenerated] public sealed bool Equals(object obj, IEqualityComparer comp) { if (obj is LoadError obj2) { return Equals(obj2, comp); } return false; } [CompilerGenerated] public sealed bool Equals(LoadError obj) { if (this != null) { if (obj != null) { if (HashCompare.GenericEqualityERIntrinsic<PluginInfo>(PluginInfo@, obj.PluginInfo@)) { return string.Equals(Message@, obj.Message@); } return false; } return false; } return obj == null; } [CompilerGenerated] public sealed override bool Equals(object obj) { if (obj is LoadError obj2) { return Equals(obj2); } return false; } } } namespace BaboonAPI.Hooks.Entrypoints { [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] public class BaboonEntryPointAttribute : Attribute { } [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] public sealed class EntryPointContainer<t> : IEquatable<EntryPointContainer<t>>, IStructuralEquatable { [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal PluginInfo Source@; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal t Instance@; [CompilationMapping(/*Could not decode attribute arguments.*/)] public PluginInfo Source { [CompilerGenerated] [DebuggerNonUserCode] get { return Source@; } } [CompilationMapping(/*Could not decode attribute arguments.*/)] public t Instance { [CompilerGenerated] [DebuggerNonUserCode] get { return Instance@; } } [DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(EntryPointContainer<>))] public EntryPointContainer(PluginInfo source, t instance) { Source@ = source; Instance@ = instance; } [CompilerGenerated] public override string ToString() { return ((FSharpFunc<EntryPointContainer<EntryPointContainer<t>>, string>)(object)ExtraTopLevelOperators.PrintFormatToString<FSharpFunc<EntryPointContainer<t>, string>>((PrintfFormat<FSharpFunc<EntryPointContainer<t>, string>, Unit, string, string>)(object)new PrintfFormat<FSharpFunc<EntryPointContainer<FSharpFunc<EntryPointContainer<t>, string>>, string>, Unit, string, string, EntryPointContainer<FSharpFunc<EntryPointContainer<t>, string>>>("%+A"))).Invoke((EntryPointContainer<EntryPointContainer<t>>)(object)this); } [CompilerGenerated] public sealed int GetHashCode(IEqualityComparer comp) { if (this != null) { int num = 0; t instance@ = Instance@; num = -1640531527 + (HashCompare.GenericHashWithComparerIntrinsic<t>(comp, instance@) + ((num << 6) + (num >> 2))); return -1640531527 + (HashCompare.GenericHashWithComparerIntrinsic<PluginInfo>(comp, Source@) + ((num << 6) + (num >> 2))); } return 0; } [CompilerGenerated] public sealed override int GetHashCode() { return GetHashCode(LanguagePrimitives.GenericEqualityComparer); } [CompilerGenerated] public bool Equals(EntryPointContainer<t> obj, IEqualityComparer comp) { if (this != null) { if (obj != null) { if (HashCompare.GenericEqualityWithComparerIntrinsic<PluginInfo>(comp, Source@, obj.Source@)) { t instance@ = Instance@; t instance@2 = obj.Instance@; return HashCompare.GenericEqualityWithComparerIntrinsic<t>(comp, instance@, instance@2); } return false; } return false; } return obj == null; } [CompilerGenerated] public sealed bool Equals(object obj, IEqualityComparer comp) { if (obj is EntryPointContainer<t> obj2) { return Equals(obj2, comp); } return false; } [CompilerGenerated] public sealed bool Equals(EntryPointContainer<t> obj) { if (this != null) { if (obj != null) { if (HashCompare.GenericEqualityERIntrinsic<PluginInfo>(Source@, obj.Source@)) { t instance@ = Instance@; t instance@2 = obj.Instance@; return HashCompare.GenericEqualityERIntrinsic<t>(instance@, instance@2); } return false; } return false; } return obj == null; } [CompilerGenerated] public sealed override bool Equals(object obj) { if (obj is EntryPointContainer<t> obj2) { return Equals(obj2); } return false; } } } namespace BaboonAPI.Hooks.Tracks.Collections { [Serializable] [AbstractClass] [CompilationMapping(/*Could not decode attribute arguments.*/)] public abstract class BaseTromboneCollection : TromboneCollection { internal string name@11; internal string id; internal string description@11; internal static ManualLogSource logger; internal static int init@11; public override string folder => ""; public abstract virtual IEnumerable<TromboneTrack> BuildTrackList(); public abstract virtual BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<Sprite, string>> LoadSprite(); public BaseTromboneCollection(string id, string name, string description) { this.id = id; name@11 = name; description@11 = description; } [SpecialName] virtual string TromboneCollection.get_unique_id() { return id; } [SpecialName] virtual string TromboneCollection.get_name() { return name@11; } [SpecialName] virtual string TromboneCollection.get_description() { return description@11; } [SpecialName] virtual IEnumerable<TromboneTrack> TromboneCollection.get_tracks() { return BuildTrackList(); } virtual BaboonAPI.Utility.Coroutines.YieldTask<TrackCollection> TromboneCollection.Resolve(int index) { return BaboonAPI.Utility.Coroutines.map(new $TrackCollections.BaboonAPI-Hooks-Tracks-TromboneCollection-Resolve@31(this, index), LoadSprite()); } static BaseTromboneCollection() { $TrackCollections.init@ = 0; _ = $TrackCollections.init@; } } } namespace BaboonAPI.Internal.BaseGame { [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] public class BaseGameLoadedTrack : PauseAware, LoadedTromboneTrack { internal string trackref@14; internal AssetBundle bundle; internal BaseGameLoadedTrack(string trackref, AssetBundle bundle) { trackref@14 = trackref; this.bundle = bundle; } virtual TrackAudio LoadedTromboneTrack.LoadAudio() { GameObject val = bundle.LoadAsset<GameObject>(PrintfModule.PrintFormatToStringThen<string>((PrintfFormat<string, Unit, string, string>)(object)new PrintfFormat<string, Unit, string, string, string>("music_%P()", new object[1] { trackref@14 }, (Type[])null))); AudioSource component = val.GetComponent<AudioSource>(); return new TrackAudio(component.clip, component.volume); } virtual GameObject LoadedTromboneTrack.LoadBackground(BackgroundContext _ctx) { return bundle.LoadAsset<GameObject>(PrintfModule.PrintFormatToStringThen<string>((PrintfFormat<string, Unit, string, string>)(object)new PrintfFormat<string, Unit, string, string, string>("BGCam_%P()", new object[1] { trackref@14 }, (Type[])null))); } virtual void IDisposable.Dispose() { bundle.Unload(true); } [CompilationArgumentCounts(new int[] { 1, 1 })] virtual void LoadedTromboneTrack.SetUpBackgroundDelayed(BGController _arg2, GameObject _arg1) { } [SpecialName] virtual string LoadedTromboneTrack.get_trackref() { return trackref@14; } [SpecialName] virtual bool PauseAware.get_CanResume() { return true; } virtual void PauseAware.OnPause(PauseContext _arg3) { } virtual void PauseAware.OnResume(PauseContext _arg4) { } } [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] public class BaseGameTrack : FilesystemTrack, Graphable, Previewable, Sortable, TromboneTrack { internal string trackref@40; internal SavedLevelMetadata data; internal string trackPath; internal BaseGameTrack(SavedLevelMetadata data, string trackref) { this.data = data; trackref@40 = trackref; trackPath = PrintfModule.PrintFormatToStringThen<string>((PrintfFormat<string, Unit, string, string>)(object)new PrintfFormat<string, Unit, string, string, Tuple<string, string>>("%P()/trackassets/%P()", new object[2] { Application.streamingAssetsPath, trackref@40 }, (Type[])null)); } [SpecialName] virtual string TromboneTrack.get_trackname_long() { return data.trackname_long; } [SpecialName] virtual string TromboneTrack.get_trackname_short() { return data.trackname_short; } [SpecialName] virtual string TromboneTrack.get_trackref() { return trackref@40; } [SpecialName] virtual string TromboneTrack.get_year() { return data.year; } [SpecialName] virtual string TromboneTrack.get_artist() { return data.artist; } [SpecialName] virtual string TromboneTrack.get_genre() { return data.genre; } [SpecialName] virtual string TromboneTrack.get_desc() { return data.description; } [SpecialName] virtual int TromboneTrack.get_difficulty() { return data.difficulty; } [SpecialName] virtual int TromboneTrack.get_length() { return data.length; } [SpecialName] virtual int TromboneTrack.get_tempo() { return data.tempo; } virtual LoadedTromboneTrack TromboneTrack.LoadTrack() { AssetBundle bundle = AssetBundle.LoadFromFile(PrintfModule.PrintFormatToStringThen<string>((PrintfFormat<string, Unit, string, string>)(object)new PrintfFormat<string, Unit, string, string, string>("%P()/contentbundle", new object[1] { trackPath }, (Type[])null))); return new BaseGameLoadedTrack(trackref@40, bundle); } virtual bool TromboneTrack.IsVisible() { string a = trackref@40; if (string.Equals(a, "einefinal") || string.Equals(a, "tchampmedley")) { return GlobalVariables.localsave.progression_trombone_champ; } return true; } virtual SavedLevel TromboneTrack.LoadChart() { //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_0042: Expected O, but got Unknown string path = PrintfModule.PrintFormatToStringThen<string>((PrintfFormat<string, Unit, string, string>)(object)new PrintfFormat<string, Unit, string, string, string>("%P()/trackdata.tmb", new object[1] { trackPath }, (Type[])null)); using FileStream serializationStream = File.Open(path, FileMode.Open); return (SavedLevel)new BinaryFormatter().Deserialize(serializationStream); } [SpecialName] virtual int Sortable.get_sortOrder() { return data.sort_order; } virtual BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<TrackAudio, string>> Previewable.LoadClip() { string path = PrintfModule.PrintFormatToStringThen<string>((PrintfFormat<string, Unit, string, string>)(object)new PrintfFormat<string, Unit, string, string, string>("%P()/sample.ogg", new object[1] { trackPath }, (Type[])null)); BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<AudioClip, string>> task = BaboonAPI.Utility.Unity.loadAudioClip(path, (AudioType)14); FSharpFunc<AudioClip, TrackAudio> @_instance; @_instance = $BaseGame.BaboonAPI-Hooks-Tracks-Previewable-LoadClip@77-1.@_instance; return BaboonAPI.Utility.Coroutines.map<FSharpResult<AudioClip, string>, FSharpResult<TrackAudio, string>>($BaseGame.func1@1(@_instance), task); } virtual FSharpOption<SongGraph> Graphable.CreateGraph() { string a = trackref@40; if (!string.Equals(a, "warmup")) { if (string.Equals(a, "einefinal")) { return FSharpOption<SongGraph>.Some(new SongGraph(104, 104, 104, 104, 104)); } return null; } return FSharpOption<SongGraph>.Some(new SongGraph(10, 10, 10, 10, 10)); } [SpecialName] virtual string FilesystemTrack.get_folderPath() { return trackPath; } } [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] internal class BaseGameCollectionSprites { internal Sprite[] sprites; internal Sprite baseGame => sprites[0]; internal Sprite tootmaker => sprites[1]; internal Sprite custom => sprites[2]; internal Sprite favorites => sprites[3]; internal Sprite allTracks => sprites[4]; public BaseGameCollectionSprites(Sprite[] sprites) { this.sprites = sprites; } } [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] internal class BaseGameTrackCollection : BaseTromboneCollection { internal BaseGameCollectionSprites sprites; public BaseGameTrackCollection(StringLocalizer localizer, BaseGameCollectionSprites sprites) : base("default", localizer.getLocalizedText("collections_name_default"), localizer.getLocalizedText("collections_desc_default")) { this.sprites = sprites; } public override BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<Sprite, string>> LoadSprite() { FSharpFunc<Unit, FSharpResult<Sprite, string>> supplier = new $BaseGame.LoadSprite@101(this); return new BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<Sprite, string>>(SeqModule.Empty<YieldInstruction>(), supplier); } public override IEnumerable<TromboneTrack> BuildTrackList() { return SeqModule.Filter<TromboneTrack>((FSharpFunc<TromboneTrack, bool>)$BaseGame.BuildTrackList@106.@_instance, SeqModule.Map<TrackAccessor.RegisteredTrack, TromboneTrack>((FSharpFunc<TrackAccessor.RegisteredTrack, TromboneTrack>)$BaseGame.BuildTrackList@105-1.@_instance, TrackAccessor.allTracks())); } } [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] internal class AllTracksCollection : BaseTromboneCollection { internal BaseGameCollectionSprites sprites; public AllTracksCollection(StringLocalizer localizer, BaseGameCollectionSprites sprites) : base("all", localizer.getLocalizedText("collections_name_all"), localizer.getLocalizedText("collections_desc_all")) { this.sprites = sprites; } public override BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<Sprite, string>> LoadSprite() { FSharpFunc<Unit, FSharpResult<Sprite, string>> supplier = new $BaseGame.LoadSprite@112-1(this); return new BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<Sprite, string>>(SeqModule.Empty<YieldInstruction>(), supplier); } public override IEnumerable<TromboneTrack> BuildTrackList() { return SeqModule.Map<TrackAccessor.RegisteredTrack, TromboneTrack>((FSharpFunc<TrackAccessor.RegisteredTrack, TromboneTrack>)$BaseGame.BuildTrackList@116-2.@_instance, TrackAccessor.allTracks()); } } [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] internal class FavoriteTracksCollection : BaseTromboneCollection { internal BaseGameCollectionSprites sprites; public FavoriteTracksCollection(StringLocalizer localizer, BaseGameCollectionSprites sprites) : base("favorites", localizer.getLocalizedText("collections_name_favorites"), localizer.getLocalizedText("collections_desc_favorites")) { this.sprites = sprites; } public override BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<Sprite, string>> LoadSprite() { FSharpFunc<Unit, FSharpResult<Sprite, string>> supplier = new $BaseGame.LoadSprite@122-2(this); return new BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<Sprite, string>>(SeqModule.Empty<YieldInstruction>(), supplier); } public override IEnumerable<TromboneTrack> BuildTrackList() { return SeqModule.Filter<TromboneTrack>((FSharpFunc<TromboneTrack, bool>)$BaseGame.BuildTrackList@127-3.@_instance, SeqModule.Map<TrackAccessor.RegisteredTrack, TromboneTrack>((FSharpFunc<TrackAccessor.RegisteredTrack, TromboneTrack>)$BaseGame.BuildTrackList@126-4.@_instance, TrackAccessor.allTracks())); } } [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] internal class BaseGameTrackRegistry : TrackCollectionRegistrationEvent.Listener, TrackRegistrationEvent.Listener { internal BaseGameCollectionSprites sprites; internal string path; internal StringLocalizer localizer; public BaseGameTrackRegistry(string path, StringLocalizer localizer, BaseGameCollectionSprites sprites) { this.path = path; this.localizer = localizer; this.sprites = sprites; } virtual IEnumerable<TromboneTrack> TrackRegistrationEvent.Listener.OnRegisterTracks() { return (IEnumerable<TromboneTrack>)(object)new $BaseGame.BaboonAPI-Hooks-Tracks-TrackRegistrationEvent-Listener-OnRegisterTracks@132(this, null, null, null, null, 0, null); } virtual IEnumerable<TromboneCollection> TrackCollectionRegistrationEvent.Listener.OnRegisterCollections() { return (IEnumerable<TromboneCollection>)(object)new $BaseGame.BaboonAPI-Hooks-Tracks-TrackCollectionRegistrationEvent-Listener-OnRegisterCollections@155(this, 0, null); } } } namespace BaboonAPI.Internal.Tootmaker { [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] public class LoadedTootmakerTrack : PauseAware, AsyncAudioAware, LoadedTromboneTrack { internal string trackref@16; internal string folderPath; internal static MethodInfo load_bg_m; internal static int init@16; internal LoadedTootmakerTrack(string trackref, string folderPath) { trackref@16 = trackref; this.folderPath = folderPath; } [SpecialName] virtual string LoadedTromboneTrack.get_trackref() { return trackref@16; } virtual GameObject LoadedTromboneTrack.LoadBackground(BackgroundContext ctx) { return ctx.controller@23.custombg_prefab; } virtual TrackAudio LoadedTromboneTrack.LoadAudio() { throw new Exception("crimes have occurred"); } [CompilationArgumentCounts(new int[] { 1, 1 })] virtual void LoadedTromboneTrack.SetUpBackgroundDelayed(BGController controller, GameObject bg) { if (init@16 < 2) { IntrinsicFunctions.FailStaticInit(); } Coroutine val = ((MonoBehaviour)controller).StartCoroutine((IEnumerator)load_bg_m.Invoke(controller.gamecontroller, new object[1] { null })); } virtual void IDisposable.Dispose() { } virtual BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<TrackAudio, string>> AsyncAudioAware.LoadAudio() { //IL_006e: Unknown result type (might be due to invalid IL or missing references) //IL_0073: Unknown result type (might be due to invalid IL or missing references) //IL_0083: Unknown result type (might be due to invalid IL or missing references) FSharpList<Tuple<string, AudioType>> val = FSharpList<Tuple<string, AudioType>>.Cons(new Tuple<string, AudioType>("ogg", (AudioType)14), FSharpList<Tuple<string, AudioType>>.Cons(new Tuple<string, AudioType>("mp3", (AudioType)13), FSharpList<Tuple<string, AudioType>>.Cons(new Tuple<string, AudioType>("wav", (AudioType)20), FSharpList<Tuple<string, AudioType>>.Cons(new Tuple<string, AudioType>("aiff", (AudioType)2), FSharpList<Tuple<string, AudioType>>.Empty)))); FSharpOption<Tuple<string, AudioType>> val2 = ListModule.TryFind<Tuple<string, AudioType>>((FSharpFunc<Tuple<string, AudioType>, bool>)$Tootmaker.path@44.@_instance, ListModule.Map<Tuple<string, AudioType>, Tuple<string, AudioType>>((FSharpFunc<Tuple<string, AudioType>, Tuple<string, AudioType>>)new $Tootmaker.path@43-1(this), val)); if (val2 != null) { FSharpOption<Tuple<string, AudioType>> val3 = val2; AudioType item = val3.Value.Item2; string item2 = val3.Value.Item1; BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<AudioClip, string>> task = BaboonAPI.Utility.Unity.loadAudioClip(item2, item); FSharpFunc<AudioClip, TrackAudio> @_instance; @_instance = $Tootmaker.BaboonAPI-Hooks-Tracks-AsyncAudioAware-LoadAudio@49-1.@_instance; return BaboonAPI.Utility.Coroutines.map<FSharpResult<AudioClip, string>, FSharpResult<TrackAudio, string>>($Tootmaker.func1@1-1(@_instance), task); } FSharpFunc<Unit, FSharpResult<TrackAudio, string>> @_instance2; @_instance2 = $Tootmaker.BaboonAPI-Hooks-Tracks-AsyncAudioAware-LoadAudio@51-2.@_instance; return new BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<TrackAudio, string>>(SeqModule.Empty<YieldInstruction>(), @_instance2); } [SpecialName] virtual bool PauseAware.get_CanResume() { return true; } virtual void PauseAware.OnPause(PauseContext ctx) { } virtual void PauseAware.OnResume(PauseContext ctx) { } static LoadedTootmakerTrack() { $Tootmaker.init@ = 0; _ = $Tootmaker.init@; } } [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] public class TootmakerTrack : FilesystemTrack, Previewable, TromboneTrack { internal string folderPath@59; internal SongDataCustom data; internal TootmakerTrack(SongDataCustom data, string folderPath) { this.data = data; folderPath@59 = folderPath; } [SpecialName] virtual string TromboneTrack.get_trackname_short() { return data.shortName; } [SpecialName] virtual string TromboneTrack.get_trackname_long() { return data.name; } [SpecialName] virtual string TromboneTrack.get_trackref() { return data.trackRef; } [SpecialName] virtual string TromboneTrack.get_year() { return data.year; } [SpecialName] virtual string TromboneTrack.get_artist() { return data.author; } [SpecialName] virtual string TromboneTrack.get_genre() { return data.genre; } [SpecialName] virtual string TromboneTrack.get_desc() { return data.description; } [SpecialName] virtual int TromboneTrack.get_difficulty() { return data.difficulty; } [SpecialName] virtual int TromboneTrack.get_length() { return Mathf.FloorToInt(data.endpoint / (data.tempo / 60f)); } [SpecialName] virtual int TromboneTrack.get_tempo() { return (int)data.tempo; } virtual bool TromboneTrack.IsVisible() { return true; } virtual SavedLevel TromboneTrack.LoadChart() { //IL_0000: Unknown result type (might be due to invalid IL or missing references) //IL_0006: Expected O, but got Unknown SavedLevel val = new SavedLevel(); val.savedleveldata = new List<float[]>(data.notes); val.bgdata = new List<float[]>(data.bgdata); val.improv_zones = new List<float[]>(data.improv_zones); val.endpoint = data.endpoint; LESaveableLyric[] lyrics = data.lyrics; val.lyricspos = new List<float[]>(SeqModule.Map<LESaveableLyric, float[]>((FSharpFunc<LESaveableLyric, float[]>)$Tootmaker.BaboonAPI-Hooks-Tracks-TromboneTrack-LoadChart@79.@_instance, (IEnumerable<LESaveableLyric>)lyrics)); lyrics = data.lyrics; val.lyricstxt = new List<string>(SeqModule.Map<LESaveableLyric, string>((FSharpFunc<LESaveableLyric, string>)$Tootmaker.BaboonAPI-Hooks-Tracks-TromboneTrack-LoadChart@80-1.@_instance, (IEnumerable<LESaveableLyric>)lyrics)); val.note_color_start = data.note_color_start; val.note_color_end = data.note_color_end; val.savednotespacing = data.savednotespacing; val.tempo = data.tempo; val.timesig = data.timesig; return val; } virtual LoadedTromboneTrack TromboneTrack.LoadTrack() { return new LoadedTootmakerTrack(data.trackRef, folderPath@59); } virtual BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<TrackAudio, string>> Previewable.LoadClip() { string path = Path.Combine(folderPath@59, "preview.ogg"); if (File.Exists(path)) { BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<AudioClip, string>> task = BaboonAPI.Utility.Unity.loadAudioClip(path, (AudioType)14); FSharpFunc<AudioClip, TrackAudio> @_instance; @_instance = $Tootmaker.BaboonAPI-Hooks-Tracks-Previewable-LoadClip@95-3.@_instance; return BaboonAPI.Utility.Coroutines.map<FSharpResult<AudioClip, string>, FSharpResult<TrackAudio, string>>($Tootmaker.func1@1-2(@_instance), task); } FSharpFunc<Unit, FSharpResult<TrackAudio, string>> @_instance2; @_instance2 = $Tootmaker.BaboonAPI-Hooks-Tracks-Previewable-LoadClip@97-4.@_instance; return new BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<TrackAudio, string>>(SeqModule.Empty<YieldInstruction>(), @_instance2); } [SpecialName] virtual string FilesystemTrack.get_folderPath() { return folderPath@59; } } [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] internal class TootmakerCollection : BaseTromboneCollection { internal BaseGameCollectionSprites sprites; internal string folderPath; public override string folder => Path.GetFileName(folderPath.TrimEnd('/', '\\')); public TootmakerCollection(string folderPath, StringLocalizer localizer, BaseGameCollectionSprites sprites) : base("tootmaker", localizer.getLocalizedText("collections_name_tootmaker"), localizer.getLocalizedText("collections_desc_tootmaker")) { this.folderPath = folderPath; this.sprites = sprites; } public override BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<Sprite, string>> LoadSprite() { FSharpFunc<Unit, FSharpResult<Sprite, string>> supplier = new $Tootmaker.LoadSprite@106-3(this); return new BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<Sprite, string>>(SeqModule.Empty<YieldInstruction>(), supplier); } public override IEnumerable<TromboneTrack> BuildTrackList() { return SeqModule.Filter<TromboneTrack>((FSharpFunc<TromboneTrack, bool>)$Tootmaker.BuildTrackList@110-5.@_instance, SeqModule.Map<TrackAccessor.RegisteredTrack, TromboneTrack>((FSharpFunc<TrackAccessor.RegisteredTrack, TromboneTrack>)$Tootmaker.BuildTrackList@109-6.@_instance, TrackAccessor.allTracks())); } } [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] internal class CustomCollection : BaseTromboneCollection { internal FSharpList<string> trackRefs; internal BaseGameCollectionSprites sprites; internal string folderPath; public override string folder => Path.GetFileName(folderPath.TrimEnd('/', '\\')); public CustomCollection(string folderPath, FSharpList<string> trackRefs, ExternalCollectionMetadata meta, BaseGameCollectionSprites sprites) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0007: Unknown result type (might be due to invalid IL or missing references) Hash128 val = Hash128.Compute(folderPath); base..ctor(((object)(Hash128)(ref val)).ToString(), meta.name, meta.description); this.folderPath = folderPath; this.trackRefs = trackRefs; this.sprites = sprites; } public override BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<Sprite, string>> LoadSprite() { FSharpList<string> val = ListModule.Map<string, string>((FSharpFunc<string, string>)new $Tootmaker.spritePaths@118(this), FSharpList<string>.Cons("cover.png", FSharpList<string>.Cons("cover.jpg", FSharpList<string>.Empty))); FSharpOption<string> val2 = ListModule.TryFind<string>((FSharpFunc<string, bool>)$Tootmaker.path@119-2.@_instance, val); if (val2 != null) { FSharpOption<string> val3 = val2; string value = val3.Value; BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<Texture2D, string>> task = BaboonAPI.Utility.Unity.loadTexture(value); FSharpFunc<Texture2D, Sprite> @_instance; @_instance = $Tootmaker.LoadSprite@123-5.@_instance; return BaboonAPI.Utility.Coroutines.map<FSharpResult<Texture2D, string>, FSharpResult<Sprite, string>>($Tootmaker.func1@1-3(@_instance), task); } FSharpFunc<Unit, FSharpResult<Sprite, string>> supplier = new $Tootmaker.LoadSprite@125-6(this); return new BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<Sprite, string>>(SeqModule.Empty<YieldInstruction>(), supplier); } public override IEnumerable<TromboneTrack> BuildTrackList() { FSharpList<string> val = trackRefs; return SeqModule.Map<string, TromboneTrack>((FSharpFunc<string, TromboneTrack>)$Tootmaker.BuildTrackList@128-7.@_instance, (IEnumerable<string>)val); } } [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] internal class TootmakerTrackRegistry : TrackCollectionRegistrationEvent.Listener, TrackRegistrationEvent.Listener { internal BaseGameCollectionSprites sprites; internal string path; internal StringLocalizer localizer; internal JsonSerializer serializer; public TootmakerTrackRegistry(string path, StringLocalizer localizer, BaseGameCollectionSprites sprites) { //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0028: Expected O, but got Unknown this.path = path; this.localizer = localizer; this.sprites = sprites; serializer = new JsonSerializer(); } virtual IEnumerable<TromboneTrack> TrackRegistrationEvent.Listener.OnRegisterTracks() { return (IEnumerable<TromboneTrack>)(object)new $Tootmaker.BaboonAPI-Hooks-Tracks-TrackRegistrationEvent-Listener-OnRegisterTracks@135-1(this, null, null, null, 0, null); } virtual IEnumerable<TromboneCollection> TrackCollectionRegistrationEvent.Listener.OnRegisterCollections() { if (Directory.Exists(path)) { return SeqModule.Singleton<TromboneCollection>((TromboneCollection)new TootmakerCollection(path, localizer, sprites)); } return SeqModule.Empty<TromboneCollection>(); } } } namespace BaboonAPI.Patch { [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] internal sealed class LevelSelectContext : IEquatable<LevelSelectContext>, IStructuralEquatable { [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal LevelSelectController controller@; [CompilerGenerated] [DebuggerBrowsable(DebuggerBrowsableState.Never)] internal List<SingleTrackData> allTracksList@; [CompilationMapping(/*Could not decode attribute arguments.*/)] internal LevelSelectController controller { [CompilerGenerated] [DebuggerNonUserCode] get { return controller@; } } [CompilationMapping(/*Could not decode attribute arguments.*/)] internal List<SingleTrackData> allTracksList { [CompilerGenerated] [DebuggerNonUserCode] get { return allTracksList@; } } [DynamicDependency(DynamicallyAccessedMemberTypes.PublicFields | DynamicallyAccessedMemberTypes.NonPublicFields | DynamicallyAccessedMemberTypes.PublicProperties | DynamicallyAccessedMemberTypes.NonPublicProperties, typeof(LevelSelectContext))] internal LevelSelectContext(LevelSelectController controller, List<SingleTrackData> allTracksList) { controller@ = controller; allTracksList@ = allTracksList; } [CompilerGenerated] public override string ToString() { return ExtraTopLevelOperators.PrintFormatToString<FSharpFunc<LevelSelectContext, string>>((PrintfFormat<FSharpFunc<LevelSelectContext, string>, Unit, string, string>)(object)new PrintfFormat<FSharpFunc<LevelSelectContext, string>, Unit, string, string, LevelSelectContext>("%+A")).Invoke(this); } [CompilerGenerated] public sealed int GetHashCode(IEqualityComparer comp) { if (this != null) { int num = 0; num = -1640531527 + (HashCompare.GenericHashWithComparerIntrinsic<List<SingleTrackData>>(comp, allTracksList@) + ((num << 6) + (num >> 2))); return -1640531527 + (HashCompare.GenericHashWithComparerIntrinsic<LevelSelectController>(comp, controller@) + ((num << 6) + (num >> 2))); } return 0; } [CompilerGenerated] public sealed override int GetHashCode() { return GetHashCode(LanguagePrimitives.GenericEqualityComparer); } [CompilerGenerated] internal bool Equals(LevelSelectContext obj, IEqualityComparer comp) { if (this != null) { if (obj != null) { if (HashCompare.GenericEqualityWithComparerIntrinsic<LevelSelectController>(comp, controller@, obj.controller@)) { return HashCompare.GenericEqualityWithComparerIntrinsic<List<SingleTrackData>>(comp, allTracksList@, obj.allTracksList@); } return false; } return false; } return obj == null; } [CompilerGenerated] public sealed bool Equals(object obj, IEqualityComparer comp) { if (obj is LevelSelectContext obj2) { return Equals(obj2, comp); } return false; } [CompilerGenerated] public sealed bool Equals(LevelSelectContext obj) { if (this != null) { if (obj != null) { if (HashCompare.GenericEqualityERIntrinsic<LevelSelectController>(controller@, obj.controller@)) { return HashCompare.GenericEqualityERIntrinsic<List<SingleTrackData>>(allTracksList@, obj.allTracksList@); } return false; } return false; } return obj == null; } [CompilerGenerated] public sealed override bool Equals(object obj) { if (obj is LevelSelectContext obj2) { return Equals(obj2); } return false; } } [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] internal class LevelSelectReloadBehaviour : MonoBehaviour, TracksLoadedEvent.Listener { internal static FieldInfo songindex_f; internal static MethodInfo populate_names_m; internal FSharpOption<LevelSelectContext> context; internal static int init@12; public LevelSelectReloadBehaviour() { context = null; } internal void Init(LevelSelectController controller, List<SingleTrackData> alltrackslist) { context = FSharpOption<LevelSelectContext>.Some(new LevelSelectContext(controller, alltrackslist)); } internal void Start() { TracksLoadedEvent.EVENT.Register(this); } internal void OnDestroy() { TracksLoadedEvent.EVENT.Unregister(this); } virtual void TracksLoadedEvent.Listener.OnTracksLoaded(FSharpList<TromboneTrack> _arg1) { FSharpOption<LevelSelectContext> val = context; if (val != null) { FSharpOption<LevelSelectContext> val2 = val; LevelSelectContext value = val2.Value; value.allTracksList@.Clear(); value.allTracksList@.AddRange(SeqModule.Map<BaboonAPI.Internal.TrackAccessor.RegisteredTrack, SingleTrackData>((FSharpFunc<BaboonAPI.Internal.TrackAccessor.RegisteredTrack, SingleTrackData>)$TrackrefPatches.BaboonAPI-Hooks-Tracks-TracksLoadedEvent-Listener-OnTracksLoaded@40.@_instance, SeqModule.Filter<BaboonAPI.Internal.TrackAccessor.RegisteredTrack>((FSharpFunc<BaboonAPI.Internal.TrackAccessor.RegisteredTrack, bool>)$TrackrefPatches.BaboonAPI-Hooks-Tracks-TracksLoadedEvent-Listener-OnTracksLoaded@39-1.@_instance, BaboonAPI.Internal.TrackAccessor.allTracks()))); if (init@12 < 1) { IntrinsicFunctions.FailStaticInit(); } songindex_f.SetValue(value.controller@, 0); if (init@12 < 2) { IntrinsicFunctions.FailStaticInit(); } object obj = populate_names_m.Invoke(value.controller@, new object[1] { false }); } } static LevelSelectReloadBehaviour() { $TrackrefPatches.init@ = 0; _ = $TrackrefPatches.init@; } } [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] internal class TrackrefAccessor { internal static SingleTrackData fetchChosenTrack(string trackref) { BaboonAPI.Internal.TrackAccessor.RegisteredTrack registeredTrack = BaboonAPI.Internal.TrackAccessor.fetchRegisteredTrack(trackref); return BaboonAPI.Internal.TrackAccessor.makeTrackData(registeredTrack.track@, registeredTrack.trackIndex@); } internal static void doLevelSelectStart(LevelSelectController instance, List<SingleTrackData> alltrackslist) { ((Component)instance).gameObject.AddComponent<LevelSelectReloadBehaviour>().context = FSharpOption<LevelSelectContext>.Some(new LevelSelectContext(instance, alltrackslist)); } } [Serializable] [HarmonyPatch(typeof(SaverLoader), "loadTrackData")] [CompilationMapping(/*Could not decode attribute arguments.*/)] public class TrackLoaderPatch { public static bool Prefix(string trackref) { GlobalVariables.chosen_track = trackref; GlobalVariables.chosen_track_data = TrackrefAccessor.fetchChosenTrack(trackref); return false; } } [Serializable] [HarmonyPatch(typeof(LevelSelectController))] [CompilationMapping(/*Could not decode attribute arguments.*/)] public class LevelSelectPatch { [HarmonyPrefix] [HarmonyPatch("checkForSongsToHide")] public static bool PatchSongsVisible(LevelSelectController __instance, List<SingleTrackData> ___alltrackslist) { int num = ___alltrackslist.RemoveAll(new $TrackrefPatches.PatchSongsVisible@74(__instance).Invoke); return false; } } [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] internal class BaseTracksLoaderAccessor { internal static FieldInfo btn_reload_f; internal static FieldInfo collections_txt_f; internal static int init@13; internal static void reloadCollections() { TrackCollections track_collection_loader = GlobalVariables.track_collection_loader; IEnumerator<YieldInstruction> enumerator = BaboonAPI.Utility.Coroutines.run(BaboonAPI.Internal.TrackAccessor.loadCollectionsAsync()); Coroutine val = ((MonoBehaviour)track_collection_loader).StartCoroutine((IEnumerator)enumerator); } internal static void onClickReload(HomeController controller) { Coroutine val = ((MonoBehaviour)controller).StartCoroutine((IEnumerator)SeqModule.Delay<YieldInstruction>((FSharpFunc<Unit, IEnumerable<YieldInstruction>>)new $BaseTracksLoaderPatch.onClickReload@27(controller)).GetEnumerator()); } static BaseTracksLoaderAccessor() { $BaseTracksLoaderPatch.init@ = 0; _ = $BaseTracksLoaderPatch.init@; } } [Serializable] [HarmonyPatch(typeof(TrackCollections))] [CompilationMapping(/*Could not decode attribute arguments.*/)] public class LoaderPatch { [HarmonyPrefix] [HarmonyPatch("buildTrackCollections")] public static bool PatchCollectionSetup(TrackCollections __instance, StringLocalizer ___string_localizer, Sprite[] ___collection_art_defaults) { BaseGameCollectionSprites sprites = new BaseGameCollectionSprites(___collection_art_defaults); string path = PrintfModule.PrintFormatToStringThen<string>((PrintfFormat<string, Unit, string, string>)(object)new PrintfFormat<string, Unit, string, string, string>("%P()/trackassets", new object[1] { Application.streamingAssetsPath }, (Type[])null)); BaseGameTrackRegistry baseGameTrackRegistry = new BaseGameTrackRegistry(path, ___string_localizer, sprites); TrackRegistrationEvent.EVENT.Register(baseGameTrackRegistry); TrackCollectionRegistrationEvent.EVENT.Register(baseGameTrackRegistry); string collections_path_tootmaker = GlobalVariables.localsettings.collections_path_tootmaker; TootmakerTrackRegistry tootmakerTrackRegistry = new TootmakerTrackRegistry(collections_path_tootmaker, ___string_localizer, sprites); TrackRegistrationEvent.EVENT.Register(tootmakerTrackRegistry); TrackCollectionRegistrationEvent.EVENT.Register(tootmakerTrackRegistry); return false; } [HarmonyPrefix] [HarmonyPatch("rebuildCustomTrackCollections")] public static bool PatchCollectionReload(TrackCollections __instance) { return false; } [HarmonyPrefix] [HarmonyPatch("buildFavoritesCollection")] public static bool PatchFavoritesReload(TrackCollections __instance) { BaboonAPI.Internal.TrackAccessor.updateCollections(); return false; } } [Serializable] [HarmonyPatch(typeof(SaverLoader), "loadAllSaveHighScores")] [CompilationMapping(/*Could not decode attribute arguments.*/)] public class TrackLoadingPatch { public static bool Prefix() { BaseTracksLoaderAccessor.reloadCollections(); return false; } } [Serializable] [HarmonyPatch(typeof(HomeController), "clickReloadCustoms")] [CompilationMapping(/*Could not decode attribute arguments.*/)] public class ReloadButtonPatch { internal static MethodInfo load_scores_m; internal static int init@78-1; public static IEnumerable<CodeInstruction> Transpiler(IEnumerable<CodeInstruction> instructions) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0036: Unknown result type (might be due to invalid IL or missing references) //IL_003b: Unknown result type (might be due to invalid IL or missing references) //IL_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_007c: Unknown result type (might be due to invalid IL or missing references) //IL_0081: Unknown result type (might be due to invalid IL or missing references) //IL_009e: Unknown result type (might be due to invalid IL or missing references) //IL_00ab: Unknown result type (might be due to invalid IL or missing references) //IL_00b0: Unknown result type (might be due to invalid IL or missing references) CodeMatcher val = new CodeMatcher(instructions, (ILGenerator)null); return val.MatchForward(false, (CodeMatch[])(object)new CodeMatch[3] { new CodeMatch((OpCode?)OpCodes.Ldc_I4_1, (object)null, (string)null), new CodeMatch((OpCode?)OpCodes.Ldc_I4_0, (object)null, (string)null), new CodeMatch((Func<CodeInstruction, bool>)$BaseTracksLoaderPatch.Transpiler@87.Invoke, (string)null) }).ThrowIfInvalid("Could not find loadAllSaveHighScores call").RemoveInstructions(3) .InsertAndAdvance((CodeInstruction[])(object)new CodeInstruction[3] { new CodeInstruction(OpCodes.Ldarg_0, (object)null), CodeInstruction.Call(typeof(BaseTracksLoaderAccessor), "onClickReload", (Type[])null, (Type[])null), new CodeInstruction(OpCodes.Ret, (object)null) }) .InstructionEnumeration(); } static ReloadButtonPatch() { $BaseTracksLoaderPatch.init@ = 0; _ = $BaseTracksLoaderPatch.init@; } } [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] internal class FreePlayLoader : LoadedTromboneTrack { internal AssetBundle bundle; public FreePlayLoader() { bundle = AssetBundle.LoadFromFile(PrintfModule.PrintFormatToStringThen<string>((PrintfFormat<string, Unit, string, string>)(object)new PrintfFormat<string, Unit, string, string, string>("%P()/trackassets/freeplay/contentbundle", new object[1] { Application.streamingAssetsPath }, (Type[])null))); } [SpecialName] virtual string LoadedTromboneTrack.get_trackref() { return "freeplay"; } virtual TrackAudio LoadedTromboneTrack.LoadAudio() { return new TrackAudio(null, 1f); } virtual GameObject LoadedTromboneTrack.LoadBackground(BackgroundContext _ctx) { return bundle.LoadAsset<GameObject>("BGCam_freeplay"); } [CompilationArgumentCounts(new int[] { 1, 1 })] virtual void LoadedTromboneTrack.SetUpBackgroundDelayed(BGController _arg2, GameObject _arg1) { } virtual void IDisposable.Dispose() { bundle.Unload(true); } } [Serializable] [CompilationMapping(/*Could not decode attribute arguments.*/)] internal class GameControllerExtension { internal static FSharpOption<LoadedTromboneTrack> loadedTrack; internal static ManualLogSource logger; internal static int init@28; internal static string fetchTrackTitle(int i) { return BaboonAPI.Internal.TrackAccessor.fetchTrackByIndex(i).trackname_long; } internal static float Infix(GameController instance) { //IL_0086: Unknown result type (might be due to invalid IL or missing references) //IL_008b: Unknown result type (might be due to invalid IL or missing references) //IL_00a9: Unknown result type (might be due to invalid IL or missing references) LoadedTromboneTrack loadedTromboneTrack = ((!instance.freeplay) ? BaboonAPI.Internal.TrackAccessor.fetchTrack(GlobalVariables.chosen_track).LoadTrack() : new FreePlayLoader()); Coroutine val; if (!instance.freeplay) { if (loadedTromboneTrack is AsyncAudioAware asyncAudioAware) { AsyncAudioAware asyncAudioAware2 = asyncAudioAware; FSharpFunc<FSharpResult<TrackAudio, string>, Unit> binder = new $GameControllerPatch.Infix@54(instance); BaboonAPI.Utility.Coroutines.YieldTask<FSharpResult<TrackAudio, string>> task = asyncAudioAware2.LoadAudio(); IEnumerator<YieldInstruction> enumerator = BaboonAPI.Utility.Coroutines.run(BaboonAPI.Utility.Coroutines.map<FSharpResult<TrackAudio, string>, Unit>(binder, task)); val = ((MonoBehaviour)instance).StartCoroutine((IEnumerator)enumerator); } else { $GameControllerPatch.onAudioLoaded@43(instance, loadedTromboneTrack.LoadAudio()); } } BackgroundContext ctx = new BackgroundContext(instance); GameObject val2 = Object.Instantiate<GameObject>(loadedTromboneTrack.LoadBackground(ctx), Vector3.zero, Quaternion.identity, instance.bgholder.transform); val2.transform.localPosition = Vector3.zero; instance.bgcontroller.fullbgobject = val2; instance.bgcontroller.songname = loadedTromboneTrack.trackref; loadedTromboneTrack.SetUpBackgroundDelayed(instance.bgcontroller, val2); val = ((MonoBehaviour)instance).StartCoroutine("loadAssetBundleResources"); int track_is_pausable; if (loadedTromboneTrack is PauseAware pauseAware) { PauseAware pauseAware2 = pauseAware; track_is_pausable = (pauseAware2.CanResume ? 1 : 0); } else { track_is_pausable = 0; } instance.track_is_pausable = (byte)track_is_pausable != 0; if (init@28 < 1) { IntrinsicFunctions.FailStaticInit(); } FSharpOption<LoadedTromboneTrack> val3 = loadedTrack; if (val3 != null) { FSharpOption<LoadedTromboneTrack> val4 = val3; LoadedTromboneTrack value = val4.Value; if (init@28 < 2) { IntrinsicFunctions.FailStaticInit(); } logger.LogWarning((object)PrintfModule.PrintFormatToStringThen<string>((PrintfFormat<string, Unit, string, string>)(object)new PrintfFormat<string, Unit, string, string, string>("Loaded track %P() wasn't cleaned up properly", new object[1] { value.trackref }, (Type[])null))); value.Dispose(); } if (init@28 < 1) { IntrinsicFunctions.FailStaticInit(); } loadedTrack = FSharpOption<LoadedTromboneTrack>.Some(loadedTromboneTrack); if (GlobalVariables.turbomode) { return 2f; } return GlobalVariables.practicemode; } internal static SavedLevel LoadChart(string trackref) { return BaboonAPI.Internal.TrackAccessor.fetchTrack(trackref).LoadChart(); } internal static void PauseTrack(PauseCanvasController controller) { if (init@28 < 1) { IntrinsicFunctions.FailStaticInit(); } FSharpOption<LoadedTromboneTrack> val = loadedTrack; if (val != null) { FSharpOption<LoadedTromboneTrack> val2 = val; if (val2.Value is PauseAware pauseAware) { PauseAware pauseAware2 = pauseAware; pauseAware2.OnPause(new PauseContext(controller)); } } } internal static void ResumeTrack(PauseCanvasController controller) { if (init@28 < 1) { IntrinsicFunctions.FailStaticInit(); } FSharpOption<LoadedTromboneTrack> val = loadedTrack; if (val != null) { FSharpOption<LoadedTromboneTrack> val2 = val; if (val2.Value is PauseAware pauseAware) { PauseAware pauseAware2 = pauseAware; pauseAware2.OnResume(new PauseContext(controller)); } } } internal static void Unload() { if (init@28 < 1) { IntrinsicFunctions.FailStaticInit(); } FSharpOption<LoadedTromboneTrack> val = loadedTrack; if (val != null) { FSharpOption<LoadedTromboneTrack> val2 = val; LoadedTromboneTrack value = val2.Value; value.Dispose(); if (init@28 < 1) { IntrinsicFunctions.FailStaticInit(); } loadedTrack = null; } } static GameControllerExtension() { $GameControllerPatch.init@ = 0; _ = $GameControllerPatch.init@; } } [Serializable] [HarmonyPatch] [CompilationMapping(/*Could not decode attribute arguments.*/)] public class GameControllerPatch { internal static FieldInfo freeplay_f; internal static MethodInfo file_exists_m; internal static int init@121-1; [HarmonyTranspiler] [HarmonyPatch(typeof(GameController), "Start")] public static IEnumerable<CodeInstruction> TranspileStart(IEnumerable<CodeInstruction> instructions) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_0027: Unknown result type (might be due to invalid IL or missing references) //IL_002c: Unknown result type (might be due to invalid IL or missing references) //IL_0040: Unknown result type (might be due to invalid IL or missing references) //IL_0045: Unknown result type (might be due to invalid IL or missing references) //IL_0058: Unknown result type (might be due to invalid IL or missing references) //IL_005d: Unknown result type (might be due to invalid IL or missing references) //IL_0071: Unknown result type (might be due to invalid IL or missing references) //IL_0076: Unknown result type (might be due to invalid IL or missing references) //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_008e: Unknown result type (might be due to invalid IL or missing references) //IL_00cc: Unknown result type (might be due to invalid IL or missing references) //IL_00d1: Unknown result type (might be due to invalid IL or missing references) //IL_00e5: Unknown result type (might be due to invalid IL or missing references) //IL_00ea: Unknown result type (might be due to invalid IL or missing references) //IL_00fd: Unknown result type (might be due to invalid IL or missing references) //IL_0102: Unknown result type (might be due to invalid IL or missing references) //IL_0141: Unknown result type (might be due to invalid IL or missing references) //IL_0146: Unknown result type (might be due to invalid IL or missing references) //IL_0153: Unknown result type (might be due to invalid IL or missing references) //IL_0158: Unknown result type (might be due to invalid IL or missing references) //IL_0175: Unknown result type (might be due to invalid IL or missing references) //IL_0190: Unknown result type (might be due to invalid IL or missing references) CodeMatcher val = new CodeMatcher(instructions, (ILGenerator)null); int pos = val.Start().MatchForward(false, (CodeMatch[])(object)new CodeMatch[5] { new CodeMatch((OpCode?)OpCodes.Ldstr, (object)"", (string)null), new CodeMatch((Func<CodeInstruction, bool>)$GameControllerPatch.startIndex@136.Invoke, (string)null), new CodeMatch((OpCode?)OpCodes.Ldarg_0, (object)null, (string)null), new CodeMatch((Func<CodeInstruction, bool>)$GameControllerPatch.startIndex@138-1.Invoke, (string)null), new CodeMatch((OpCode?)OpCodes.Brtrue, (object)null, (string)null) }).ThrowIfInvalid("Could not find start of injection point in GameController#Start") .Pos; List<Label> labels = val.Labels; int num = val.MatchForward(true, (CodeMatch[])(object)new CodeMatch[3] { new CodeMatch((OpCode?)OpCodes.Ldnull, (object)null, (string)null), new CodeMatch((Func<CodeInstruction, bool>)$GameControllerPatch.endIndex@151.Invoke, (string)null), new CodeMatch((OpCode?)OpCodes.Br, (object)null, (string)null) }).ThrowIfInvalid("Could not find end of injection point in GameController#Start").Pos - 1; return val.RemoveInstructionsInRange(pos, num).Start().Advance(pos) .Insert((CodeInstruction[])(object)new CodeInstruction[4] { new CodeInstruction(OpCodes.Ldarg_0, (object)null), new CodeInstruction(OpCodes.Ldarg_0, (object)null), CodeInstruction.Call(typeof(GameControllerExtension), "Infix", (Type[])null, (Type[])null), CodeInstruction.StoreField(typeof(GameController), "smooth_scrolling_move_mult") }) .AddLabels((IEnumerable<Label>)labels) .InstructionEnumeration(); } [HarmonyTranspiler] [HarmonyPatch(typeof(GameController), "tryToLoadLevel")] public static IEnumerable<CodeInstruction> LoadChartTranspiler(IEnumerable<CodeInstruction> instructions) { //IL_0002: Unknown result type (might be due to invalid IL or missing references) //IL_0008: Expected O, but got Unknown //IL_001e: Unknown result type (might be due to invalid IL or missing references) //IL_0023: Unknown result type (might be due to invalid IL or missing references) //IL_0037: Unknown result type (might be due to invalid IL or missing references) //IL_003c: Unknown result type (might be due to invalid IL or missing references) //IL_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_0097: Unknown result type (might be due to invalid IL or missing references) //IL_009c: Unknown result type (might be due to invalid IL or missing references) //IL_00af: Unknown result ty