From 41f69e1efc2ed1fc4567049dc2580ac2be07f6d1 Mon Sep 17 00:00:00 2001 From: "Lila S." Date: Mon, 4 Nov 2024 21:28:30 +0100 Subject: [PATCH] remove volume mixer to add volume mixer --- code/__HELPERS/announcements.dm | 4 ++-- code/__HELPERS/priority_announce.dm | 5 ++--- code/controllers/subsystem/vote.dm | 2 +- code/modules/client/preferences/sounds.dm | 15 +-------------- .../features/game_preferences/sounds.tsx | 13 +++---------- 5 files changed, 9 insertions(+), 30 deletions(-) diff --git a/code/__HELPERS/announcements.dm b/code/__HELPERS/announcements.dm index ad5b22045195e..d8653a2eb05da 100644 --- a/code/__HELPERS/announcements.dm +++ b/code/__HELPERS/announcements.dm @@ -50,7 +50,7 @@ if(islist(players)) for(var/mob/target in players) to_chat(target, finalized_announcement) - if(play_sound && target.client?.prefs.read_preference(/datum/preference/numeric/sound_announcements)) //DOPPLER EDIT CHANGE - Original: if(play_sound && target.client?.prefs.read_preference(/datum/preference/toggle/sound_announcements)) + if(play_sound && target.client?.prefs.read_preference(/datum/preference/toggle/sound_announcements)) SEND_SOUND(target, sound(sound_override)) else to_chat(world, finalized_announcement) @@ -59,7 +59,7 @@ return for(var/mob/player in GLOB.player_list) - if(player.client?.prefs.read_preference(/datum/preference/numeric/sound_announcements)) //DOPPLER EDIT CHANGE - Original: if(player.client?.prefs.read_preference(/datum/preference/toggle/sound_announcements)) + if(player.client?.prefs.read_preference(/datum/preference/toggle/sound_announcements)) SEND_SOUND(player, sound(sound_override)) /** diff --git a/code/__HELPERS/priority_announce.dm b/code/__HELPERS/priority_announce.dm index aed2b94a6396e..3aaa5f0da13ef 100644 --- a/code/__HELPERS/priority_announce.dm +++ b/code/__HELPERS/priority_announce.dm @@ -196,7 +196,6 @@ should_play_sound_callback = should_play_sound for(var/mob/target in players) - var/volume_modifier = (target.client?.prefs.read_preference(/datum/preference/numeric/sound_announcements)) //DOPPLER EDIT ADDITION if(isnewplayer(target) || !target.can_hear()) continue @@ -204,8 +203,8 @@ if(!should_play_sound || (should_play_sound_callback && !should_play_sound_callback.Invoke(target))) continue - if(target.client?.prefs.read_preference(/datum/preference/numeric/sound_announcements)) //DOPPLER EDIT CHANGE - Original: if(target.client?.prefs.read_preference(/datum/preference/toggle/sound_announcements)) - SEND_SOUND(target, sound(sound_to_play, volume = volume_modifier)) //DOPPLER EDIT CHANGE - Original: SEND_SOUND(target, sound(sound_to_play)) + if(target.client?.prefs.read_preference(/datum/preference/toggle/sound_announcements)) + SEND_SOUND(target, sound(sound_to_play)) #undef MAJOR_ANNOUNCEMENT_TITLE #undef MAJOR_ANNOUNCEMENT_TEXT diff --git a/code/controllers/subsystem/vote.dm b/code/controllers/subsystem/vote.dm index d950861513c12..d0e642bd3aa2d 100644 --- a/code/controllers/subsystem/vote.dm +++ b/code/controllers/subsystem/vote.dm @@ -243,7 +243,7 @@ SUBSYSTEM_DEF(vote) new_voter.player_details.player_actions += voting_action generated_actions += voting_action - if(current_vote.vote_sound && (new_voter.prefs.read_preference(/datum/preference/numeric/sound_announcements))) //DOPPLER EDIT CHANGE - Original: if(current_vote.vote_sound && (new_voter.prefs.read_preference(/datum/preference/toggle/sound_announcements))) + if(current_vote.vote_sound && (new_voter.prefs.read_preference(/datum/preference/toggle/sound_announcements))) SEND_SOUND(new_voter, sound(current_vote.vote_sound)) return TRUE diff --git a/code/modules/client/preferences/sounds.dm b/code/modules/client/preferences/sounds.dm index 6ca92b85a0fcc..c73fc3049f7aa 100644 --- a/code/modules/client/preferences/sounds.dm +++ b/code/modules/client/preferences/sounds.dm @@ -3,8 +3,6 @@ category = PREFERENCE_CATEGORY_GAME_PREFERENCES savefile_key = "sound_ambience_volume" savefile_identifier = PREFERENCE_PLAYER - minimum = 0 - maximum = 200 minimum = 0 maximum = 200 @@ -22,17 +20,10 @@ savefile_identifier = PREFERENCE_PLAYER /// Controls hearing announcement sounds -/datum/preference/numeric/sound_announcements //DOPPLER EDIT CHANGE - Original: /datum/preference/toggle/sound_announcements +/datum/preference/toggle/sound_announcements category = PREFERENCE_CATEGORY_GAME_PREFERENCES savefile_key = "sound_announcements" savefile_identifier = PREFERENCE_PLAYER - minimum = 0 - maximum = 200 - -//BEGIN DOPPLER ADDITION - VOLUME MIXER -/datum/preference/numeric/sound_announcements/create_default_value() - return maximum/2 -///END DOPPLER ADD /// Controls hearing the combat mode toggle sound /datum/preference/toggle/sound_combatmode @@ -106,8 +97,6 @@ category = PREFERENCE_CATEGORY_GAME_PREFERENCES savefile_key = "sound_lobby_volume" savefile_identifier = PREFERENCE_PLAYER - minimum = 0 - maximum = 200 minimum = 0 maximum = 200 @@ -133,8 +122,6 @@ category = PREFERENCE_CATEGORY_GAME_PREFERENCES savefile_key = "sound_ship_ambience_volume" savefile_identifier = PREFERENCE_PLAYER - minimum = 0 - maximum = 200 minimum = 0 maximum = 200 diff --git a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/sounds.tsx b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/sounds.tsx index ba8ecb4114c89..b1683a8ef3740 100644 --- a/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/sounds.tsx +++ b/tgui/packages/tgui/interfaces/PreferencesMenu/preferences/features/game_preferences/sounds.tsx @@ -13,7 +13,6 @@ export const sound_ambience_volume: Feature = { description: `Ambience refers to the more noticeable ambient sounds that play on occasion.`, component: FeatureSliderInput, }; -// END DOPPLER EDIT export const sound_breathing: FeatureToggle = { name: 'Enable breathing sounds', @@ -22,15 +21,11 @@ export const sound_breathing: FeatureToggle = { component: CheckboxInput, }; -// BEGIN DOPPLER EDIT - VOLUME MIXER -// export const sound_announcements: FeatureToggle = { -// name: 'Enable announcement sounds', -export const sound_announcements: Feature = { - name: 'Announcement volume', +export const sound_announcements: FeatureToggle = { + name: 'Enable announcement sounds', category: 'SOUND', description: 'When enabled, hear sounds for command reports, notices, etc.', - // component: CheckboxInput, - component: FeatureSliderInput, + component: CheckboxInput, }; export const sound_combatmode: FeatureToggle = { @@ -83,7 +78,6 @@ export const sound_lobby_volume: Feature = { category: 'SOUND', component: FeatureSliderInput, }; -// END DOPPLER EDIT export const sound_midi: FeatureToggle = { name: 'Enable admin music', @@ -98,7 +92,6 @@ export const sound_ship_ambience_volume: Feature = { description: `Ship ambience refers to the low ambient buzz that plays on loop.`, component: FeatureSliderInput, }; -// END DOPPLER EDIT export const sound_elevator: FeatureToggle = { name: 'Enable elevator music',