Adds vorgan-specific belly noise freq/pitch settings (#7006)

This commit is contained in:
Verkister
2023-09-19 14:28:33 +03:00
committed by GitHub
parent a72c1aecae
commit b65a5f746b
9 changed files with 70 additions and 27 deletions

View File

@@ -57,7 +57,7 @@
pref.fuzzy = sanitize_integer(pref.fuzzy, 0, 1, initial(pref.fuzzy))
pref.offset_override = sanitize_integer(pref.offset_override, 0, 1, initial(pref.offset_override)) //CHOMPEdit
if(pref.voice_freq != 0)
pref.voice_freq = sanitize_integer(pref.voice_freq, MIN_VOICE_FREQ, MAX_VOICE_FREQ, initial(pref.fuzzy))
pref.voice_freq = sanitize_integer(pref.voice_freq, MIN_VOICE_FREQ, MAX_VOICE_FREQ, initial(pref.voice_freq)) //CHOMPEdit
if(pref.size_multiplier == null || pref.size_multiplier < RESIZE_TINY || pref.size_multiplier > RESIZE_HUGE)
pref.size_multiplier = initial(pref.size_multiplier)
if(!(pref.custom_speech_bubble in selectable_speech_bubbles))
@@ -203,7 +203,7 @@
return
choice = preset_voice_freqs[choice]
if(choice == 0)
pref.voice_freq = choice
pref.voice_freq = 42500 //CHOMPEdit
return TOPIC_REFRESH
else if(choice == 1)
choice = tgui_input_number(user, "Choose your character's voice frequency, ranging from [MIN_VOICE_FREQ] to [MAX_VOICE_FREQ]", "Custom Voice Frequency", null, MAX_VOICE_FREQ, MIN_VOICE_FREQ, round_value = TRUE)

View File

@@ -124,6 +124,7 @@
var/egg_cycles = 0 // Process egg mode after 10 cycles.
var/recycling = FALSE // Recycling mode.
var/entrance_logs = TRUE // Belly-specific entry message toggle.
var/noise_freq = 42500 // Tasty sound prefs.
/obj/belly/proc/GetFullnessFromBelly()
if(!affects_vore_sprites)

View File

@@ -316,7 +316,8 @@
"egg_name",
"recycling",
"is_feedable",
"entrance_logs", //CHOMP end of variables from CHOMP
"entrance_logs",
"noise_freq", //CHOMP end of variables from CHOMP
"egg_type",
"save_digest_mode",
"eating_privacy_local",
@@ -366,7 +367,7 @@
var/turf/simulated/T = owner.loc
var/S = pick(T.base_vorefootstep_sounds["human"]) //ChompEDIT
if(S)
playsound(T, S, sound_volume * (reagents.total_volume / 100), FALSE, preference = /datum/client_preference/digestion_noises)
playsound(T, S, sound_volume * (reagents.total_volume / 100), FALSE, frequency = noise_freq, preference = /datum/client_preference/digestion_noises) //CHOMPEdit
cycle_sloshed = TRUE
thing.belly_cycles = 0 //reset cycle count
if(istype(thing, /mob/observer)) //Silence, spook.
@@ -398,7 +399,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 = sound_volume, vary = 1, falloff = VORE_SOUND_FALLOFF, preference = /datum/client_preference/eating_noises, volume_channel = VOLUME_CHANNEL_VORE) //CHOMPEdit
playsound(src, soundfile, vol = sound_volume, vary = 1, falloff = VORE_SOUND_FALLOFF, frequency = noise_freq, preference = /datum/client_preference/eating_noises, volume_channel = VOLUME_CHANNEL_VORE) //CHOMPEdit
recent_sound = TRUE
if(reagents.total_volume >= 5 && !isliving(thing)) //CHOMPAdd
@@ -780,7 +781,7 @@
else
soundfile = fancy_release_sounds[release_sound]
if(soundfile)
playsound(src, soundfile, vol = sound_volume, vary = 1, falloff = VORE_SOUND_FALLOFF, preference = /datum/client_preference/eating_noises, volume_channel = VOLUME_CHANNEL_VORE) //CHOPEdit
playsound(src, soundfile, vol = sound_volume, vary = 1, falloff = VORE_SOUND_FALLOFF, frequency = noise_freq, preference = /datum/client_preference/eating_noises, volume_channel = VOLUME_CHANNEL_VORE) //CHOMPEdit
return count
@@ -862,7 +863,7 @@
else
soundfile = fancy_release_sounds[release_sound]
if(soundfile)
playsound(src, soundfile, vol = sound_volume, vary = 1, falloff = VORE_SOUND_FALLOFF, preference = /datum/client_preference/eating_noises, volume_channel = VOLUME_CHANNEL_VORE) //CHOPEdit
playsound(src, soundfile, vol = sound_volume, vary = 1, falloff = VORE_SOUND_FALLOFF, frequency = noise_freq, preference = /datum/client_preference/eating_noises, volume_channel = VOLUME_CHANNEL_VORE) //CHOMPEdit
//Should fix your view not following you out of mobs sometimes!
if(ismob(M))
var/mob/ourmob = M
@@ -1424,9 +1425,9 @@
struggle_snuggle = sound(get_sfx("classic_struggle_sounds"))
else
struggle_snuggle = sound(get_sfx("fancy_prey_struggle"))
playsound(src, struggle_snuggle, vary = 1, vol = 75, falloff = VORE_SOUND_FALLOFF, preference = /datum/client_preference/digestion_noises, volume_channel = VOLUME_CHANNEL_VORE)
playsound(src, struggle_snuggle, vary = 1, vol = 75, falloff = VORE_SOUND_FALLOFF, frequency = noise_freq, preference = /datum/client_preference/digestion_noises, volume_channel = VOLUME_CHANNEL_VORE) //CHOMPEdit
else
playsound(src, struggle_rustle, vary = 1, vol = 75, falloff = VORE_SOUND_FALLOFF, preference = /datum/client_preference/digestion_noises, volume_channel = VOLUME_CHANNEL_VORE)
playsound(src, struggle_rustle, vary = 1, vol = 75, falloff = VORE_SOUND_FALLOFF, frequency = noise_freq, preference = /datum/client_preference/digestion_noises, volume_channel = VOLUME_CHANNEL_VORE) //CHOMPEdit
if(escapable) //If the stomach has escapable enabled.
if(prob(escapechance)) //Let's have it check to see if the prey escapes first.
@@ -1553,9 +1554,9 @@
struggle_snuggle = sound(get_sfx("classic_struggle_sounds"))
else
struggle_snuggle = sound(get_sfx("fancy_prey_struggle"))
playsound(src, struggle_snuggle, vary = 1, vol = 75, falloff = VORE_SOUND_FALLOFF, preference = /datum/client_preference/digestion_noises, volume_channel = VOLUME_CHANNEL_VORE)
playsound(src, struggle_snuggle, vary = 1, vol = 75, falloff = VORE_SOUND_FALLOFF, frequency = noise_freq, preference = /datum/client_preference/digestion_noises, volume_channel = VOLUME_CHANNEL_VORE) //CHOMPEdit
else
playsound(src, struggle_rustle, vary = 1, vol = 75, falloff = VORE_SOUND_FALLOFF, preference = /datum/client_preference/digestion_noises, volume_channel = VOLUME_CHANNEL_VORE)
playsound(src, struggle_rustle, vary = 1, vol = 75, falloff = VORE_SOUND_FALLOFF, frequency = noise_freq, preference = /datum/client_preference/digestion_noises, volume_channel = VOLUME_CHANNEL_VORE) //CHOMPEdit
/obj/belly/proc/get_mobs_and_objs_in_belly()
var/list/see = list()
@@ -1720,7 +1721,8 @@
dupe.egg_name = egg_name
dupe.recycling = recycling
dupe.is_feedable = is_feedable
dupe.entrance_logs = entrance_logs //CHOMP end of variables from CHOMP
dupe.entrance_logs = entrance_logs
dupe.noise_freq = noise_freq //CHOMP end of variables from CHOMP
dupe.belly_fullscreen = belly_fullscreen
dupe.disable_hud = disable_hud

