Improving Sounds yet again

This commit is contained in:
Poojawa
2019-10-15 08:58:22 -05:00
parent 4396bd4280
commit 04b414f6b4
5 changed files with 154 additions and 72 deletions
+82 -30
View File
@@ -170,12 +170,21 @@
//Sound w/ antispam flag setting
if(vore_sound && !recent_sound)
var/turf/source = get_turf(owner)
var/sound/eating = GLOB.vore_sounds[vore_sound]
for(var/mob/living/M in get_hearers_in_view(3, source))
if(M.client && M.client.prefs.cit_toggles & EATING_NOISES)
SEND_SOUND(M, eating)
recent_sound = TRUE
if((world.time + NORMIE_HEARCHECK) > last_hearcheck)
LAZYCLEARLIST(hearing_mobs)
for(var/mob/living/H in get_hearers_in_view(3, owner))
if(!H.client || !(H.client.prefs.cit_toggles & EATING_NOISES))
continue
LAZYADD(hearing_mobs, H)
last_hearcheck = world.time
for(var/mob/living/H in hearing_mobs)
if(H && H.client && (isturf(H.loc) || (H.loc != src.contents)))
var/sound/eating = GLOB.pred_vore_sounds[vore_sound]
SEND_SOUND(H,eating)
else if(H && H in contents && H.client)
var/sound/eating = GLOB.prey_vore_sounds[vore_sound]
SEND_SOUND(H,eating)
recent_sound = TRUE
//Messages if it's a mob
if(isliving(thing))
@@ -214,10 +223,22 @@
owner.update_icons()
if(!silent)
for(var/mob/living/M in get_hearers_in_view(2, get_turf(owner)))
if(M.client && (M.client.prefs.cit_toggles & EATING_NOISES))
var/sound/releasement = GLOB.release_sounds[release_sound]
SEND_SOUND(M, releasement)
if(release_sound && !recent_sound)
if((world.time + NORMIE_HEARCHECK) > last_hearcheck)
LAZYCLEARLIST(hearing_mobs)
for(var/mob/living/H in get_hearers_in_view(3, owner))
if(!H.client || !(H.client.prefs.cit_toggles & EATING_NOISES))
continue
LAZYADD(hearing_mobs, H)
last_hearcheck = world.time
for(var/mob/living/H in hearing_mobs)
if(H && H.client && (isturf(H.loc) || (H.loc != src.contents)))
var/sound/releasement = GLOB.pred_release_sounds[release_sound]
SEND_SOUND(H,releasement)
else if(H && H in contents && H.client)
var/sound/releasement = GLOB.prey_release_sounds[release_sound]
SEND_SOUND(H,releasement)
recent_sound = TRUE
owner.visible_message("<font color='green'><b>[owner] expels everything from their [lowertext(name)]!</b></font>")
return count
@@ -259,10 +280,22 @@
owner.update_icons()
if(!silent)
for(var/mob/living/H in get_hearers_in_view(2, get_turf(owner)))
if(H.client && (H.client.prefs.cit_toggles & EATING_NOISES))
var/sound/releasement = GLOB.release_sounds[release_sound]
SEND_SOUND(H, releasement)
if(release_sound && !recent_sound)
if((world.time + NORMIE_HEARCHECK) > last_hearcheck)
LAZYCLEARLIST(hearing_mobs)
for(var/mob/living/H in get_hearers_in_view(3, owner))
if(!H.client || !(H.client.prefs.cit_toggles & EATING_NOISES))
continue
LAZYADD(hearing_mobs, H)
last_hearcheck = world.time
for(var/mob/living/H in hearing_mobs)
if(H && H.client && (isturf(H.loc) || (H.loc != src.contents)))
var/sound/releasement = GLOB.pred_release_sounds[release_sound]
SEND_SOUND(H,releasement)
else if(H && H in contents && H.client)
var/sound/releasement = GLOB.prey_release_sounds[release_sound]
SEND_SOUND(H,releasement)
recent_sound = TRUE
owner.visible_message("<font color='green'><b>[owner] expels [M] from their [lowertext(name)]!</b></font>")
return TRUE
@@ -312,11 +345,22 @@
for(var/mob/living/M in contents)
M.cure_blind("belly_[REF(src)]")
// target.nom_mob(content, target.owner)
if(!silent)
var/sound/eating = GLOB.vore_sounds[vore_sound]
for(var/mob/living/M in get_hearers_in_view(3, src))
if(M.client && M.client.prefs.cit_toggles & EATING_NOISES)
SEND_SOUND(M, eating)
if(vore_sound && !recent_sound && !silent)
if((world.time + NORMIE_HEARCHECK) > last_hearcheck)
LAZYCLEARLIST(hearing_mobs)
for(var/mob/living/H in get_hearers_in_view(3, owner))
if(!H.client || !(H.client.prefs.cit_toggles & EATING_NOISES))
continue
LAZYADD(hearing_mobs, H)
last_hearcheck = world.time
for(var/mob/living/H in hearing_mobs)
if(H && H.client && (isturf(H.loc) || (H.loc != src.contents)))
var/sound/eating = GLOB.pred_vore_sounds[vore_sound]
SEND_SOUND(H,eating)
else if(H && H in contents && H.client)
var/sound/eating = GLOB.prey_vore_sounds[vore_sound]
SEND_SOUND(H,eating)
recent_sound = TRUE
owner.updateVRPanel()
for(var/mob/living/M in contents)
@@ -524,23 +568,31 @@
struggle_outer_message = "<span class='alert'>" + struggle_outer_message + "</span>"
struggle_user_message = "<span class='alert'>" + struggle_user_message + "</span>"
var/sound/struggle_snuggle = sound(get_sfx("struggle_sound"))
var/sound/pred_struggle_snuggle = sound(get_sfx("struggle_sound"))
var/sound/prey_struggle_snuggle = sound(get_sfx("prey_struggle"))
var/sound/struggle_rustle = sound(get_sfx("rustle"))
LAZYCLEARLIST(hearing_mobs)
for(var/mob/living/H in get_hearers_in_view(3, owner))
if(!H.client || !(H.client.prefs.cit_toggles & EATING_NOISES))
continue
LAZYADD(hearing_mobs, H)
if(is_wet)
for(var/mob/living/M in get_hearers_in_view(3, src))
if(M.client && M.client.prefs.cit_toggles & EATING_NOISES)
SEND_SOUND(M, struggle_snuggle)
for(var/mob/living/H in hearing_mobs)
if(H && H.client && (isturf(H.loc) || (H.loc != src.contents)))
SEND_SOUND(H,pred_struggle_snuggle)
else if(H && H in contents && H.client)
SEND_SOUND(H,prey_struggle_snuggle)
else
for(var/mob/living/M in get_hearers_in_view(3, src))
if(M.client && M.client.prefs.cit_toggles & EATING_NOISES)
SEND_SOUND(M, struggle_rustle)
for(var/mob/living/H in hearing_mobs)
if(H && H.client)
SEND_SOUND(H, struggle_rustle)
var/list/watching = hearers(3, owner)
for(var/mob/living/M in watching)
if(M.client && (M.client.prefs.cit_toggles & EATING_NOISES)) //Might as well censor the normies here too.
M.show_message(struggle_outer_message, 1) // visible
for(var/mob/living/H in hearing_mobs)
if(H && H.client && (isturf(H.loc)))
H.show_message(struggle_outer_message, 1) // visible
to_chat(R,struggle_user_message)
+24 -24
View File
@@ -31,16 +31,16 @@
///////////////////// Prey Loop Refresh/hack //////////////////////
for(var/mob/living/M in contents)
if(isbelly(M.loc))
if(M && isbelly(M.loc))
if(world.time > M.next_preyloop)
if(is_wet && wet_loop)
if(!M.client)
continue
M.stop_sound_channel(CHANNEL_PREYLOOP) // sanity just in case
if(M.client.prefs.cit_toggles & DIGESTION_NOISES)
var/sound/preyloop = sound('sound/vore/prey/loop.ogg', repeat = TRUE)
var/sound/preyloop = sound('sound/vore/prey/loop.ogg')
M.playsound_local(get_turf(src),preyloop, 80,0, channel = CHANNEL_PREYLOOP)
M.next_preyloop = (world.time + 52 SECONDS)
M.next_preyloop = (world.time + 51 SECONDS)
/////////////////////////// Exit Early ////////////////////////////
@@ -71,7 +71,7 @@
for (var/mob/living/M in contents)
if(prob(25))
if((world.time - NORMIE_HEARCHECK) > last_hearcheck)
if((world.time + NORMIE_HEARCHECK) > last_hearcheck)
LAZYCLEARLIST(hearing_mobs)
for(var/mob/living/H in get_hearers_in_view(3, owner))
if(!H.client || !(H.client.prefs.cit_toggles & DIGESTION_NOISES))
@@ -79,9 +79,9 @@
LAZYADD(hearing_mobs, H)
last_hearcheck = world.time
for(var/mob/living/H in hearing_mobs)
if(H.client && (isturf(H.loc) || (H.loc != src.contents)))
if(H && H.client && (isturf(H.loc) || (H.loc != src.contents)))
SEND_SOUND(H,pred_digest)
else if(H in contents && H.client)
else if(H && H in contents && H.client)
SEND_SOUND(H,prey_digest)
//Pref protection!
@@ -108,7 +108,7 @@
M.visible_message("<span class='notice'>You watch as [owner]'s form loses its additions.</span>")
owner.nutrition += 400 // so eating dead mobs gives you *something*.
if((world.time - NORMIE_HEARCHECK) > last_hearcheck)
if((world.time + NORMIE_HEARCHECK) > last_hearcheck)
LAZYCLEARLIST(hearing_mobs)
for(var/mob/living/H in get_hearers_in_view(3, owner))
if(!H.client || !(H.client.prefs.cit_toggles & DIGESTION_NOISES))
@@ -116,9 +116,9 @@
LAZYADD(hearing_mobs, H)
last_hearcheck = world.time
for(var/mob/living/H in hearing_mobs)
if(H.client && (isturf(H.loc) || (H.loc != src.contents)))
if(H && H.client && (isturf(H.loc) || (H.loc != src.contents)))
SEND_SOUND(H,pred_death)
else if(H in contents && H.client)
else if(H && H in contents && H.client)
SEND_SOUND(H,prey_death)
M.stop_sound_channel(CHANNEL_PREYLOOP)
digestion_death(M)
@@ -142,7 +142,7 @@
if(digest_mode == DM_HEAL)
for (var/mob/living/M in contents)
if(prob(25))
if((world.time - NORMIE_HEARCHECK) > last_hearcheck)
if((world.time + NORMIE_HEARCHECK) > last_hearcheck)
LAZYCLEARLIST(hearing_mobs)
for(var/mob/living/H in get_hearers_in_view(3, owner))
if(!H.client || !(H.client.prefs.cit_toggles & DIGESTION_NOISES))
@@ -150,9 +150,9 @@
LAZYADD(hearing_mobs, H)
last_hearcheck = world.time
for(var/mob/living/H in hearing_mobs)
if(H.client && (isturf(H.loc) || (H.loc != src.contents)))
if(H && H.client && (isturf(H.loc) || (H.loc != src.contents)))
SEND_SOUND(H,pred_digest)
else if(H in contents && H.client)
else if(H && H in contents && H.client)
SEND_SOUND(H,prey_digest)
if(M.stat != DEAD)
@@ -165,7 +165,7 @@
//for when you just want people to squelch around
if(digest_mode == DM_NOISY)
if(prob(35))
if((world.time - NORMIE_HEARCHECK) > last_hearcheck)
if((world.time + NORMIE_HEARCHECK) > last_hearcheck)
LAZYCLEARLIST(hearing_mobs)
for(var/mob/living/H in get_hearers_in_view(3, owner))
if(!H.client || !(H.client.prefs.cit_toggles & DIGESTION_NOISES))
@@ -173,9 +173,9 @@
LAZYADD(hearing_mobs, H)
last_hearcheck = world.time
for(var/mob/living/H in hearing_mobs)
if(H.client && (isturf(H.loc) || (H.loc != src.contents)))
if(H && H.client && (isturf(H.loc) || (H.loc != src.contents)))
SEND_SOUND(H,pred_digest)
else if(H in contents && H.client)
else if(H && H in contents && H.client)
SEND_SOUND(H,prey_digest)
@@ -185,7 +185,7 @@
for (var/mob/living/M in contents)
if(prob(10))//Less often than gurgles. People might leave this on forever.
if((world.time - NORMIE_HEARCHECK) > last_hearcheck)
if((world.time + NORMIE_HEARCHECK) > last_hearcheck)
LAZYCLEARLIST(hearing_mobs)
for(var/mob/living/H in get_hearers_in_view(3, owner))
if(!H.client || !(H.client.prefs.cit_toggles & DIGESTION_NOISES))
@@ -193,9 +193,9 @@
LAZYADD(hearing_mobs, H)
last_hearcheck = world.time
for(var/mob/living/H in hearing_mobs)
if(H.client && (isturf(H.loc) || (H.loc != src.contents)))
if(H && H.client && (isturf(H.loc) || (H.loc != src.contents)))
SEND_SOUND(H,pred_digest)
else if(H in contents && H.client)
else if(H && H in contents && H.client)
SEND_SOUND(H,prey_digest)
if(M.absorbed)
@@ -229,7 +229,7 @@
for (var/mob/living/M in contents)
if(prob(55)) //if you're hearing this, you're a vore ho anyway.
if((world.time - NORMIE_HEARCHECK) > last_hearcheck)
if((world.time + NORMIE_HEARCHECK) > last_hearcheck)
LAZYCLEARLIST(hearing_mobs)
for(var/mob/living/H in get_hearers_in_view(3, owner))
if(!H.client || !(H.client.prefs.cit_toggles & DIGESTION_NOISES))
@@ -237,9 +237,9 @@
LAZYADD(hearing_mobs, H)
last_hearcheck = world.time
for(var/mob/living/H in hearing_mobs)
if(H.client && (isturf(H.loc) || (H.loc != src.contents)))
if(H && H.client && (isturf(H.loc) || (H.loc != src.contents)))
SEND_SOUND(H,pred_digest)
else if(H in contents && H.client)
else if(H && H in contents && H.client)
SEND_SOUND(H,prey_digest)
//No digestion protection for megafauna.
@@ -262,7 +262,7 @@
to_chat(owner, "<span class='warning'>[digest_alert_owner]</span>")
to_chat(M, "<span class='warning'>[digest_alert_prey]</span>")
M.visible_message("<span class='notice'>You watch as [owner]'s guts loudly rumble as it finishes off a meal.</span>")
if((world.time - NORMIE_HEARCHECK) > last_hearcheck)
if((world.time + NORMIE_HEARCHECK) > last_hearcheck)
LAZYCLEARLIST(hearing_mobs)
for(var/mob/living/H in get_hearers_in_view(3, owner))
if(!H.client || !(H.client.prefs.cit_toggles & DIGESTION_NOISES))
@@ -270,9 +270,9 @@
LAZYADD(hearing_mobs, H)
last_hearcheck = world.time
for(var/mob/living/H in hearing_mobs)
if(H.client && (isturf(H.loc) || (H.loc != src.contents)))
if(H && H.client && (isturf(H.loc) || (H.loc != src.contents)))
SEND_SOUND(H,pred_death)
else if(H in contents && H.client)
else if(H && H in contents && H.client)
SEND_SOUND(H,prey_death)
M.spill_organs(FALSE,TRUE,TRUE)
M.stop_sound_channel(CHANNEL_PREYLOOP)
+10 -12
View File
@@ -126,7 +126,7 @@
//Sanity
if(!user || !prey || !pred || !istype(belly) || !(belly in pred.vore_organs))
testing("[user] attempted to feed [prey] to [pred], via [lowertext(belly.name)] but it went wrong.")
return FALSE
return
if (!prey.devourable)
to_chat(user, "This can't be eaten!")
@@ -151,9 +151,14 @@
user.visible_message(attempt_msg)
// Now give the prey time to escape... return if they did
var/swallow_time = delay || ishuman(prey) ? belly.human_prey_swallow_time : belly.nonhuman_prey_swallow_time
var/swallow_time
if(delay)
swallow_time = delay
else
swallow_time = istype(prey, /mob/living/carbon/human) ? belly.human_prey_swallow_time : belly.nonhuman_prey_swallow_time
if(!do_mob(src, user, swallow_time))
//Timer and progress bar
if(!do_after(user, swallow_time, prey))
return FALSE // Prey escaped (or user disabled) before timer expired.
if(!prey.Adjacent(user)) //double check'd just in case they moved during the timer and the do_mob didn't fail for whatever reason
@@ -162,13 +167,6 @@
// If we got this far, nom successful! Announce it!
user.visible_message(success_msg)
// incredibly contentious eating noises time
var/turf/source = get_turf(user)
var/sound/eating = GLOB.vore_sounds[belly.vore_sound]
for(var/mob/living/M in get_hearers_in_view(3, source))
if(M.client && M.client.prefs.cit_toggles & EATING_NOISES)
SEND_SOUND(M, eating)
// Actually shove prey into the belly.
belly.nom_mob(prey, user)
stop_pulling()
@@ -218,9 +216,9 @@
/mob/living/proc/preyloop_refresh()
set name = "Internal loop refresh"
set category = "Vore"
src.stop_sound_channel(CHANNEL_PREYLOOP) // sanity just in case
if(isbelly(loc))
src.stop_sound_channel(CHANNEL_PREYLOOP) // sanity just in case
var/sound/preyloop = sound('sound/vore/prey/loop.ogg', repeat = TRUE)
var/sound/preyloop = sound('sound/vore/prey/loop.ogg')
SEND_SOUND(src, preyloop)
else
to_chat(src, "<span class='alert'>You aren't inside anything, you clod.</span>")
+4 -4
View File
@@ -548,7 +548,7 @@
selected.vore_verb = new_verb
if(href_list["b_release"])
var/choice = input(user,"Currently set to [selected.release_sound]","Select Sound") as null|anything in GLOB.release_sounds
var/choice = input(user,"Currently set to [selected.release_sound]","Select Sound") as null|anything in GLOB.pred_release_sounds
if(!choice)
return
@@ -556,12 +556,12 @@
selected.release_sound = choice
if(href_list["b_releasesoundtest"])
var/sound/releasetest = GLOB.release_sounds[selected.release_sound]
var/sound/releasetest = GLOB.prey_release_sounds[selected.release_sound]
if(releasetest)
SEND_SOUND(user, releasetest)
if(href_list["b_sound"])
var/choice = input(user,"Currently set to [selected.vore_sound]","Select Sound") as null|anything in GLOB.vore_sounds
var/choice = input(user,"Currently set to [selected.vore_sound]","Select Sound") as null|anything in GLOB.pred_vore_sounds
if(!choice)
return
@@ -569,7 +569,7 @@
selected.vore_sound = choice
if(href_list["b_soundtest"])
var/sound/voretest = GLOB.vore_sounds[selected.vore_sound]
var/sound/voretest = GLOB.prey_vore_sounds[selected.vore_sound]
if(voretest)
SEND_SOUND(user, voretest)