Fixes prey digestion noises and loop (#2616)

This commit is contained in:
Poojawa
2017-09-05 12:53:35 -05:00
committed by GitHub
parent ef83a2db86
commit 9bca718151
3 changed files with 18 additions and 14 deletions

View File

@@ -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

View File

@@ -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 << "<span class='notice'><B>[inside_flavor]</B></span>"
@@ -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, "<span class='warning'>You attempt to climb out of \the [name]. (This will take around [escapetime/10] seconds.)</span>")
@@ -288,9 +289,9 @@
// for(var/mob/M in hearers(4, owner))
// M.visible_message(struggle_outer_message) // hearable
R.visible_message( "<span class='alert'>[struggle_outer_message]</span>", "<span class='alert'>[struggle_user_message]</span>")
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, "<span class='warning'>You attempt to climb out of \the [name].</span>")

View File

@@ -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)