예제 #1
0
        private static IEnumerator ILaunch()
        {
            if (SongBrowser.authorableInstalled)
            {
                SetEndlessActive(true);
            }
            MenuState.I.GoToLaunchPage();
            LaunchPanel launchPanel = null;

            while (launchPanel is null)
            {
                launchPanel = GameObject.FindObjectOfType <LaunchPanel>();
                yield return(new WaitForSecondsRealtime(.5f));
            }
            if (SongBrowser.authorableInstalled)
            {
                modifiersLoaded = false;
                LoadModifiers(false);
                while (!modifiersLoaded)
                {
                    yield return(new WaitForSecondsRealtime(.2f));
                }
            }

            /*while (EnvironmentLoader.I.IsSwitching())
             * {
             *  yield return new WaitForSecondsRealtime(.2f);
             * }*/
            launchPanel.Play();
            yield return(null);
        }
예제 #2
0
    private IEnumerator SelfAddLoadPercent()
    {
        while (true)
        {
            if (loadedPercent < sectionPercent)
            {
                ++loadedPercent;
                try
                {
                    Debug.Log("" + loadedPercent);
                    LaunchPanel panel = UIControl.GetPanel <LaunchPanel>("LaunchPanel");
                    if (null != panel)
                    {
                        panel.SetLoadingProgress(loadedPercent);
                    }
                }
                catch (System.Exception e)
                {
                    LogManager.Log(e.ToString(), LogType.Fatal);
                    yield break;
                }
            }

            yield return(waitEndOfFrame);

            if (loadedPercent >= 100)
            {
                break;
            }
        }
    }
 private static void Prefix(LaunchPanel __instance)
 {
     if (SongBrowser.songDataLoaderInstalled)
     {
         IEnumerator coroutine = ChangeNamesLP(__instance);
         MelonCoroutines.Start(coroutine);
     }
 }
예제 #4
0
 private static void OnFavoriteButtonShot()
 {
     Favorite();
     if (panel == null)
     {
         panel = GameObject.FindObjectOfType <LaunchPanel>();
     }
     panel.Back();
 }
예제 #5
0
        //wait a bit, else LaunchPanel is null
        public static IEnumerator AddLaunchPanelButtons()
        {
            yield return(new WaitForSeconds(.6f));

            LaunchPanel lp = GameObject.FindObjectOfType <LaunchPanel>();

            launchButton = lp.songPreviewButton;
            CreateLaunchPanelButtons();
        }
        public static IEnumerator ChangeNamesLP(LaunchPanel __instance)
        {
            yield return(new WaitForSeconds(0.05f));

            SongList.SongData song = SongDataHolder.I.songData;

            ChangeSpecificDifficulty(ref song, __instance.expert.GetComponentInChildren <TextMeshPro>(), difficultyNameToTag["Expert"]);
            ChangeSpecificDifficulty(ref song, __instance.hard.GetComponentInChildren <TextMeshPro>(), difficultyNameToTag["Advanced"]);
            ChangeSpecificDifficulty(ref song, __instance.normal.GetComponentInChildren <TextMeshPro>(), difficultyNameToTag["Moderate"]);
            ChangeSpecificDifficulty(ref song, __instance.easy.GetComponentInChildren <TextMeshPro>(), difficultyNameToTag["Beginner"]);
        }
예제 #7
0
 private static void Prefix(LaunchPanel __instance)
 {
     if (MelonHandler.Mods.Any(it => it.Info.SystemType.Name == nameof(SongDataLoader)))
     {
         IEnumerator coroutine = ChangeNamesLP(__instance);
         MelonCoroutines.Start(coroutine);
     }
     else
     {
         MelonLogger.LogError("Custom Song Data mod not detected, Custom difficulty names will not run");
     }
 }
예제 #8
0
        public static IEnumerator ChangeNamesLP(LaunchPanel __instance)
        {
            yield return(new WaitForSeconds(0.05f));

            var song = SongDataHolder.I.songData;

            bool hasCustom = SongDataLoader.AllSongData[song.songID].HasCustomData();

            if (hasCustom && SongDataLoader.AllSongData[song.songID].SongHasCustomDataKey("customExpert"))
            {
                __instance.expert.GetComponentInChildren <TextMeshPro>().text = SongDataLoader.AllSongData[song.songID].GetCustomData <string>("customExpert");
            }
            else
            {
                __instance.expert.GetComponentInChildren <TextMeshPro>().text = "Expert";
            }

            if (hasCustom && SongDataLoader.AllSongData[song.songID].SongHasCustomDataKey("customAdvanced"))
            {
                __instance.hard.GetComponentInChildren <TextMeshPro>().text = SongDataLoader.AllSongData[song.songID].GetCustomData <string>("customAdvanced");
            }
            else
            {
                __instance.hard.GetComponentInChildren <TextMeshPro>().text = "Advanced";
            }

            if (hasCustom && SongDataLoader.AllSongData[song.songID].SongHasCustomDataKey("customModerate"))
            {
                __instance.normal.GetComponentInChildren <TextMeshPro>().text = SongDataLoader.AllSongData[song.songID].GetCustomData <string>("customModerate");
            }
            else
            {
                __instance.normal.GetComponentInChildren <TextMeshPro>().text = "Moderate";
            }

            if (hasCustom && SongDataLoader.AllSongData[song.songID].SongHasCustomDataKey("customBeginner"))
            {
                __instance.easy.GetComponentInChildren <TextMeshPro>().text = SongDataLoader.AllSongData[song.songID].GetCustomData <string>("customBeginner");
            }
            else
            {
                __instance.easy.GetComponentInChildren <TextMeshPro>().text = "Beginner";
            }
        }
예제 #9
0
 private static void Prefix(LaunchPanel __instance)
 {
     AudicaMod.cachedFirstTick = 0;
 }
예제 #10
0
 private static void Postfix(LaunchPanel __instance)
 {
     AutoLightshowMod.Reset();
 }