using System; using System.Collections.Generic; using HarmonyLib; using Snapshots; using UnityEngine; using UnityEngine.EventSystems; using UnityEngine.UI; namespace BanquetForCyka { [HarmonyPatch] public class UISnapshotPanelBuyAll { public static UISnapshotPanel panel; public static Traverse panelTraverse; public static SnapshotLiveData selectedData; [HarmonyPostfix] [HarmonyPatch(typeof(UISnapshotPanel), "OnPool")] public static void PostfixCreate(UISnapshotPanel __instance) { if (Main.debugBuyAll.Value) Console.WriteLine("UISnapshotPanel.OnPool: {0}", __instance); panel = __instance; panelTraverse = Traverse.Create(__instance); var placeButton = panelTraverse.Field("m_PlaceButton").GetValue