From eab1ab0ebeacad0e94f2b889fdbd5e0462106e92 Mon Sep 17 00:00:00 2001 From: HardCPP Date: Mon, 19 Feb 2024 20:47:50 +0100 Subject: [PATCH] V6.2.2 --- ChatPlexSDK-BS | 2 +- .../BeatSaberPlus_Chat.csproj.user | Bin 622 -> 658 bytes .../Properties/AssemblyInfo.cs | 4 +- Modules/BeatSaberPlus_Chat/manifest.json | 6 +-- .../BeatSaberPlus_ChatEmoteRain.csproj.user | Bin 622 -> 658 bytes .../Properties/AssemblyInfo.cs | 4 +- .../BeatSaberPlus_ChatEmoteRain/manifest.json | 6 +-- .../BeatSaber/Actions/GamePlay.cs | 4 +- .../BeatSaberPlus_ChatIntegrations.csproj | 4 +- ...BeatSaberPlus_ChatIntegrations.csproj.user | Bin 622 -> 658 bytes .../Properties/AssemblyInfo.cs | 4 +- .../manifest.json | 6 +-- .../BeatSaberPlus_ChatRequest.csproj | 3 ++ .../BeatSaberPlus_ChatRequest.csproj.user | Bin 622 -> 658 bytes Modules/BeatSaberPlus_ChatRequest/CRConfig.cs | 5 +++ .../BeatSaberPlus_ChatRequest/ChatRequest.cs | 2 +- .../ChatRequest_Logic.cs | 12 ++++- .../Properties/AssemblyInfo.cs | 4 +- .../UI/SettingsRightView.cs | 31 ++++++++++--- .../BeatSaberPlus_ChatRequest/manifest.json | 6 +-- .../BeatSaberPlus_GameTweaker.csproj | 6 +++ .../BeatSaberPlus_GameTweaker.csproj.user | Bin 622 -> 658 bytes .../Properties/AssemblyInfo.cs | 4 +- .../BeatSaberPlus_GameTweaker/manifest.json | 6 +-- .../BeatSaberPlus_MenuMusic.csproj | 4 +- .../BeatSaberPlus_MenuMusic.csproj.user | Bin 622 -> 658 bytes .../Data/CustomMusicProvider.cs | 15 +++++++ .../Data/GameMusicProvider.cs | 41 ++++++++++-------- .../Data/IMusicProvider.cs | 4 ++ .../ChatPlexMod_MenuMusic/MenuMusic.cs | 12 ++--- .../Properties/AssemblyInfo.cs | 4 +- Modules/BeatSaberPlus_MenuMusic/manifest.json | 6 +-- .../BeatSaberPlus_NoteTweaker.csproj | 6 +++ .../BeatSaberPlus_NoteTweaker.csproj.user | Bin 622 -> 658 bytes .../Properties/AssemblyInfo.cs | 4 +- .../BeatSaberPlus_NoteTweaker/manifest.json | 6 +-- ...tSaberPlus_SongChartVisualizer.csproj.user | Bin 622 -> 658 bytes .../Properties/AssemblyInfo.cs | 4 +- .../manifest.json | 6 +-- .../Properties/AssemblyInfo.cs | 4 +- .../BeatSaberPlus_SongOverlay/manifest.json | 6 +-- .../BeatSaberPlus_ModuleTemplate.csproj | 4 +- .../BeatSaberPlus_ModuleTemplate.csproj.user | Bin 622 -> 658 bytes .../Properties/AssemblyInfo.cs | 4 +- .../manifest.json | 6 +-- 45 files changed, 165 insertions(+), 90 deletions(-) diff --git a/ChatPlexSDK-BS b/ChatPlexSDK-BS index f215728..2f3f673 160000 --- a/ChatPlexSDK-BS +++ b/ChatPlexSDK-BS @@ -1 +1 @@ -Subproject commit f21572831fdd02f1c5c13553b8ab8713973be3c9 +Subproject commit 2f3f673ce0344d8e9ade17809d84465f0acad662 diff --git a/Modules/BeatSaberPlus_Chat/BeatSaberPlus_Chat.csproj.user b/Modules/BeatSaberPlus_Chat/BeatSaberPlus_Chat.csproj.user index 5db8d9ee60929239d9779dc6a24adfdc0c01779f..2bcbd9547e2dbf3c9b1de50a0ed26cffe2f0a25e 100644 GIT binary patch delta 65 zcmaFIGKqD=97fY%2499mhCConXGmozVu)dIVhCpN1d0?hlz?TDf#StLaYF_@1|tSb LAZa*xE#pA|@_i0E delta 29 jcmbQl`i^D897e%ZhD3%E1_g#-Af3dJ%1|`(); var l_ColorManager = null as ColorManager; var l_ColorSchemeBackup = null as ColorScheme; @@ -886,7 +886,7 @@ private void PatchSabers(bool p_UseDefault) if (!p_UseDefault && l_I == (l_Sabers.Length - 1)) l_ColorManager.SetProperty("_colorScheme", l_ColorSchemeBackup); - } + }*/ } } diff --git a/Modules/BeatSaberPlus_ChatIntegrations/BeatSaberPlus_ChatIntegrations.csproj b/Modules/BeatSaberPlus_ChatIntegrations/BeatSaberPlus_ChatIntegrations.csproj index ae3d76f..b96a4c3 100644 --- a/Modules/BeatSaberPlus_ChatIntegrations/BeatSaberPlus_ChatIntegrations.csproj +++ b/Modules/BeatSaberPlus_ChatIntegrations/BeatSaberPlus_ChatIntegrations.csproj @@ -78,7 +78,7 @@ False False - + False $(BeatSaberDir)\Libs\Hive.Versioning.dll False @@ -95,7 +95,7 @@ - + $(BeatSaberDir)\Beat Saber_Data\Managed\Main.dll False diff --git a/Modules/BeatSaberPlus_ChatIntegrations/BeatSaberPlus_ChatIntegrations.csproj.user b/Modules/BeatSaberPlus_ChatIntegrations/BeatSaberPlus_ChatIntegrations.csproj.user index 5db8d9ee60929239d9779dc6a24adfdc0c01779f..2bcbd9547e2dbf3c9b1de50a0ed26cffe2f0a25e 100644 GIT binary patch delta 65 zcmaFIGKqD=97fY%2499mhCConXGmozVu)dIVhCpN1d0?hlz?TDf#StLaYF_@1|tSb LAZa*xE#pA|@_i0E delta 29 jcmbQl`i^D897e%ZhD3%E1_g#-Af3dJ%1|` + + $(BeatSaberDir)\Beat Saber_Data\Managed\BGLib.AppFlow.dll + $(BeatSaberDir)\Libs\Newtonsoft.Json.dll False diff --git a/Modules/BeatSaberPlus_ChatRequest/BeatSaberPlus_ChatRequest.csproj.user b/Modules/BeatSaberPlus_ChatRequest/BeatSaberPlus_ChatRequest.csproj.user index 5db8d9ee60929239d9779dc6a24adfdc0c01779f..2bcbd9547e2dbf3c9b1de50a0ed26cffe2f0a25e 100644 GIT binary patch delta 65 zcmaFIGKqD=97fY%2499mhCConXGmozVu)dIVhCpN1d0?hlz?TDf#StLaYF_@1|tSb LAZa*xE#pA|@_i0E delta 29 jcmbQl`i^D897e%ZhD3%E1_g#-Af3dJ%1|`().fontStyle = FontStyles.Normal; + m_ManagerButtonS.GetComponentInChildren().fontStyle = FontStyles.Normal; m_ManagerButtonS.GetComponentInChildren().margin = new Vector4(0, 4, 0, 0); var l_Images = m_ManagerButtonP.GetComponentsInChildren(); diff --git a/Modules/BeatSaberPlus_ChatRequest/ChatRequest_Logic.cs b/Modules/BeatSaberPlus_ChatRequest/ChatRequest_Logic.cs index 20c4d62..4e44430 100644 --- a/Modules/BeatSaberPlus_ChatRequest/ChatRequest_Logic.cs +++ b/Modules/BeatSaberPlus_ChatRequest/ChatRequest_Logic.cs @@ -394,7 +394,12 @@ private bool FilterBeatMap(CP_SDK_BS.Game.BeatMaps.MapDetail p_BeatMap, string p if (CRConfig.Instance.Filters.NoBeatSage && p_BeatMap.automapper) { - p_Reply = $"@{p_SenderName} BeatSage map are not allowed!"; + p_Reply = $"@{p_SenderName} BeatSage maps are not allowed!"; + return false; + } + if (CRConfig.Instance.Filters.NoRanked && p_BeatMap.ranked) + { + p_Reply = $"@{p_SenderName} Ranked maps are not allowed!"; return false; } if (l_FilterNPSMin || l_FilterNPSMax) @@ -443,6 +448,11 @@ private bool FilterBeatMap(CP_SDK_BS.Game.BeatMaps.MapDetail p_BeatMap, string p return false; } } + if (CRConfig.Instance.Filters.DurationMin && (int)p_BeatMap.metadata.duration < (CRConfig.Instance.Filters.DurationMinV * 60)) + { + p_Reply = $"@{p_SenderName} this song is too short ({CRConfig.Instance.Filters.DurationMaxV} minute(s) minimum)!"; + return false; + } if (CRConfig.Instance.Filters.DurationMax && (int)p_BeatMap.metadata.duration > (CRConfig.Instance.Filters.DurationMaxV * 60)) { p_Reply = $"@{p_SenderName} this song is too long ({CRConfig.Instance.Filters.DurationMaxV} minute(s) maximum)!"; diff --git a/Modules/BeatSaberPlus_ChatRequest/Properties/AssemblyInfo.cs b/Modules/BeatSaberPlus_ChatRequest/Properties/AssemblyInfo.cs index bc43040..2606c77 100644 --- a/Modules/BeatSaberPlus_ChatRequest/Properties/AssemblyInfo.cs +++ b/Modules/BeatSaberPlus_ChatRequest/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("6.2.0")] -[assembly: AssemblyFileVersion("6.2.0")] +[assembly: AssemblyVersion("6.2.2")] +[assembly: AssemblyFileVersion("6.2.2")] diff --git a/Modules/BeatSaberPlus_ChatRequest/UI/SettingsRightView.cs b/Modules/BeatSaberPlus_ChatRequest/UI/SettingsRightView.cs index e2fcdc6..631d77d 100644 --- a/Modules/BeatSaberPlus_ChatRequest/UI/SettingsRightView.cs +++ b/Modules/BeatSaberPlus_ChatRequest/UI/SettingsRightView.cs @@ -8,10 +8,12 @@ namespace BeatSaberPlus_ChatRequest.UI internal sealed class SettingsRightView : CP_SDK.UI.ViewController { private XUIToggle m_NoBeatSageToggle; + private XUIToggle m_NoRankedToggle; private XUIToggle m_NPSMinToggle; private XUIToggle m_NPSMaxToggle; private XUIToggle m_NJSMinToggle; private XUIToggle m_NJSMaxToggle; + private XUIToggle m_DurationMinToggle; private XUIToggle m_DurationMaxToggle; private XUIToggle m_VoteMinToggle; private XUIToggle m_DateMinToggle; @@ -20,6 +22,7 @@ internal sealed class SettingsRightView : CP_SDK.UI.ViewController x.HOrVLayoutGroup.childForceExpandWidth = true) .ForEachDirect(x => x.SetAlign(TMPro.TextAlignmentOptions.CaplineLeft)), XUIVLayout.Make( XUIToggle.Make().SetValue(CRConfig.Instance.Filters.NoBeatSage ).Bind(ref m_NoBeatSageToggle ), + XUIToggle.Make().SetValue(CRConfig.Instance.Filters.NoRanked ).Bind(ref m_NoRankedToggle ), XUIToggle.Make().SetValue(CRConfig.Instance.Filters.NPSMin ).Bind(ref m_NPSMinToggle ), XUIToggle.Make().SetValue(CRConfig.Instance.Filters.NPSMax ).Bind(ref m_NPSMaxToggle ), XUIToggle.Make().SetValue(CRConfig.Instance.Filters.NJSMin ).Bind(ref m_NJSMinToggle ), XUIToggle.Make().SetValue(CRConfig.Instance.Filters.NJSMax ).Bind(ref m_NJSMaxToggle ), + XUIToggle.Make().SetValue(CRConfig.Instance.Filters.DurationMin).Bind(ref m_DurationMinToggle), XUIToggle.Make().SetValue(CRConfig.Instance.Filters.DurationMax).Bind(ref m_DurationMaxToggle), XUIToggle.Make().SetValue(CRConfig.Instance.Filters.VoteMin ).Bind(ref m_VoteMinToggle ), XUIToggle.Make().SetValue(CRConfig.Instance.Filters.DateMin ).Bind(ref m_DateMinToggle ), XUIToggle.Make().SetValue(CRConfig.Instance.Filters.DateMax ).Bind(ref m_DateMaxToggle ) ) - .SetSpacing(2) - .SetPadding(2) + .SetSpacing(1) + .SetPadding(0) .SetWidth(20) .ForEachDirect(x => x.OnValueChanged(_ => OnValueChanged())), XUIVLayout.Make( XUIText.Make("Discard all BeatSage maps"), + XUIText.Make("Discard all ranked maps"), XUISlider.Make() .SetMinValue(0f).SetMaxValue(100f).SetIncrements( 1f).SetInteger(true) .SetValue(CRConfig.Instance.Filters.NPSMinV) @@ -96,6 +104,10 @@ protected override sealed void OnViewCreation() .SetMinValue(1f).SetMaxValue(100f).SetIncrements( 1f).SetInteger(true) .SetValue(CRConfig.Instance.Filters.NJSMaxV) .Bind(ref m_NJSMax), + XUISlider.Make() + .SetMinValue(1f).SetMaxValue( 60f).SetIncrements( 1f).SetInteger(true) + .SetValue(CRConfig.Instance.Filters.DurationMinV) + .Bind(ref m_DurationMin), XUISlider.Make() .SetMinValue(1f).SetMaxValue( 60f).SetIncrements( 1f).SetInteger(true) .SetValue(CRConfig.Instance.Filters.DurationMaxV) @@ -113,8 +125,8 @@ protected override sealed void OnViewCreation() .SetValue(CRConfig.Instance.Filters.DateMaxV) .Bind(ref m_DateMax) ) - .SetSpacing(2) - .SetPadding(2) + .SetSpacing(1) + .SetPadding(0) .SetWidth(65) .ForEachDirect(x => x.OnValueChanged(_ => OnValueChanged())) ) @@ -147,6 +159,7 @@ private void OnValueChanged() m_NPSMax.SetInteractable( m_NPSMaxToggle.Element.GetValue()); m_NJSMin.SetInteractable( m_NJSMinToggle.Element.GetValue()); m_NJSMax.SetInteractable( m_NJSMaxToggle.Element.GetValue()); + m_DurationMin.SetInteractable( m_DurationMinToggle.Element.GetValue()); m_DurationMax.SetInteractable( m_DurationMaxToggle.Element.GetValue()); m_VoteMin.SetInteractable( m_VoteMinToggle.Element.GetValue()); m_DateMin.SetInteractable( m_DateMinToggle.Element.GetValue()); @@ -154,10 +167,12 @@ private void OnValueChanged() /// Left CRConfig.Instance.Filters.NoBeatSage = m_NoBeatSageToggle.Element.GetValue(); + CRConfig.Instance.Filters.NoRanked = m_NoRankedToggle.Element.GetValue(); CRConfig.Instance.Filters.NPSMin = m_NPSMinToggle.Element.GetValue(); CRConfig.Instance.Filters.NPSMax = m_NPSMaxToggle.Element.GetValue(); CRConfig.Instance.Filters.NJSMin = m_NJSMinToggle.Element.GetValue(); CRConfig.Instance.Filters.NJSMax = m_NJSMaxToggle.Element.GetValue(); + CRConfig.Instance.Filters.DurationMin = m_DurationMinToggle.Element.GetValue(); CRConfig.Instance.Filters.DurationMax = m_DurationMaxToggle.Element.GetValue(); CRConfig.Instance.Filters.VoteMin = m_VoteMinToggle.Element.GetValue(); CRConfig.Instance.Filters.DateMin = m_DateMinToggle.Element.GetValue(); @@ -168,6 +183,7 @@ private void OnValueChanged() CRConfig.Instance.Filters.NPSMaxV = (int)m_NPSMax.Element.GetValue(); CRConfig.Instance.Filters.NJSMinV = (int)m_NJSMin.Element.GetValue(); CRConfig.Instance.Filters.NJSMaxV = (int)m_NJSMax.Element.GetValue(); + CRConfig.Instance.Filters.DurationMinV = (int)m_DurationMin.Element.GetValue(); CRConfig.Instance.Filters.DurationMaxV = (int)m_DurationMax.Element.GetValue(); CRConfig.Instance.Filters.VoteMinV = m_VoteMin.Element.GetValue(); CRConfig.Instance.Filters.DateMinV = (int)m_DateMin.Element.GetValue(); @@ -186,10 +202,12 @@ internal void RefreshSettings() /// Left m_NoBeatSageToggle.SetValue( CRConfig.Instance.Filters.NoBeatSage); + m_NoRankedToggle.SetValue( CRConfig.Instance.Filters.NoRanked); m_NPSMinToggle.SetValue( CRConfig.Instance.Filters.NPSMin); m_NPSMaxToggle.SetValue( CRConfig.Instance.Filters.NPSMax); m_NJSMinToggle.SetValue( CRConfig.Instance.Filters.NJSMin); m_NJSMaxToggle.SetValue( CRConfig.Instance.Filters.NJSMax); + m_DurationMinToggle.SetValue( CRConfig.Instance.Filters.DurationMin); m_DurationMaxToggle.SetValue( CRConfig.Instance.Filters.DurationMax); m_VoteMinToggle.SetValue( CRConfig.Instance.Filters.VoteMin); m_DateMinToggle.SetValue( CRConfig.Instance.Filters.DateMin); @@ -200,6 +218,7 @@ internal void RefreshSettings() m_NPSMax.SetValue( CRConfig.Instance.Filters.NPSMaxV); m_NJSMin.SetValue( CRConfig.Instance.Filters.NJSMinV); m_NJSMax.SetValue( CRConfig.Instance.Filters.NJSMaxV); + m_DurationMin.SetValue( CRConfig.Instance.Filters.DurationMinV); m_DurationMax.SetValue( CRConfig.Instance.Filters.DurationMaxV); m_VoteMin.SetValue( CRConfig.Instance.Filters.VoteMinV); m_DateMin.SetValue( CRConfig.Instance.Filters.DateMinV); diff --git a/Modules/BeatSaberPlus_ChatRequest/manifest.json b/Modules/BeatSaberPlus_ChatRequest/manifest.json index 74d8aab..5471884 100644 --- a/Modules/BeatSaberPlus_ChatRequest/manifest.json +++ b/Modules/BeatSaberPlus_ChatRequest/manifest.json @@ -3,12 +3,12 @@ "id": "BeatSaberPlus_ChatRequest", "name": "BeatSaberPlus_ChatRequest", "author": "HardCPP", - "version": "6.2.0", + "version": "6.2.2", "description": "", - "gameVersion": "1.31.0", + "gameVersion": "1.34.2", "dependsOn": { "BSIPA": "^4.3.0", - "ChatPlexSDK_BS": "^6.2.0" + "ChatPlexSDK_BS": "^6.2.2" }, "links": { "project-home": "https://discord.chatplex.org", diff --git a/Modules/BeatSaberPlus_GameTweaker/BeatSaberPlus_GameTweaker.csproj b/Modules/BeatSaberPlus_GameTweaker/BeatSaberPlus_GameTweaker.csproj index cf2d151..4ffe819 100644 --- a/Modules/BeatSaberPlus_GameTweaker/BeatSaberPlus_GameTweaker.csproj +++ b/Modules/BeatSaberPlus_GameTweaker/BeatSaberPlus_GameTweaker.csproj @@ -63,6 +63,9 @@ False False + + $(BeatSaberDir)\Beat Saber_Data\Managed\BGLib.UnityExtension.dll + $(BeatSaberDir)\Beat Saber_Data\Managed\Colors.dll False @@ -88,6 +91,9 @@ False False + + $(BeatSaberDir)\Beat Saber_Data\Managed\Menu.CommonLib.dll + $(BeatSaberDir)\Libs\Newtonsoft.Json.dll False diff --git a/Modules/BeatSaberPlus_GameTweaker/BeatSaberPlus_GameTweaker.csproj.user b/Modules/BeatSaberPlus_GameTweaker/BeatSaberPlus_GameTweaker.csproj.user index 5db8d9ee60929239d9779dc6a24adfdc0c01779f..2bcbd9547e2dbf3c9b1de50a0ed26cffe2f0a25e 100644 GIT binary patch delta 65 zcmaFIGKqD=97fY%2499mhCConXGmozVu)dIVhCpN1d0?hlz?TDf#StLaYF_@1|tSb LAZa*xE#pA|@_i0E delta 29 jcmbQl`i^D897e%ZhD3%E1_g#-Af3dJ%1|` - ..\..\..\..\..\..\SteamLibrary\steamapps\common\Beat Saber\Libs\Newtonsoft.Json.dll + $(BeatSaberDir)\Libs\Newtonsoft.Json.dll + False + False $(BeatSaberDir)\Plugins\SongCore.dll diff --git a/Modules/BeatSaberPlus_MenuMusic/BeatSaberPlus_MenuMusic.csproj.user b/Modules/BeatSaberPlus_MenuMusic/BeatSaberPlus_MenuMusic.csproj.user index 5db8d9ee60929239d9779dc6a24adfdc0c01779f..2bcbd9547e2dbf3c9b1de50a0ed26cffe2f0a25e 100644 GIT binary patch delta 65 zcmaFIGKqD=97fY%2499mhCConXGmozVu)dIVhCpN1d0?hlz?TDf#StLaYF_@1|tSb LAZa*xE#pA|@_i0E delta 29 jcmbQl`i^D897e%ZhD3%E1_g#-Af3dJ%1|` + /// Shuffle music collection + /// + public override void Shuffle() + { + for (var l_I = 0; l_I < m_Musics.Count; ++l_I) + { + var l_Swapped = m_Musics[l_I]; + var l_NewIndex = UnityEngine.Random.Range(l_I, m_Musics.Count); + + m_Musics[l_I] = m_Musics[l_NewIndex]; + m_Musics[l_NewIndex] = l_Swapped; + } + } //////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////// @@ -86,6 +100,7 @@ private IEnumerator Coroutine_Load() " " )); } + Shuffle(); } catch (Exception p_Exception) { diff --git a/Modules/BeatSaberPlus_MenuMusic/ChatPlexMod_MenuMusic/Data/GameMusicProvider.cs b/Modules/BeatSaberPlus_MenuMusic/ChatPlexMod_MenuMusic/Data/GameMusicProvider.cs index ab1b964..accc256 100644 --- a/Modules/BeatSaberPlus_MenuMusic/ChatPlexMod_MenuMusic/Data/GameMusicProvider.cs +++ b/Modules/BeatSaberPlus_MenuMusic/ChatPlexMod_MenuMusic/Data/GameMusicProvider.cs @@ -77,17 +77,31 @@ public override bool StartGameSpecificGamePlay(Music p_Music) #else #error Missing game implementation #endif - } + } + /// + /// Shuffle music collection + /// + public override void Shuffle() + { + for (var l_I = 0; l_I < m_Musics.Count; ++l_I) + { + var l_Swapped = m_Musics[l_I]; + var l_NewIndex = Random.Range(l_I, m_Musics.Count); - //////////////////////////////////////////////////////////////////////////// - //////////////////////////////////////////////////////////////////////////// + m_Musics[l_I] = m_Musics[l_NewIndex]; + m_Musics[l_NewIndex] = l_Swapped; + } + } - /// - /// Load game songs - /// - /// - private IEnumerator Coroutine_LoadGameSongs() - { + //////////////////////////////////////////////////////////////////////////// + //////////////////////////////////////////////////////////////////////////// + + /// + /// Load game songs + /// + /// + private IEnumerator Coroutine_LoadGameSongs() + { #if BEATSABER yield return new WaitUntil(() => !SongCore.Loader.AreSongsLoading && SongCore.Loader.CustomLevels.Count > 0); @@ -106,14 +120,7 @@ private IEnumerator Coroutine_LoadGameSongs() )); } - for (var l_I = 0; l_I < m_Musics.Count; ++l_I) - { - var l_Swapped = m_Musics[l_I]; - var l_NewIndex = Random.Range(l_I, m_Musics.Count); - - m_Musics[l_I] = m_Musics[l_NewIndex]; - m_Musics[l_NewIndex] = l_Swapped; - } + Shuffle(); #else #error Missing game implementation #endif diff --git a/Modules/BeatSaberPlus_MenuMusic/ChatPlexMod_MenuMusic/Data/IMusicProvider.cs b/Modules/BeatSaberPlus_MenuMusic/ChatPlexMod_MenuMusic/Data/IMusicProvider.cs index b8acc4e..7c0e473 100644 --- a/Modules/BeatSaberPlus_MenuMusic/ChatPlexMod_MenuMusic/Data/IMusicProvider.cs +++ b/Modules/BeatSaberPlus_MenuMusic/ChatPlexMod_MenuMusic/Data/IMusicProvider.cs @@ -20,5 +20,9 @@ public abstract class IMusicProvider /// /// Target music public abstract bool StartGameSpecificGamePlay(Music p_Music); + /// + /// Shuffle music collection + /// + public abstract void Shuffle(); } } diff --git a/Modules/BeatSaberPlus_MenuMusic/ChatPlexMod_MenuMusic/MenuMusic.cs b/Modules/BeatSaberPlus_MenuMusic/ChatPlexMod_MenuMusic/MenuMusic.cs index 118a846..7b5cb02 100644 --- a/Modules/BeatSaberPlus_MenuMusic/ChatPlexMod_MenuMusic/MenuMusic.cs +++ b/Modules/BeatSaberPlus_MenuMusic/ChatPlexMod_MenuMusic/MenuMusic.cs @@ -1,7 +1,6 @@ using CP_SDK.Chat.Interfaces; using System; using System.Collections; -using System.IO; using System.Linq; using UnityEngine; @@ -405,12 +404,9 @@ internal void StartNewMusic(bool p_Random = false, bool p_OnSceneTransition = fa } if (p_Random) - { - System.Random l_Random = new System.Random(Environment.TickCount); - m_CurrentSongIndex = l_Random.Next(0, m_MusicProvider.Musics.Count); - } - else - m_CurrentSongIndex++; + m_MusicProvider.Shuffle(); + + m_CurrentSongIndex++; /// Load and play audio clip LoadNextMusic(p_OnSceneTransition); @@ -608,7 +604,7 @@ private IEnumerator Coroutine_WaitAndPlayNextMusic(float p_EndTime) if (!m_IsPaused && !l_Channel.isPlaying && l_Channel.clip == m_CurrentMusicAudioClip - && l_ChannelsController.IndexOf(l_ChannelController) == m_PreviewPlayer._activeChannel) + && Array.IndexOf(l_ChannelsController, l_ChannelController) == m_PreviewPlayer._activeChannel) { l_Channel.UnPause(); } diff --git a/Modules/BeatSaberPlus_MenuMusic/Properties/AssemblyInfo.cs b/Modules/BeatSaberPlus_MenuMusic/Properties/AssemblyInfo.cs index 9bf2c20..aa56571 100644 --- a/Modules/BeatSaberPlus_MenuMusic/Properties/AssemblyInfo.cs +++ b/Modules/BeatSaberPlus_MenuMusic/Properties/AssemblyInfo.cs @@ -31,5 +31,5 @@ // You can specify all the values or you can default the Build and Revision Numbers // by using the '*' as shown below: // [assembly: AssemblyVersion("1.0.*")] -[assembly: AssemblyVersion("6.2.0")] -[assembly: AssemblyFileVersion("6.2.0")] +[assembly: AssemblyVersion("6.2.2")] +[assembly: AssemblyFileVersion("6.2.2")] diff --git a/Modules/BeatSaberPlus_MenuMusic/manifest.json b/Modules/BeatSaberPlus_MenuMusic/manifest.json index 8b8448d..9931380 100644 --- a/Modules/BeatSaberPlus_MenuMusic/manifest.json +++ b/Modules/BeatSaberPlus_MenuMusic/manifest.json @@ -3,12 +3,12 @@ "id": "BeatSaberPlus_MenuMusic", "name": "BeatSaberPlus_MenuMusic", "author": "HardCPP", - "version": "6.2.0", + "version": "6.2.2", "description": "", - "gameVersion": "1.31.0", + "gameVersion": "1.34.2", "dependsOn": { "BSIPA": "^4.3.0", - "ChatPlexSDK_BS": "^6.2.0" + "ChatPlexSDK_BS": "^6.2.2" }, "links": { "project-home": "https://discord.chatplex.org", diff --git a/Modules/BeatSaberPlus_NoteTweaker/BeatSaberPlus_NoteTweaker.csproj b/Modules/BeatSaberPlus_NoteTweaker/BeatSaberPlus_NoteTweaker.csproj index 16b2ac6..405b97f 100644 --- a/Modules/BeatSaberPlus_NoteTweaker/BeatSaberPlus_NoteTweaker.csproj +++ b/Modules/BeatSaberPlus_NoteTweaker/BeatSaberPlus_NoteTweaker.csproj @@ -63,6 +63,12 @@ False False + + $(BeatSaberDir)\Beat Saber_Data\Managed\BGLib.AppFlow.dll + + + $(BeatSaberDir)\Beat Saber_Data\Managed\BGLib.UnityExtension.dll + $(BeatSaberDir)\Beat Saber_Data\Managed\Colors.dll False diff --git a/Modules/BeatSaberPlus_NoteTweaker/BeatSaberPlus_NoteTweaker.csproj.user b/Modules/BeatSaberPlus_NoteTweaker/BeatSaberPlus_NoteTweaker.csproj.user index 5db8d9ee60929239d9779dc6a24adfdc0c01779f..2bcbd9547e2dbf3c9b1de50a0ed26cffe2f0a25e 100644 GIT binary patch delta 65 zcmaFIGKqD=97fY%2499mhCConXGmozVu)dIVhCpN1d0?hlz?TDf#StLaYF_@1|tSb LAZa*xE#pA|@_i0E delta 29 jcmbQl`i^D897e%ZhD3%E1_g#-Af3dJ%1|` - ..\..\..\..\..\..\SteamLibrary\steamapps\common\Beat Saber\Libs\Newtonsoft.Json.dll + $(BeatSaberDir)\Libs\Newtonsoft.Json.dll + False + False diff --git a/Samples/BeatSaberPlus_ModuleTemplate/BeatSaberPlus_ModuleTemplate.csproj.user b/Samples/BeatSaberPlus_ModuleTemplate/BeatSaberPlus_ModuleTemplate.csproj.user index 5db8d9ee60929239d9779dc6a24adfdc0c01779f..2bcbd9547e2dbf3c9b1de50a0ed26cffe2f0a25e 100644 GIT binary patch delta 65 zcmaFIGKqD=97fY%2499mhCConXGmozVu)dIVhCpN1d0?hlz?TDf#StLaYF_@1|tSb LAZa*xE#pA|@_i0E delta 29 jcmbQl`i^D897e%ZhD3%E1_g#-Af3dJ%1|`