View File

@@ -99,9 +99,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 = sound_volume, vary = 1, falloff = VORE_SOUND_FALLOFF) //CHOMPEdit
M.playsound_local(get_turf(owner), play_sound, vol = sound_volume, vary = 1, falloff = VORE_SOUND_FALLOFF, frequency = noise_freq) //CHOMPEdit
else
M.playsound_local(get_turf(owner), play_sound, vol = sound_volume, vary = 1, falloff = VORE_SOUND_FALLOFF) //CHOMPEdit
M.playsound_local(get_turf(owner), play_sound, vol = sound_volume, vary = 1, falloff = VORE_SOUND_FALLOFF, frequency = noise_freq) //CHOMPEdit
//these are all external sound triggers now, so it's ok.
return
@@ -126,9 +126,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 = sound_volume, vary = 1, falloff = VORE_SOUND_FALLOFF) //CHOMPEdit
M.playsound_local(get_turf(owner), play_sound, vol = sound_volume, vary = 1, falloff = VORE_SOUND_FALLOFF, frequency = noise_freq) //CHOMPEdit
else
M.playsound_local(get_turf(owner), play_sound, vol = sound_volume, vary = 1, falloff = VORE_SOUND_FALLOFF) //CHOMPEdit
M.playsound_local(get_turf(owner), play_sound, vol = sound_volume, vary = 1, falloff = VORE_SOUND_FALLOFF, frequency = noise_freq) //CHOMPEdit
//these are all external sound triggers now, so it's ok.
if(emote_active)
@@ -272,7 +272,7 @@
if(isbelly(M.loc) && is_wet && wet_loop && (world.time > M.next_preyloop))
M.stop_sound_channel(CHANNEL_PREYLOOP)
var/sound/preyloop = sound('sound/vore/sunesound/prey/loop.ogg')
M.playsound_local(get_turf(src), preyloop, 80, 0, channel = CHANNEL_PREYLOOP)
M.playsound_local(get_turf(src), preyloop, 80, 0, channel = CHANNEL_PREYLOOP, frequency = noise_freq) //CHOMPEdit
M.next_preyloop = (world.time + (52 SECONDS))
/obj/belly/proc/handle_digesting_item(obj/item/I, touchable_amount) //CHOMPEdit

