Example #1
0
 private static void Postfix(InGameUI __instance)
 {
     if (!KataConfig.I.practiceMode)
     {
         AudicaMod.SetFOV(AudicaMod.fovSetting);
     }
 }
Example #2
0
 private static void Postfix(InGameUI __instance)
 {
     if (!KataConfig.I.practiceMode)
     {
         AudicaMod.ResetState();
     }
 }
Example #3
0
 private static void Prefix(AudioDriver __instance)
 {
     if (AudicaMod.skipQueued)
     {
         AudicaMod.SkipIntro();
     }
 }
Example #4
0
 private static void Postfix(SpectatorCam __instance)
 {
     if (AudicaMod.camOK && AudicaMod.spectatorCamSet && AudicaMod.activated)
     {
         AudicaMod.SpectatorCamUpdate();
     }
 }
Example #5
0
 private static void Postfix(OptionsMenu __instance, ref OptionsMenu.Page page)
 {
     if (page == OptionsMenu.Page.SpectatorCam)
     {
         AudicaMod.AddOptionsButtons(__instance);
     }
 }
Example #6
0
 private static void Prefix(MenuState __instance, ref MenuState.State state)
 {
     if (state == MenuState.State.MainPage || state == MenuState.State.SettingsPage)
     {
         MelonCoroutines.Start(AudicaMod.PerformChecks());
     }
 }
Example #7
0
 private static void Postfix(ScoreKeeper __instance)
 {
     if (AudicaMod.TempoRampEnabled)
     {
         AudicaMod.TempoRamp();
     }
 }
Example #8
0
            private static void Postfix(SongSelectItem __instance)
            {
                string songID = __instance.mSongData.songID;

                AudicaMod.selectedSong = songID;
                AudicaMod.ResetState();
            }
Example #9
0
            private static void Postfix(SpectatorCam __instance)
            {
                if (AudicaMod.spectatorCamSet)
                {
                    return;
                }

                AudicaMod.SetSpectatorCam(__instance, true);
            }
Example #10
0
 private static void Postfix(OptionsMenu __instance, ref OptionsMenu.Page page)
 {
     if (AudicaMod.menuSpawned && page != OptionsMenu.Page.Misc)
     {
         AudicaMod.menuSpawned = false;
     }
     else if (!AudicaMod.menuSpawned && page == OptionsMenu.Page.Misc)
     {
         AudicaMod.CreateSettingsButton(__instance);
     }
 }
Example #11
0
 private static void Prefix(ref MenuState.State state)
 {
     if (AudicaMod.spectatorCamFixed)
     {
         return;
     }
     if (state == MenuState.State.MainPage)
     {
         AudicaMod.FixSpectatorCam();
     }
 }
Example #12
0
 private static bool Prefix(SpectatorCam __instance)
 {
     if (AudicaMod.camOK && AudicaMod.spectatorCamSet && AudicaMod.config.activated)
     {
         AudicaMod.SpectatorCamUpdate();
         return(true);
     }
     else
     {
         return(false);
     }
 }
Example #13
0
 private static void Prefix(TwitchChatStream __instance, string msg)
 {
     //MelonLogger.Log("TwitchChatStream: " + msg);
     if (msg.Substring(0, 1) == "@")
     {
         if (msg.Contains("tmi.twitch.tv PRIVMSG "))
         {
             AudicaMod.ParsedTwitchMessage parsedMsg = AudicaMod.ParseTwitchMessage(msg);
             AudicaMod.ParseCommand(parsedMsg.message);
         }
     }
 }
Example #14
0
 private static void Postfix(MenuState __instance, ref MenuState.State state)
 {
     AudicaMod.oldMenuState = AudicaMod.menuState;
     AudicaMod.menuState    = state;
     if (AudicaMod.oldMenuState == MenuState.State.LaunchPage && state == MenuState.State.Launching)
     {
         AudicaMod.SetModifiersBefore();
     }
     else if (state != MenuState.State.Launched && AudicaMod.oldMenuState == MenuState.State.Launched)
     {
         AudicaMod.SetModifiersAfter();
     }
 }
Example #15
0
 private static void Postfix(MenuState __instance, ref MenuState.State state)
 {
     if (!AudicaMod.panelButtonsCreated)
     {
         if (!AudicaMod.buttonsBeingCreated && state == MenuState.State.SongPage)
         {
             AudicaMod.CreateSongPanelButton();
         }
         return;
     }
     if (state == MenuState.State.SongPage)
     {
         MelonCoroutines.Start(AudicaMod.SetRandomSongButtonActive(true));
     }
     else if (state == MenuState.State.LaunchPage || state == MenuState.State.MainPage)
     {
         MelonCoroutines.Start(AudicaMod.SetRandomSongButtonActive(false));
     }
 }
            private static void Postfix(MenuState.State state)
            {
                if (state == MenuState.State.LaunchPage && !AudicaMod.panelCreated)
                {
                    AudicaMod.CreatePanel();
                    return;
                }
                if (!AudicaMod.panelCreated)
                {
                    return;
                }

                if (state == MenuState.State.LaunchPage)
                {
                    MelonCoroutines.Start(AudicaMod.SetPanelActive(true));
                }
                else
                {
                    MelonCoroutines.Start(AudicaMod.SetPanelActive(false));
                }
            }
