diff --git a/Assets/Script/Gameplay/Player/DrumsPlayer.cs b/Assets/Script/Gameplay/Player/DrumsPlayer.cs index 0fb6d3213..ab552bf86 100644 --- a/Assets/Script/Gameplay/Player/DrumsPlayer.cs +++ b/Assets/Script/Gameplay/Player/DrumsPlayer.cs @@ -13,6 +13,7 @@ using YARG.Gameplay.Visuals; using YARG.Helpers.Extensions; using YARG.Player; +using YARG.Settings; namespace YARG.Gameplay.Player { @@ -101,7 +102,15 @@ protected override DrumsEngine CreateEngine() engine.OnPadHit += (action, wasNoteHit, velocity) => { // Skip if a note was hit, because we have different logic for that below - if (wasNoteHit) return; + if (wasNoteHit) + { + // If AODSFX is turned on and a note was hit, Play the drum sfx. Without this, drum sfx will only play on misses. + if (SettingsManager.Settings.AlwaysOnDrumSFX.Value) + { + PlayDrumSoundEffect(action, velocity); + } + return; + } // Choose the correct fret int fret; @@ -133,7 +142,8 @@ protected override DrumsEngine CreateEngine() bool isDrumFreestyle = IsDrumFreestyle(); - if (isDrumFreestyle) + // Figure out wether its a drum freestyle or if AODSFX is enabled + if (SettingsManager.Settings.AlwaysOnDrumSFX.Value || isDrumFreestyle) { // Play drum sound effect PlayDrumSoundEffect(action, velocity); @@ -342,4 +352,4 @@ public override (ReplayFrame Frame, ReplayStats Stats) ConstructReplayData() return (frame, Engine.EngineStats.ConstructReplayStats(Player.Profile.Name)); } } -} \ No newline at end of file +} diff --git a/Assets/Script/Settings/SettingsManager.Settings.cs b/Assets/Script/Settings/SettingsManager.Settings.cs index 4da9a4c82..c74099c17 100644 --- a/Assets/Script/Settings/SettingsManager.Settings.cs +++ b/Assets/Script/Settings/SettingsManager.Settings.cs @@ -173,6 +173,8 @@ public void OpenVenueFolder() public ToggleSetting OverstrumAndOverhitSoundEffects { get; } = new(true); + public ToggleSetting AlwaysOnDrumSFX { get; } = new(false); + public ToggleSetting UseWhammyFx { get; } = new(false, v => GlobalAudioHandler.UseWhammyFx = v); public SliderSetting WhammyPitchShiftAmount { get; } = new(1, 1, 5, v => GlobalAudioHandler.WhammyPitchShiftAmount = v); diff --git a/Assets/Script/Settings/SettingsManager.cs b/Assets/Script/Settings/SettingsManager.cs index 9528fea64..b8405b0af 100644 --- a/Assets/Script/Settings/SettingsManager.cs +++ b/Assets/Script/Settings/SettingsManager.cs @@ -105,6 +105,7 @@ public static partial class SettingsManager // nameof(Settings.WhammyOversampleFactor), nameof(Settings.ClapsInStarpower), nameof(Settings.OverstrumAndOverhitSoundEffects), + nameof(Settings.AlwaysOnDrumSFX), // nameof(Settings.ReverbInStarpower), nameof(Settings.UseChipmunkSpeed), nameof(Settings.ApplyVolumesInMusicLibrary), diff --git a/Assets/StreamingAssets/lang/en-US.json b/Assets/StreamingAssets/lang/en-US.json index 6dfef7613..849593a56 100644 --- a/Assets/StreamingAssets/lang/en-US.json +++ b/Assets/StreamingAssets/lang/en-US.json @@ -530,6 +530,10 @@ "Name": "Overstrum/Overhit Sound Effects", "Description": "Enables the overstrum/overhit sound effect." }, + "AlwaysOnDrumSFX": { + "Name": "Always-On Drum SFX", + "Description": "Enables Drum SFX at all times." + }, "CrowdVolume": { "Name": "Crowd Volume", "PauseName": "Crowd",