using System; using System.Collections; using System.Collections.Generic; using System.Diagnostics; using System.Globalization; using System.IO; using System.Linq; using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.Versioning; using System.Security; using System.Security.Permissions; using System.Threading; using BepInEx; using BepInEx.Configuration; using ElevatorUpgrades.Helpers; using ElevatorUpgrades.UI; using HarmonyLib; using Microsoft.CodeAnalysis; using TMPro; using UnityEngine; using UnityEngine.AddressableAssets; using UnityEngine.AddressableAssets.ResourceLocators; using UnityEngine.Events; using UnityEngine.Networking; using UnityEngine.ResourceManagement.ResourceLocations; 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: SecurityPermission(SecurityAction.RequestMinimum, SkipVerification = true)] [assembly: AssemblyVersion("0.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; } } [CompilerGenerated] [Microsoft.CodeAnalysis.Embedded] [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Interface | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)] internal sealed class ExtensionMarkerAttribute : Attribute { private readonly string k__BackingField; public string Name => k__BackingField; public ExtensionMarkerAttribute(string name) { k__BackingField = name; } } } namespace ElevatorUpgrades { [BepInPlugin("duviz.ElevatorUpgrades", "ElevatorUpgrades", "0.1.1")] public class Plugin : BaseUnityPlugin { public static Plugin instance; public static ConfigFile config; private static TMP_Text debugText; public void Awake() { //IL_0025: Unknown result type (might be due to invalid IL or missing references) instance = this; ((Object)((Component)this).gameObject).hideFlags = (HideFlags)61; config = ((BaseUnityPlugin)this).Config; new Harmony("duviz.ElevatorUpgrades").PatchAll(); } public void Start() { BundleLoader.LoadBundle("Assets.elevatorupgrades.bundle"); UpgradesManager.CreateDefaultUpgrades(); } public static T Ass(string path) { return AssHelper.Ass(path); } public static void LogInfo(object msg) { ((BaseUnityPlugin)instance).Logger.LogInfo(msg); } public static void LogWarning(object msg) { ((BaseUnityPlugin)instance).Logger.LogWarning(msg); } public static void LogError(object msg) { ((BaseUnityPlugin)instance).Logger.LogError(msg); } public static void DebugText(string text) { } } public class PluginInfo { public const string GUID = "duviz.ElevatorUpgrades"; public const string Name = "ElevatorUpgrades"; public const string Version = "0.1.1"; } [HarmonyPatch(typeof(ShopZone))] public static class ShopPatch { [Serializable] [CompilerGenerated] private sealed class <>c { public static readonly <>c <>9 = new <>c(); public static UnityAction <>9__0_0; internal void b__0_0() { UpgradesManager.OpenMenu(); } } [HarmonyPostfix] [HarmonyPatch(typeof(ShopZone), "Start")] public static void Postfix(ShopZone __instance) { //IL_00d2: Unknown result type (might be due to invalid IL or missing references) //IL_0107: Unknown result type (might be due to invalid IL or missing references) //IL_0111: Expected O, but got Unknown //IL_013a: Unknown result type (might be due to invalid IL or missing references) //IL_013f: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Expected O, but got Unknown if (!(((Object)__instance).name == "Shop") || !((Object)(object)((Component)__instance).transform.parent != (Object)null) || !(((Object)((Component)__instance).transform.parent).name == "Room")) { return; } Transform val = ((Component)__instance).transform.Find("Canvas/Background/Main Panel/Main Menu/Buttons"); Transform val2 = val.Find("SandboxButton"); Plugin.DebugText(Object.op_Implicit((Object)(object)val) ? "Got Buttons" : "Failed to get buttons"); Plugin.DebugText(Object.op_Implicit((Object)(object)val2) ? "Got shop button" : "Failed to shop button"); Transform val3 = Object.Instantiate(val2, val); ((Object)val3).name = "ElevatorButton"; ((Component)val3).GetComponentInChildren(true).text = "Elevator Upgrades"; ((Component)val3).GetComponent().sizeDelta = new Vector2(207.5f, 30f); ShopButton component = ((Component)val3).GetComponent(); component.toActivate = Array.Empty(); component.toDeactivate = Array.Empty(); Button component2 = ((Component)val3).GetComponent