diff --git a/code/modules/vore/eating/belly_obj_vr.dm b/code/modules/vore/eating/belly_obj_vr.dm index d6493b3842..43ce4a33cc 100644 --- a/code/modules/vore/eating/belly_obj_vr.dm +++ b/code/modules/vore/eating/belly_obj_vr.dm @@ -57,6 +57,7 @@ var/special_entrance_sound // CHOMPEdit: Mob specific custom entry sound set by mob's init_vore when applicable var/slow_digestion = FALSE // CHOMPEdit: Gradual corpse digestion var/slow_brutal = FALSE // CHOMPEdit: Gradual corpse digestion: Stumpy's Special + var/sound_volume = 100 // CHOMPEdit: Volume knob. // Generally just used by AI var/autotransferchance = 0 // % Chance of prey being autotransferred to transfer location @@ -276,7 +277,8 @@ "autotransfer_min_amount", "autotransfer_max_amount", "slow_digestion", - "slow_brutal", //CHOMP end of variables from CHOMP + "slow_brutal", + "sound_volume", //CHOMP end of variables from CHOMP "egg_type", "save_digest_mode" ) @@ -334,7 +336,7 @@ if(special_entrance_sound) //CHOMPEdit: Custom sound set by mob's init_vore or ingame varedits. soundfile = special_entrance_sound if(soundfile) - playsound(src, soundfile, vol = 100, vary = 1, falloff = VORE_SOUND_FALLOFF, preference = /datum/client_preference/eating_noises, volume_channel = VOLUME_CHANNEL_VORE) + playsound(src, soundfile, vol = sound_volume, vary = 1, falloff = VORE_SOUND_FALLOFF, preference = /datum/client_preference/eating_noises, volume_channel = VOLUME_CHANNEL_VORE) //CHOPEdit recent_sound = TRUE //Messages if it's a mob @@ -499,7 +501,7 @@ else soundfile = fancy_release_sounds[release_sound] if(soundfile) - playsound(src, soundfile, vol = 100, vary = 1, falloff = VORE_SOUND_FALLOFF, preference = /datum/client_preference/eating_noises, volume_channel = VOLUME_CHANNEL_VORE) + playsound(src, soundfile, vol = sound_volume, vary = 1, falloff = VORE_SOUND_FALLOFF, preference = /datum/client_preference/eating_noises, volume_channel = VOLUME_CHANNEL_VORE) //CHOPEdit return count @@ -569,7 +571,7 @@ else soundfile = fancy_release_sounds[release_sound] if(soundfile) - playsound(src, soundfile, vol = 100, vary = 1, falloff = VORE_SOUND_FALLOFF, preference = /datum/client_preference/eating_noises, volume_channel = VOLUME_CHANNEL_VORE) + playsound(src, soundfile, vol = sound_volume, vary = 1, falloff = VORE_SOUND_FALLOFF, preference = /datum/client_preference/eating_noises, volume_channel = VOLUME_CHANNEL_VORE) //CHOPEdit //Should fix your view not following you out of mobs sometimes! if(ismob(M)) var/mob/ourmob = M @@ -1330,7 +1332,8 @@ dupe.autotransfer_min_amount = autotransfer_min_amount dupe.autotransfer_max_amount = autotransfer_max_amount dupe.slow_digestion = slow_digestion - dupe.slow_brutal = slow_brutal //CHOMP end of variables from CHOMP + dupe.slow_brutal = slow_brutal + dupe.sound_volume = sound_volume //CHOMP end of variables from CHOMP dupe.belly_fullscreen = belly_fullscreen dupe.disable_hud = disable_hud diff --git a/code/modules/vore/eating/bellymodes_vr.dm b/code/modules/vore/eating/bellymodes_vr.dm index 3147b04ffd..490416960b 100644 --- a/code/modules/vore/eating/bellymodes_vr.dm +++ b/code/modules/vore/eating/bellymodes_vr.dm @@ -105,9 +105,9 @@ continue if(isturf(M.loc) || (M.loc != src)) //to avoid people on the inside getting the outside sounds and their direct sounds + built in sound pref check if(fancy_vore) - M.playsound_local(get_turf(owner), play_sound, vol = 100, vary = 1, falloff = VORE_SOUND_FALLOFF) + M.playsound_local(get_turf(owner), play_sound, vol = sound_volume, vary = 1, falloff = VORE_SOUND_FALLOFF) //CHOMPEdit else - M.playsound_local(get_turf(owner), play_sound, vol = 100, vary = 1, falloff = VORE_SOUND_FALLOFF) + M.playsound_local(get_turf(owner), play_sound, vol = sound_volume, vary = 1, falloff = VORE_SOUND_FALLOFF) //CHOMPEdit //these are all external sound triggers now, so it's ok. return @@ -132,9 +132,9 @@ continue if(isturf(M.loc) || (M.loc != src)) //to avoid people on the inside getting the outside sounds and their direct sounds + built in sound pref check if(fancy_vore) - M.playsound_local(get_turf(owner), play_sound, vol = 100, vary = 1, falloff = VORE_SOUND_FALLOFF) + M.playsound_local(get_turf(owner), play_sound, vol = sound_volume, vary = 1, falloff = VORE_SOUND_FALLOFF) //CHOMPEdit else - M.playsound_local(get_turf(owner), play_sound, vol = 100, vary = 1, falloff = VORE_SOUND_FALLOFF) + M.playsound_local(get_turf(owner), play_sound, vol = sound_volume, vary = 1, falloff = VORE_SOUND_FALLOFF) //CHOMPEdit //these are all external sound triggers now, so it's ok. if(emote_active) diff --git a/code/modules/vore/eating/vorepanel_vr.dm b/code/modules/vore/eating/vorepanel_vr.dm index ce7a438a16..8ab067efca 100644 --- a/code/modules/vore/eating/vorepanel_vr.dm +++ b/code/modules/vore/eating/vorepanel_vr.dm @@ -200,6 +200,7 @@ "belly_fullscreen_color" = selected.belly_fullscreen_color, "colorization_enabled" = selected.colorization_enabled, "vorespawn_blacklist" = selected.vorespawn_blacklist, //CHOMP Addition: vorespawn blacklist + "sound_volume" = selected.sound_volume, //CHOMPAdd //CHOMP add: vore sprite options "affects_voresprite" = selected.affects_vore_sprites, "absorbed_voresprite" = selected.count_absorbed_prey_for_sprite, @@ -1294,6 +1295,11 @@ if(voretest) SEND_SOUND(user, voretest) . = TRUE + if("b_sound_volume") //CHOMPAdd + var/sound_volume_input = tgui_input_number(user, "Set belly sound volume percentage.", "Sound Volume", null, 100, 0) + if(!isnull(sound_volume_input)) //These have to be 'null' because both cancel and 0 are valid, separate options + host.vore_selected.sound_volume = sanitize_integer(sound_volume_input, 0, 100, initial(host.vore_selected.sound_volume)) + . = TRUE if("b_tastes") host.vore_selected.can_taste = !host.vore_selected.can_taste . = TRUE diff --git a/tgui/packages/tgui/interfaces/VorePanel.js b/tgui/packages/tgui/interfaces/VorePanel.js index 0c159870ed..3357ef5109 100644 --- a/tgui/packages/tgui/interfaces/VorePanel.js +++ b/tgui/packages/tgui/interfaces/VorePanel.js @@ -49,7 +49,7 @@ const digestModeToPreyMode = { * show_liq, liq_interacts, liq_reagent_gen, liq_reagent_type, liq_reagent_name, * liq_reagent_transfer_verb, liq_reagent_nutri_rate, liq_reagent_capacity, liq_sloshing, liq_reagent_addons, * show_liq_fullness, liq_messages, liq_msg_toggle1, liq_msg_toggle2, liq_msg_toggle3, liq_msg_toggle4, - * liq_msg_toggle5, liq_msg1, liq_msg2, liq_msg3, liq_msg4, liq_msg5, + * liq_msg_toggle5, liq_msg1, liq_msg2, liq_msg3, liq_msg4, liq_msg5, sound_volume, * * To the tabs section of VoreSelectedBelly return * setTabIndex(5)}> @@ -792,7 +792,7 @@ const VoreSelectedBellySounds = (props, context) => { const { act } = useBackend(context); const { belly } = props; - const { is_wet, wet_loop, fancy, sound, release_sound } = belly; + const { is_wet, wet_loop, fancy, sound, release_sound, sound_volume } = belly; return ( @@ -830,6 +830,12 @@ const VoreSelectedBellySounds = (props, context) => {