diff --git a/Assets/Script/Gameplay/Player/Vocals/VocalTrack.Spawning.cs b/Assets/Script/Gameplay/Player/Vocals/VocalTrack.Spawning.cs index e5d2c620d..4d01b63e0 100644 --- a/Assets/Script/Gameplay/Player/Vocals/VocalTrack.Spawning.cs +++ b/Assets/Script/Gameplay/Player/Vocals/VocalTrack.Spawning.cs @@ -158,7 +158,7 @@ private void SpawnLyricsInPhrase(PhraseNoteTracker tracker, int harmonyIndex) if (!_lyricContainer.TrySpawnLyric( tracker.CurrentLyric, tracker.GetProbableNoteAtLyric(), - tracker.CurrentPhrase.IsStarPower, + AllowStarPower && tracker.CurrentPhrase.IsStarPower, harmonyIndex)) { tracker.NextLyric(); diff --git a/Assets/Script/Gameplay/Player/Vocals/VocalTrack.cs b/Assets/Script/Gameplay/Player/Vocals/VocalTrack.cs index d233ca2fe..c7df71adf 100644 --- a/Assets/Script/Gameplay/Player/Vocals/VocalTrack.cs +++ b/Assets/Script/Gameplay/Player/Vocals/VocalTrack.cs @@ -104,6 +104,8 @@ public Range(float min, float max) public bool HarmonyShowing => _vocalsTrack.Instrument == Instrument.Harmony; + public bool AllowStarPower; + public float CurrentNoteWidth => ((_currentTrackTop - TRACK_BOTTOM) / (_viewRange.Max - _viewRange.Min)) * NOTE_WIDTH_MULTIPLIER; @@ -193,6 +195,8 @@ public void Initialize(VocalsTrack vocalsTrack, YargPlayer primaryPlayer) // Hide overlay _starpowerMaterial.SetFloat(_alphaMultiplier, 0f); + + AllowStarPower = true; } public VocalsPlayer CreatePlayer() diff --git a/Assets/Script/Gameplay/PracticeManager.cs b/Assets/Script/Gameplay/PracticeManager.cs index abdd1c27c..c7574b770 100644 --- a/Assets/Script/Gameplay/PracticeManager.cs +++ b/Assets/Script/Gameplay/PracticeManager.cs @@ -4,6 +4,7 @@ using YARG.Core.Input; using YARG.Gameplay.HUD; using YARG.Menu.Navigation; +using YARG.Settings; namespace YARG.Gameplay { @@ -141,10 +142,14 @@ public void SetPracticeSection(uint tickStart, uint tickEnd, double timeStart, d TimeStart = timeStart; TimeEnd = timeEnd; + bool allowPracticeSP = SettingsManager.Settings.EnablePracticeSP.Value; foreach (var player in GameManager.Players) { player.SetPracticeSection(tickStart, tickEnd); + player.BaseEngine.AllowStarPower(allowPracticeSP); } + + GameManager.VocalTrack.AllowStarPower = allowPracticeSP; GameManager.VocalTrack.SetPracticeSection(tickStart, tickEnd); GameManager.SetSongTime(timeStart); diff --git a/Assets/Script/Settings/SettingsManager.Settings.cs b/Assets/Script/Settings/SettingsManager.Settings.cs index 46070bcd5..2cd586144 100644 --- a/Assets/Script/Settings/SettingsManager.Settings.cs +++ b/Assets/Script/Settings/SettingsManager.Settings.cs @@ -203,6 +203,7 @@ public void OpenVenueFolder() public ToggleSetting ShowHitWindow { get; } = new(false, ShowHitWindowCallback); public ToggleSetting DisableTextNotifications { get; } = new(false); + public ToggleSetting EnablePracticeSP { get; } = new(false); public DropdownSetting NoteStreakFrequency { get; } = new(NoteStreakFrequencyMode.Frequent) diff --git a/Assets/Script/Settings/SettingsManager.cs b/Assets/Script/Settings/SettingsManager.cs index 7d28902b8..17f530109 100644 --- a/Assets/Script/Settings/SettingsManager.cs +++ b/Assets/Script/Settings/SettingsManager.cs @@ -119,6 +119,7 @@ public static partial class SettingsManager new HeaderMetadata("Other"), nameof(Settings.ShowHitWindow), nameof(Settings.DisableTextNotifications), + nameof(Settings.EnablePracticeSP), nameof(Settings.NoteStreakFrequency), nameof(Settings.LyricDisplay), nameof(Settings.SongTimeOnScoreBox), diff --git a/Assets/StreamingAssets/lang/en-US.json b/Assets/StreamingAssets/lang/en-US.json index f3910a293..4435d1c58 100644 --- a/Assets/StreamingAssets/lang/en-US.json +++ b/Assets/StreamingAssets/lang/en-US.json @@ -492,7 +492,7 @@ }, "DisableTextNotifications": { "Name": "Disable Text Notifications", - "Description": "Disables text notification on the track such as \"100-Note Streak\" and \"Full Combo." + "Description": "Disables text notification on the track such as \"100-Note Streak\" and \"Full Combo.\"" }, "DMXBlueChannels": { "Name": "DMX Blue", @@ -535,6 +535,10 @@ "PauseName": "Drums", "Description": "Adjusts the song's drum track volume. Only does something if the song is multi-track." }, + "EnablePracticeSP": { + "Name": "Star Power in Practice", + "Description": "Allow Star Power phrases while in Practice Mode." + }, "FpsCap": { "Name": "FPS Cap", "Description": "The framerate cap. YOU DO NOT NEED TO PLAY YARG ON 1000FPS. VSync recommended."