using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using BombRushMP.Common; using Microsoft.CodeAnalysis; using UnityEngine; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints)] [assembly: TargetFramework(".NETFramework,Version=v4.6.2", FrameworkDisplayName = ".NET Framework 4.6.2")] [assembly: AssemblyVersion("0.0.0.0")] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace BombRushMP.MapStation { public static class MapStationSupport { public static List Stages = new List(); public static Dictionary StageById = new Dictionary(); private static Type _apiManagerType; public static bool Installed { get; private set; } = false; public static void Initialize() { Installed = true; _apiManagerType = ReflectionUtility.GetTypeByName("MapStation.API.APIManager"); _apiManagerType.GetEvent("OnInitialized", BindingFlags.Static | BindingFlags.Public).AddEventHandler(null, new Action(OnMapStationAPIInitialized)); } private static void OnMapStationAPIInitialized() { //IL_0093: Unknown result type (might be due to invalid IL or missing references) //IL_009a: Expected O, but got Unknown ReflectionUtility.GetTypeByName("MapStation.API.ICustomStage"); Type typeByName = ReflectionUtility.GetTypeByName("MapStation.API.IMapStationAPI"); object value = _apiManagerType.GetField("API", BindingFlags.Static | BindingFlags.Public).GetValue(null); IList obj = typeByName.GetProperty("CustomStages", BindingFlags.Instance | BindingFlags.Public).GetValue(value) as IList; Type typeByName2 = ReflectionUtility.GetTypeByName("MapStation.API.ICustomStage"); PropertyInfo property = typeByName2.GetProperty("DisplayName"); PropertyInfo property2 = typeByName2.GetProperty("StageID"); foreach (object item in obj) { string obj2 = (string)property.GetValue(item); int num = (int)property2.GetValue(item); MPStage val = new MPStage(obj2, num); Stages.Add(val); StageById[num] = val; } } public static bool IsMapOptionToggleable(GameObject go) { MonoBehaviour[] componentsInParent = go.GetComponentsInParent(true); foreach (MonoBehaviour val in componentsInParent) { if (!((Object)(object)val == (Object)null) && ((object)val).GetType().Name == "ActiveOnMapOption") { return true; } } return false; } } }