From 9bca7181512c437bb10596bfd8a3f83c126a1aed Mon Sep 17 00:00:00 2001 From: Poojawa Date: Tue, 5 Sep 2017 12:53:35 -0500 Subject: [PATCH] Fixes prey digestion noises and loop (#2616) --- code/__DEFINES/sound.dm | 5 +++-- code/modules/vore/eating/belly_vr.dm | 15 ++++++++------- code/modules/vore/eating/bellymodes_vr.dm | 12 +++++++----- 3 files changed, 18 insertions(+), 14 deletions(-) diff --git a/code/__DEFINES/sound.dm b/code/__DEFINES/sound.dm index 620d8bed10..d3867e5257 100644 --- a/code/__DEFINES/sound.dm +++ b/code/__DEFINES/sound.dm @@ -10,12 +10,13 @@ #define CHANNEL_BICYCLE 1016 //Citadel code -#define CHANNEL_PRED 1018 +#define CHANNEL_PRED 1015 +#define CHANNEL_PREYLOOP 1014 //THIS SHOULD ALWAYS BE THE LOWEST ONE! //KEEP IT UPDATED -#define CHANNEL_HIGHEST_AVAILABLE 1015 +#define CHANNEL_HIGHEST_AVAILABLE 1013 #define CHANNEL_HIGHEST_AVAILABLE 1017 #define SOUND_MINIMUM_PRESSURE 10 diff --git a/code/modules/vore/eating/belly_vr.dm b/code/modules/vore/eating/belly_vr.dm index 1f1af01935..f1e4274ce9 100644 --- a/code/modules/vore/eating/belly_vr.dm +++ b/code/modules/vore/eating/belly_vr.dm @@ -106,7 +106,7 @@ return 0 for (var/atom/movable/M in internal_contents) M.forceMove(owner.loc) // Move the belly contents into the same location as belly's owner. - M << sound(null, repeat = 0, wait = 0, volume = 80, channel = 50) + M << sound(null, repeat = 0, wait = 0, volume = 80, channel = CHANNEL_PREYLOOP) internal_contents.Remove(M) // Remove from the belly contents var/datum/belly/B = check_belly(owner) // This makes sure that the mob behaves properly if released into another mob @@ -124,7 +124,7 @@ return FALSE // They weren't in this belly anyway M.forceMove(owner.loc) // Move the belly contents into the same location as belly's owner. - M << sound(null, repeat = 0, wait = 0, volume = 80, channel = 50) + M << sound(null, repeat = 0, wait = 0, volume = 80, channel = CHANNEL_PREYLOOP) src.internal_contents.Add(M) // Remove from the belly contents var/datum/belly/B = check_belly(owner) if(B) @@ -143,7 +143,7 @@ prey.forceMove(owner) internal_contents.Add(prey) - prey << sound('sound/vore/prey/loop.ogg', repeat = 1, wait = 0, volume = 35, channel = 50) + prey << sound('sound/vore/prey/loop.ogg', repeat = 1, wait = 0, volume = 35, channel = CHANNEL_PREYLOOP) if(inside_flavor) prey << "[inside_flavor]" @@ -224,7 +224,7 @@ /datum/belly/proc/digestion_death(var/mob/living/M) is_full = TRUE internal_contents.Remove(M) - M << sound(null, repeat = 0, wait = 0, volume = 80, channel = 50) + M << sound(null, repeat = 0, wait = 0, volume = 80, channel = CHANNEL_PREYLOOP) // If digested prey is also a pred... anyone inside their bellies gets moved up. if (is_vore_predator(M)) for (var/bellytype in M.vore_organs) @@ -255,6 +255,7 @@ return // User is not in this belly, or struggle too soon. R.setClickCooldown(50) + var/sound/prey_struggle = sound(get_sfx("prey_struggle")) if(owner.stat) //If owner is stat (dead, KO) we can actually escape to_chat(R, "You attempt to climb out of \the [name]. (This will take around [escapetime/10] seconds.)") @@ -288,9 +289,9 @@ // for(var/mob/M in hearers(4, owner)) // M.visible_message(struggle_outer_message) // hearable R.visible_message( "[struggle_outer_message]", "[struggle_user_message]") - playsound(get_turf(owner),"struggle_sound",35,0,-6,1,channel=51) - R.stop_sound_channel(51) - R.playsound_local("prey_struggle_sound",60) + playsound(get_turf(owner),"struggle_sound",35,0,-6,1,channel=151) + R.stop_sound_channel(151) + R.playsound_local(get_turf(R), null, 45, S = prey_struggle) if(escapable && R.a_intent != "help") //If the stomach has escapable enabled and the person is actually trying to kick out to_chat(R, "You attempt to climb out of \the [name].") diff --git a/code/modules/vore/eating/bellymodes_vr.dm b/code/modules/vore/eating/bellymodes_vr.dm index e60feb24c7..19d07e6fb6 100644 --- a/code/modules/vore/eating/bellymodes_vr.dm +++ b/code/modules/vore/eating/bellymodes_vr.dm @@ -1,6 +1,8 @@ // Process the predator's effects upon the contents of its belly (i.e digestion/transformation etc) // Called from /mob/living/Life() proc. /datum/belly/proc/process_Life() + var/sound/prey_gurgle = sound(get_sfx("digest_prey")) + var/sound/prey_digest = sound(get_sfx("death_prey")) /////////////////////////// Auto-Emotes /////////////////////////// if((digest_mode in emote_lists) && !emotePend) @@ -23,7 +25,7 @@ M.stop_sound_channel(CHANNEL_PRED) playsound(get_turf(owner),"digest_pred",50,0,-6,0,channel=CHANNEL_PRED) M.stop_sound_channel(CHANNEL_PRED) - M.playsound_local("digest_prey",45) + M.playsound_local(get_turf(M), null, 45, S = prey_gurgle) //Pref protection! if (!M.digestable) @@ -52,7 +54,7 @@ M.stop_sound_channel(CHANNEL_PRED) playsound(get_turf(owner),"death_pred",45,0,-6,0,channel=CHANNEL_PRED) M.stop_sound_channel(CHANNEL_PRED) - M.playsound_local("death_prey",60) + M.playsound_local(get_turf(M), null, 45, S = prey_digest) digestion_death(M) owner.update_icons() continue @@ -71,7 +73,7 @@ M.stop_sound_channel(CHANNEL_PRED) playsound(get_turf(owner),"digest_pred",35,0,-6,0,channel=CHANNEL_PRED) M.stop_sound_channel(CHANNEL_PRED) - M.playsound_local("digest_prey",35) + M.playsound_local(get_turf(M), null, 45, S = prey_gurgle) if(M.stat != DEAD) if(owner.nutrition >= NUTRITION_LEVEL_STARVING && (M.health < M.maxHealth)) @@ -79,7 +81,7 @@ M.adjustFireLoss(-1) owner.nutrition -= 10 return - + ////////////////////////// DM_NOISY ///////////////////////////////// //for when you just want people to squelch around if(digest_mode == DM_NOISY) @@ -88,4 +90,4 @@ M.stop_sound_channel(CHANNEL_PRED) playsound(get_turf(owner),"digest_pred",35,0,-6,0,channel=CHANNEL_PRED) M.stop_sound_channel(CHANNEL_PRED) - M.playsound_local("digest_prey",35) + M.playsound_local(get_turf(M), null, 45, S = prey_gurgle)