using System; using System.Collections.Generic; using System.Diagnostics; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using BepInEx; using BepInEx.Logging; using EndlessServiceShaft.Hooks; using HarmonyLib; using Microsoft.CodeAnalysis; using UnityEngine; using UnityEngine.Events; using UnityEngine.UI; [assembly: CompilationRelaxations(8)] [assembly: RuntimeCompatibility(WrapNonExceptionThrows = true)] [assembly: Debuggable(DebuggableAttribute.DebuggingModes.Default | DebuggableAttribute.DebuggingModes.DisableOptimizations | DebuggableAttribute.DebuggingModes.IgnoreSymbolStoreSequencePoints | DebuggableAttribute.DebuggingModes.EnableEditAndContinue)] [assembly: TargetFramework(".NETStandard,Version=v2.1", FrameworkDisplayName = ".NET Standard 2.1")] [assembly: AssemblyCompany("EndlessServiceShaft")] [assembly: AssemblyConfiguration("Debug")] [assembly: AssemblyFileVersion("1.0.0.0")] [assembly: AssemblyInformationalVersion("1.0.0")] [assembly: AssemblyProduct("Endless Service Shaft")] [assembly: AssemblyTitle("EndlessServiceShaft")] [assembly: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("1.0.0.0")] [module: UnverifiableCode] [module: RefSafetyRules(11)] namespace Microsoft.CodeAnalysis { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] internal sealed class EmbeddedAttribute : Attribute { } } namespace System.Runtime.CompilerServices { [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Module, AllowMultiple = false, Inherited = false)] internal sealed class RefSafetyRulesAttribute : Attribute { public readonly int Version; public RefSafetyRulesAttribute(int P_0) { Version = P_0; } } } namespace EndlessServiceShaft { [BepInPlugin("me.ssar.endless-service-shaft", "Endless Service Shaft", "1.0.0")] public class Plugin : BaseUnityPlugin { internal static ManualLogSource Logger; public static M_Gamemode endlessServiceShaftGamemode; private void Awake() { //IL_0021: Unknown result type (might be due to invalid IL or missing references) //IL_0027: Expected O, but got Unknown Logger = ((BaseUnityPlugin)this).Logger; Logger.LogInfo((object)"Endless Service Shaft has loaded!"); Harmony val = new Harmony("me.ssar.endless-service-shaft"); val.PatchAll(typeof(DatabaseModifier)); val.PatchAll(typeof(AddGamemode)); } } public static class PluginInfo { public const string GUID = "me.ssar.endless-service-shaft"; public const string Name = "Endless Service Shaft"; public const string Version = "1.0.0"; } } namespace EndlessServiceShaft.Hooks { public static class AddGamemode { [HarmonyPatch(typeof(UI_PlayPane), "Start")] [HarmonyPrefix] public static void PlayPaneStart(ref UI_PlayPane __instance) { //IL_0111: Unknown result type (might be due to invalid IL or missing references) //IL_0170: Unknown result type (might be due to invalid IL or missing references) //IL_017a: Expected O, but got Unknown GameObject val = Object.FindObjectsOfType(true).First((GameObject x) => ((Object)x).name == "Other Endless 02" && ((Object)x.transform.parent.parent.parent).name == "Play Pane - Scroll View Tab - Endless Variant"); GameObject val2 = Object.Instantiate(val); ((Object)val2).name = "Other Endless 03"; val2.transform.SetParent(val.transform.parent); Transform child = val2.transform.GetChild(0); for (int i = 0; i < val2.transform.childCount; i++) { if (i != 0) { Object.Destroy((Object)(object)((Component)val2.transform.GetChild(i)).gameObject); } } GameObject gameObject = ((Component)child).gameObject; ((Object)gameObject).name = "Mode Selection Button - Service Shaft"; ((UnityEventBase)gameObject.GetComponent