View File

@@ -93,8 +93,10 @@
O.forceMove(src.loc)
GLOB.items_digested_roundstat++
var/g_sound_volume = 100
var/noise_freq = 42500
if(istype(B))
g_sound_volume = B.sound_volume
noise_freq = B.noise_freq
var/soundfile
if(w_class >= 4)
soundfile = pick('sound/vore/shortgurgles/gurgle_L1.ogg', 'sound/vore/shortgurgles/gurgle_L2.ogg', 'sound/vore/shortgurgles/gurgle_L3.ogg')
@@ -102,7 +104,7 @@
soundfile = pick('sound/vore/shortgurgles/gurgle_M1.ogg', 'sound/vore/shortgurgles/gurgle_M2.ogg', 'sound/vore/shortgurgles/gurgle_M3.ogg')
else
soundfile = pick('sound/vore/shortgurgles/gurgle_S1.ogg', 'sound/vore/shortgurgles/gurgle_S2.ogg', 'sound/vore/shortgurgles/gurgle_S3.ogg')
playsound(src, soundfile, vol = g_sound_volume, vary = 1, falloff = VORE_SOUND_FALLOFF, preference = /datum/client_preference/eating_noises, volume_channel = VOLUME_CHANNEL_VORE)
playsound(src, soundfile, vol = g_sound_volume, vary = 1, falloff = VORE_SOUND_FALLOFF, frequency = noise_freq, preference = /datum/client_preference/eating_noises, volume_channel = VOLUME_CHANNEL_VORE) //CHOMPEdit
if(istype(B) && B.recycle(src))
g_damage = w_class / 2
qdel(src)

View File

