private static bool ButtonPressPrevPatch(ItemSpawnerUI __instance)
        {
            if (__instance.refireTick > 0f)
            {
                return(false);
            }

            if (__instance.m_curMode == ItemSpawnerUI.ItemSpawnerPageMode.Home)
            {
                ItemSpawnerDataObject data = __instance.GetComponent <ItemSpawnerDataObject>();

                __instance.ButtonPress(1);
                data.currHomePage -= 1;

                if (data.currHomePage == 0)
                {
                    __instance.B_Next.SetActive(true);
                    __instance.B_Prev.SetActive(false);
                }

                else
                {
                    __instance.B_Next.SetActive(true);
                    __instance.B_Prev.SetActive(true);
                }

                __instance.UpdatePageIndicator(data.currHomePage, data.maxHomePage);
                __instance.Draw_Tiles_Home();

                return(false);
            }

            else if (__instance.m_curMode == ItemSpawnerUI.ItemSpawnerPageMode.Category)
            {
                ItemSpawnerDataObject data = __instance.GetComponent <ItemSpawnerDataObject>();

                __instance.ButtonPress(1);
                data.currCategoryPage -= 1;

                if (data.currCategoryPage == 0)
                {
                    __instance.B_Next.SetActive(true);
                    __instance.B_Prev.SetActive(false);
                }

                else
                {
                    __instance.B_Next.SetActive(true);
                    __instance.B_Prev.SetActive(true);
                }

                __instance.UpdatePageIndicator(data.currCategoryPage, data.maxCategoryPage);
                __instance.Draw_Tiles_Category(__instance.m_curCategory);

                return(false);
            }

            return(true);
        }
        private static bool SetModeCategoryPatch(ItemSpawnerUI __instance)
        {
            ItemSpawnerDataObject data = __instance.GetComponent <ItemSpawnerDataObject>();

            __instance.m_curMode = ItemSpawnerUI.ItemSpawnerPageMode.Category;
            __instance.P_Tiles.SetActive(true);
            __instance.P_Details.SetActive(false);
            __instance.P_Vault.SetActive(false);
            __instance.B_Spawn.SetActive(false);
            __instance.B_Back.SetActive(true);
            __instance.B_Vault.SetActive(true);
            __instance.B_Scan.SetActive(false);
            __instance.T_TopBar.text = "HOME | " + IM.CDefInfo[__instance.m_curCategory].DisplayName;


            data.maxCategoryPage = GetMaxCategoryPage(IM.CDefInfo[__instance.m_curCategory]);
            if (data.currCategoryPage > data.maxCategoryPage)
            {
                data.currCategoryPage = data.maxCategoryPage;
            }


            if (data.maxCategoryPage > 0)
            {
                if (data.currCategoryPage == 0)
                {
                    __instance.B_Next.SetActive(true);
                    __instance.B_Prev.SetActive(false);
                }

                else if (data.currCategoryPage == data.maxCategoryPage)
                {
                    __instance.B_Next.SetActive(false);
                    __instance.B_Prev.SetActive(true);
                }

                else
                {
                    __instance.B_Next.SetActive(true);
                    __instance.B_Prev.SetActive(true);
                }

                __instance.B_PageIndicator.SetActive(true);
            }

            else
            {
                __instance.B_Next.SetActive(false);
                __instance.B_Prev.SetActive(false);
                __instance.B_PageIndicator.SetActive(false);
            }


            __instance.Draw_Tiles_Category(__instance.m_curCategory);
            __instance.ControlPoster.gameObject.SetActive(false);

            __instance.UpdatePageIndicator(data.currCategoryPage, data.maxCategoryPage);

            return(false);
        }