summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMalkierian <malkierian@gmail.com>2026-03-22 10:52:53 -0700
committerGitHub <noreply@github.com>2026-03-22 17:52:53 +0000
commitc758f1ad8459aa8d2e6a3416f14a4f45c11d788d (patch)
tree1cb1b06f0d5e54078e5c06d21b53d97b17ec37f6
parent1d9de8544a6fcfc063a0a2cebd455419b499be17 (diff)
Add option to mute notification sounds altogether. (#6390)
-rw-r--r--soh/soh/Notification/Notification.cpp2
-rw-r--r--soh/soh/SohGui/SohMenuSettings.cpp4
2 files changed, 5 insertions, 1 deletions
diff --git a/soh/soh/Notification/Notification.cpp b/soh/soh/Notification/Notification.cpp
index c70841960..5b6039cf8 100644
--- a/soh/soh/Notification/Notification.cpp
+++ b/soh/soh/Notification/Notification.cpp
@@ -131,7 +131,7 @@ void Emit(Options notification) {
notification.remainingTime = CVarGetFloat(CVAR_SETTING("Notifications.Duration"), 10.0f);
}
notifications.push_back(notification);
- if (!notification.mute) {
+ if (!notification.mute && !CVarGetInteger(CVAR_SETTING("Notifications.Mute"), 0)) {
Audio_PlaySoundGeneral(NA_SE_SY_METRONOME, &gSfxDefaultPos, 4, &gSfxDefaultFreqAndVolScale,
&gSfxDefaultFreqAndVolScale, &gSfxDefaultReverb);
}
diff --git a/soh/soh/SohGui/SohMenuSettings.cpp b/soh/soh/SohGui/SohMenuSettings.cpp
index b11dc01ce..b806da560 100644
--- a/soh/soh/SohGui/SohMenuSettings.cpp
+++ b/soh/soh/SohGui/SohMenuSettings.cpp
@@ -520,6 +520,10 @@ void SohMenu::AddMenuSettings() {
});
})
.Options(ButtonOptions().Tooltip("Displays a test notification."));
+ AddWidget(path, "Mute Notification Sound", WIDGET_CVAR_CHECKBOX)
+ .CVar(CVAR_SETTING("Notifications.Mute"))
+ .RaceDisable(false)
+ .Options(CheckboxOptions().Tooltip("Prevent notifications from playing a sound."));
// Mod Menu
path.sidebarName = "Mod Menu";