@@ -276,7 +276,8 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono",
"tail_to_change_to" = selected.tail_to_change_to,
"tail_colouration" = selected.tail_colouration,
"tail_extra_overlay" = selected.tail_extra_overlay,
"tail_extra_overlay2" = selected.tail_extra_overlay2
"tail_extra_overlay2" = selected.tail_extra_overlay2,
"noise_freq" = selected.noise_freq
//"marking_to_add" = selected.marking_to_add
//CHOMPEdit end
)
@@ -940,6 +941,10 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono",
var/new_sound_volume = belly_data["sound_volume"]
new_belly.sound_volume = sanitize_integer(new_sound_volume, 0, 100, initial(new_belly.sound_volume))
if(isnum(belly_data["noise_freq"])) //CHOMPAdd Start
var/new_noise_freq = belly_data["noise_freq"]
new_belly.noise_freq = sanitize_integer(new_noise_freq, MIN_VOICE_FREQ, MAX_VOICE_FREQ, initial(new_belly.noise_freq)) //CHOMPAdd End
// Visuals
if(isnum(belly_data["affects_vore_sprites"]))
var/new_affects_vore_sprites = belly_data["affects_vore_sprites"]
@@ -2514,20 +2519,37 @@ var/global/list/belly_colorable_only_fullscreens = list("a_synth_flesh_mono",
if(voretest)
SEND_SOUND(user, voretest)
. = TRUE
if("b_sound_volume") //CHOMPAdd
if("b_sound_volume") //CHOMPAdd Start
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_noise_freq")
var/list/preset_noise_freqs = list("high" = MAX_VOICE_FREQ, "middle-high" = 56250, "middle" = 42500, "middle-low"= 28750, "low" = MIN_VOICE_FREQ, "custom" = 1, "random" = 0)
var/choice = tgui_input_list(user, "What would you like to set your noise frequency to? ([MIN_VOICE_FREQ] - [MAX_VOICE_FREQ])", "Noise Frequency", preset_noise_freqs)
if(!choice)
return
choice = preset_noise_freqs[choice]
if(choice == 0)
host.vore_selected.noise_freq = 42500
return TOPIC_REFRESH
else if(choice == 1)
choice = tgui_input_number(user, "Choose your organ's noise frequency, ranging from [MIN_VOICE_FREQ] to [MAX_VOICE_FREQ]", "Custom Noise Frequency", null, MAX_VOICE_FREQ, MIN_VOICE_FREQ, round_value = TRUE)
if(choice > MAX_VOICE_FREQ)
choice = MAX_VOICE_FREQ
else if(choice < MIN_VOICE_FREQ)
choice = MIN_VOICE_FREQ
host.vore_selected.noise_freq = choice
. = TRUE //CHOMPAdd End
if("b_tastes")
host.vore_selected.can_taste = !host.vore_selected.can_taste
. = TRUE
if("b_feedable") //CHOMPAdd
if("b_feedable") //CHOMPAdd Start
host.vore_selected.is_feedable = !host.vore_selected.is_feedable
. = TRUE
if("b_entrance_logs") //CHOMPAdd
if("b_entrance_logs")
host.vore_selected.entrance_logs = !host.vore_selected.entrance_logs
. = TRUE
. = TRUE //CHOMPAdd End
if("b_bulge_size")
var/new_bulge = tgui_input_number(user, "Choose the required size prey must be to show up on examine, ranging from 25% to 200% Set this to 0 for no text on examine.", "Set Belly Examine Size.", max_value = 200, min_value = 0)
if(new_bulge == null)

View File

@@ -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, sound_volume, egg_name, recycling, entrance_logs,
* liq_msg_toggle5, liq_msg1, liq_msg2, liq_msg3, liq_msg4, liq_msg5, sound_volume, egg_name, recycling, entrance_logs, noise_freq,
* custom_reagentcolor, custom_reagentalpha, liquid_overlay, max_liquid_level, mush_overlay, mush_color, mush_alpha, max_mush, min_mush, item_mush_val
*
* To the tabs section of VoreSelectedBelly return
@@ -1008,7 +1008,15 @@ const VoreSelectedBellySounds = (props, context) => {
const { act } = useBackend(context);
const { belly } = props;
const { is_wet, wet_loop, fancy, sound, release_sound, sound_volume } = belly;
const {
is_wet,
wet_loop,
fancy,
sound,
release_sound,
sound_volume,
noise_freq,
} = belly;
return (
<Flex wrap="wrap">
@@ -1070,6 +1078,14 @@ const VoreSelectedBellySounds = (props, context) => {
content={sound_volume + '%'}
/>
</LabeledList.Item>
<LabeledList.Item label="Noise Frequency">
<Button
onClick={() =>
act('set_attribute', { attribute: 'b_noise_freq' })
}
content={noise_freq}
/>
</LabeledList.Item>
</LabeledList>
</Flex.Item>
</Flex>

File diff suppressed because one or more lines are too long

View File

@@ -4698,7 +4698,6 @@
#include "modular_chomp\code\modules\mob\living\carbon\human\species\station\traits\positive.dm"
#include "modular_chomp\code\modules\mob\living\carbon\human\species\station\traits\xenomorph_hybrid_trait.dm"
#include "modular_chomp\code\modules\mob\living\silicon\robot\drone\drone_items.dm"
#include "modular_chomp\code\modules\mob\living\simple_animal\aliens\synx.dm"
#include "modular_chomp\code\modules\mob\living\silicon\robot\sprites\civilian.dm"
#include "modular_chomp\code\modules\mob\living\silicon\robot\sprites\clown.dm"
#include "modular_chomp\code\modules\mob\living\silicon\robot\sprites\combat.dm"
@@ -4711,6 +4710,7 @@
#include "modular_chomp\code\modules\mob\living\silicon\robot\sprites\mining.dm"
#include "modular_chomp\code\modules\mob\living\silicon\robot\sprites\science.dm"
#include "modular_chomp\code\modules\mob\living\silicon\robot\sprites\security.dm"
#include "modular_chomp\code\modules\mob\living\simple_animal\aliens\synx.dm"
#include "modular_chomp\code\modules\mob\living\simple_mob\butchering.dm"
#include "modular_chomp\code\modules\mob\living\simple_mob\donteatbossmonsters.dm"
#include "modular_chomp\code\modules\mob\living\simple_mob\simple_mob.dm"