Example #17
0
 private static void Postfix(MenuState __instance, ref MenuState.State state)
 {
     AudicaMod.menuState = state;
     if (!AudicaMod.panelButtonsCreated)
     {
         if (!AudicaMod.buttonsBeingCreated && state == MenuState.State.SongPage)
         {
             AudicaMod.CreateSongRequestFilterButton();
         }
         return;
     }
     if (state == MenuState.State.SongPage)
     {
         MelonCoroutines.Start(AudicaMod.SetFilterSongRequestsButtonnActive(true));
         MelonCoroutines.Start(AudicaMod.ProcessQueueCoroutine());
     }
     else if (state == MenuState.State.LaunchPage || state == MenuState.State.MainPage)
     {
         MelonCoroutines.Start(AudicaMod.SetFilterSongRequestsButtonnActive(false));
     }
 }
Example #18
0
            private static bool Prefix(OVRInput __instance)
            {
                if (!AudicaMod.introSkip || AudicaMod.introSkipped || AudicaMod.skipQueued || !AudicaMod.canSkip)
                {
                    return(true);
                }

                if (OVRInput.Get(OVRInput.Button.One, OVRInput.Controller.All))
                {
                    if (AudioDriver.I is null)
                    {
                        AudicaMod.QueueSkip();
                    }
                    else
                    {
                        AudicaMod.SkipIntro();
                    }
                }

                return(true);
            }
Example #19
0
 private static void Postfix(AudioDriver __instance)
 {
     AudicaMod.GetCues();
 }
Example #20
0
 private static void Postfix(SongSelectItem __instance)
 {
     AudicaMod.OnSelect(__instance);
 }
Example #21
0
 private static void Postfix(SongSelectItem __instance, int score, KataConfig.Difficulty difficulty, float percent, bool fullCombo)
 {
     AudicaMod.UpdateScoreDisplays(__instance, score);
 }
Example #22
0
 private static void Postfix(ScoreKeeperDisplay __instance)
 {
     AudicaMod.ScoreKeeperDisplayUpdate(__instance);
 }
Example #23
0
            private static void Postfix(SpectatorCam __instance)
            {
                if (AudicaMod.camOK)
                {
                    Camera thirdPersonCam = AudicaMod.spectatorCam.cam;

                    if (!AudicaMod.isMouseAwake)
                    {
                        AudicaMod.MouseAwake();
                    }

                    if (Input.GetKey(KeyCode.W))
                    {
                        thirdPersonCam.gameObject.transform.position = thirdPersonCam.gameObject.transform.position + thirdPersonCam.gameObject.transform.forward;
                    }

                    if (Input.GetKey(KeyCode.S))
                    {
                        thirdPersonCam.gameObject.transform.position = thirdPersonCam.gameObject.transform.position - thirdPersonCam.gameObject.transform.forward;
                    }

                    if (Input.GetKey(KeyCode.A))
                    {
                        thirdPersonCam.gameObject.transform.position = thirdPersonCam.gameObject.transform.position - thirdPersonCam.gameObject.transform.right;
                    }

                    if (Input.GetKey(KeyCode.D))
                    {
                        thirdPersonCam.gameObject.transform.position = thirdPersonCam.gameObject.transform.position + thirdPersonCam.gameObject.transform.right;
                    }

                    if (Input.GetKey(KeyCode.Space))
                    {
                        thirdPersonCam.gameObject.transform.position = thirdPersonCam.gameObject.transform.position + thirdPersonCam.gameObject.transform.up;
                    }

                    if (Input.GetKey(KeyCode.C))
                    {
                        thirdPersonCam.gameObject.transform.position = thirdPersonCam.gameObject.transform.position - thirdPersonCam.gameObject.transform.up;
                    }

                    if (Input.GetKey(KeyCode.Mouse1))
                    {
                        float MIN_X = 0.0f;
                        float MAX_X = 360.0f;
                        float MIN_Y = -90.0f;
                        float MAX_Y = 90.0f;

                        AudicaMod.xAxis += Input.GetAxis("Mouse X") * (AudicaMod.mouseSensitivity * Time.deltaTime);

                        /*
                         * if (xAxis < MIN_X) xAxis = MIN_X;
                         * else if (xAxis > MAX_X) xAxis = MAX_X;
                         */

                        AudicaMod.yAxis -= Input.GetAxis("Mouse Y") * (AudicaMod.mouseSensitivity * Time.deltaTime);

                        /*
                         * if (yAxis < MIN_Y) yAxis = MIN_Y;
                         * else if (yAxis > MAX_Y) yAxis = MAX_Y;
                         */

                        thirdPersonCam.gameObject.transform.rotation = Quaternion.Euler(AudicaMod.yAxis, AudicaMod.xAxis, 0.0f);
                    }

                    if (Input.GetKey(KeyCode.Z))
                    {
                        Vector3 euler = thirdPersonCam.gameObject.transform.rotation.eulerAngles;
                        thirdPersonCam.gameObject.transform.rotation = Quaternion.Euler(euler.y, euler.x, euler.z + 1.0f);
                    }

                    if (Input.GetKey(KeyCode.X))
                    {
                        Vector3 euler = thirdPersonCam.gameObject.transform.rotation.eulerAngles;
                        thirdPersonCam.gameObject.transform.rotation = Quaternion.Euler(euler.y, euler.x, euler.z - 1.0f);
                    }
                }
            }
Example #24
0
 private static void Postfix(SongInfoPanel __instance, ref SongInfoTopScoreItem item)
 {
     AudicaMod.SetTopScore(item);
 }
Example #25
0
 private static void Prefix(InGameUI __instance)
 {
     AudicaMod.TriggerRestart();
 }
Example #26
0
 private static void Postfix(OptionsMenu __instance, ref OptionsMenu.Page page)
 {
     AudicaMod.ShowPage(__instance, page);
 }