improves accuracy of playsounds
removes excessively defined for (var/mob/living/M in contents) that didn't need it
This commit is contained in:
@@ -315,7 +315,7 @@
|
||||
for(var/mob/H in hearing_mobs)
|
||||
if(!istype(H.loc, /obj/item/dogborg/sleeper))
|
||||
H.playsound_local(source, null, 45, falloff = 0, S = pred_death)
|
||||
else
|
||||
else if(H in contents)
|
||||
H.playsound_local(source, null, 65, falloff = 0, S = prey_death)
|
||||
for(var/belly in T.vore_organs)
|
||||
var/obj/belly/B = belly
|
||||
@@ -350,21 +350,20 @@
|
||||
update_gut()
|
||||
|
||||
//sound effects
|
||||
for(var/mob/living/M in contents)
|
||||
if(prob(50))
|
||||
if((world.time - NORMIE_HEARCHECK) > last_hearcheck)
|
||||
var/turf/source = get_turf(hound)
|
||||
LAZYCLEARLIST(hearing_mobs)
|
||||
for(var/mob/H in get_hearers_in_view(3, source))
|
||||
if(!H.client || !(H.client.prefs.cit_toggles & DIGESTION_NOISES))
|
||||
continue
|
||||
LAZYADD(hearing_mobs, H)
|
||||
last_hearcheck = world.time
|
||||
for(var/mob/H in hearing_mobs)
|
||||
if(!istype(H.loc, /obj/item/dogborg/sleeper))
|
||||
H.playsound_local(source, null, 45, falloff = 0, S = pred_digest)
|
||||
else
|
||||
H.playsound_local(source, null, 65, falloff = 0, S = prey_digest)
|
||||
if(prob(50))
|
||||
if((world.time - NORMIE_HEARCHECK) > last_hearcheck)
|
||||
var/turf/source = get_turf(hound)
|
||||
LAZYCLEARLIST(hearing_mobs)
|
||||
for(var/mob/H in get_hearers_in_view(3, source))
|
||||
if(!H.client || !(H.client.prefs.cit_toggles & DIGESTION_NOISES))
|
||||
continue
|
||||
LAZYADD(hearing_mobs, H)
|
||||
last_hearcheck = world.time
|
||||
for(var/mob/H in hearing_mobs)
|
||||
if(!istype(H.loc, /obj/item/dogborg/sleeper))
|
||||
H.playsound_local(source, null, 45, falloff = 0, S = pred_digest)
|
||||
else if(H in contents)
|
||||
H.playsound_local(source, null, 65, falloff = 0, S = prey_digest)
|
||||
|
||||
if(cleaning)
|
||||
addtimer(CALLBACK(src, .proc/clean_cycle), 50)
|
||||
|
||||
@@ -169,7 +169,7 @@
|
||||
//Sound w/ antispam flag setting
|
||||
if(!silent && !recent_sound)
|
||||
for(var/mob/M in get_hearers_in_view(5, get_turf(owner)))
|
||||
if(M.client && M.client.prefs.cit_toggles & EATING_NOISES)
|
||||
if(M.client && (M.client.prefs.cit_toggles & EATING_NOISES))
|
||||
playsound(get_turf(owner),"[src.vore_sound]",50,0,-5,0,ignore_walls = FALSE,channel=CHANNEL_PRED)
|
||||
recent_sound = TRUE
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
AM.forceMove(destination) // Move the belly contents into the same location as belly's owner.
|
||||
count++
|
||||
for(var/mob/M in get_hearers_in_view(5, get_turf(owner)))
|
||||
if(M.client && M.client.prefs.cit_toggles & EATING_NOISES)
|
||||
if(M.client && (M.client.prefs.cit_toggles & EATING_NOISES))
|
||||
playsound(get_turf(owner),"[src.release_sound]",50,0,-5,0,ignore_walls = FALSE,channel=CHANNEL_PRED)
|
||||
if(!silent)
|
||||
owner.visible_message("<font color='green'><b>[owner] expels everything from their [lowertext(name)]!</b></font>")
|
||||
@@ -222,7 +222,7 @@
|
||||
items_preserved -= M
|
||||
if(release_sound)
|
||||
for(var/mob/H in get_hearers_in_view(5, get_turf(owner)))
|
||||
if(H.client && H.client.prefs.cit_toggles & EATING_NOISES)
|
||||
if(H.client && (H.client.prefs.cit_toggles & EATING_NOISES))
|
||||
playsound(get_turf(owner),"[src.release_sound]",50,0,-5,0,ignore_walls = FALSE,channel=CHANNEL_PRED)
|
||||
|
||||
if(istype(M,/mob/living))
|
||||
@@ -298,7 +298,7 @@
|
||||
target.nom_mob(content, target.owner)
|
||||
if(!silent)
|
||||
for(var/mob/M in get_hearers_in_view(5, get_turf(owner)))
|
||||
if(M.client && M.client.prefs.cit_toggles & EATING_NOISES)
|
||||
if(M.client && (M.client.prefs.cit_toggles & EATING_NOISES))
|
||||
playsound(get_turf(owner),"[src.vore_sound]",50,0,-5,0,ignore_walls = FALSE,channel=CHANNEL_PRED)
|
||||
owner.updateVRPanel()
|
||||
for(var/mob/living/M in contents)
|
||||
@@ -512,7 +512,7 @@
|
||||
|
||||
if(!silent)
|
||||
for(var/mob/M in get_hearers_in_view(5, get_turf(owner)))
|
||||
if(M.client && M.client.prefs.cit_toggles & EATING_NOISES)
|
||||
if(M.client && (M.client.prefs.cit_toggles & EATING_NOISES))
|
||||
playsound(get_turf(owner),"struggle_sound",35,0,-5,1,ignore_walls = FALSE,channel=CHANNEL_PRED)
|
||||
R.stop_sound_channel(CHANNEL_PRED)
|
||||
var/sound/prey_struggle = sound(get_sfx("prey_struggle"))
|
||||
|
||||
@@ -68,7 +68,7 @@
|
||||
for(var/mob/H in hearing_mobs)
|
||||
if(!isbelly(H.loc))
|
||||
H.playsound_local(source, null, 45, falloff = 0, S = pred_digest)
|
||||
else
|
||||
else if(H in contents)
|
||||
H.playsound_local(source, null, 65, falloff = 0, S = prey_digest)
|
||||
|
||||
//Pref protection!
|
||||
@@ -105,7 +105,7 @@
|
||||
for(var/mob/H in hearing_mobs)
|
||||
if(!isbelly(H.loc))
|
||||
H.playsound_local(source, null, 45, falloff = 0, S = pred_death)
|
||||
else
|
||||
else if(H in contents)
|
||||
H.playsound_local(source, null, 65, falloff = 0, S = prey_death)
|
||||
M.stop_sound_channel(CHANNEL_PREYLOOP)
|
||||
digestion_death(M)
|
||||
@@ -140,7 +140,7 @@
|
||||
for(var/mob/H in hearing_mobs)
|
||||
if(!isbelly(H.loc))
|
||||
H.playsound_local(source, null, 45, falloff = 0, S = pred_digest)
|
||||
else
|
||||
else if(H in contents)
|
||||
H.playsound_local(source, null, 65, falloff = 0, S = prey_digest)
|
||||
|
||||
if(M.stat != DEAD)
|
||||
@@ -153,20 +153,19 @@
|
||||
////////////////////////// DM_NOISY /////////////////////////////////
|
||||
//for when you just want people to squelch around
|
||||
if(digest_mode == DM_NOISY)
|
||||
for (var/mob/living/M in contents)
|
||||
if(prob(35))
|
||||
if((world.time - NORMIE_HEARCHECK) > last_hearcheck)
|
||||
LAZYCLEARLIST(hearing_mobs)
|
||||
for(var/mob/H in get_hearers_in_view(3, source))
|
||||
if(!H.client || !(H.client.prefs.cit_toggles & DIGESTION_NOISES))
|
||||
continue
|
||||
LAZYADD(hearing_mobs, H)
|
||||
last_hearcheck = world.time
|
||||
for(var/mob/H in hearing_mobs)
|
||||
if(!isbelly(H.loc))
|
||||
H.playsound_local(source, null, 45, falloff = 0, S = pred_digest)
|
||||
else
|
||||
H.playsound_local(source, null, 65, falloff = 0, S = prey_digest)
|
||||
if(prob(35))
|
||||
if((world.time - NORMIE_HEARCHECK) > last_hearcheck)
|
||||
LAZYCLEARLIST(hearing_mobs)
|
||||
for(var/mob/H in get_hearers_in_view(3, source))
|
||||
if(!H.client || !(H.client.prefs.cit_toggles & DIGESTION_NOISES))
|
||||
continue
|
||||
LAZYADD(hearing_mobs, H)
|
||||
last_hearcheck = world.time
|
||||
for(var/mob/H in hearing_mobs)
|
||||
if(!isbelly(H.loc))
|
||||
H.playsound_local(source, null, 45, falloff = 0, S = pred_digest)
|
||||
else if(H in contents)
|
||||
H.playsound_local(source, null, 65, falloff = 0, S = prey_digest)
|
||||
|
||||
|
||||
//////////////////////////// DM_ABSORB ////////////////////////////
|
||||
@@ -185,7 +184,7 @@
|
||||
for(var/mob/H in hearing_mobs)
|
||||
if(!isbelly(H.loc))
|
||||
H.playsound_local(source, null, 45, falloff = 0, S = pred_digest)
|
||||
else
|
||||
else if(H in contents)
|
||||
H.playsound_local(source, null, 65, falloff = 0, S = prey_digest)
|
||||
|
||||
if(M.absorbed)
|
||||
@@ -223,7 +222,7 @@
|
||||
for(var/mob/H in hearing_mobs)
|
||||
if(!isbelly(H.loc))
|
||||
H.playsound_local(source, null, 45, falloff = 0, S = pred_digest)
|
||||
else
|
||||
else if(H in contents)
|
||||
H.playsound_local(source, null, 65, falloff = 0, S = prey_digest)
|
||||
|
||||
//No digestion protection for megafauna.
|
||||
@@ -256,7 +255,7 @@
|
||||
for(var/mob/H in hearing_mobs)
|
||||
if(!isbelly(H.loc))
|
||||
H.playsound_local(source, null, 45, falloff = 0, S = pred_death)
|
||||
else
|
||||
else if(H in contents)
|
||||
H.playsound_local(source, null, 65, falloff = 0, S = prey_death)
|
||||
M.spill_organs(FALSE,TRUE,TRUE)
|
||||
M.stop_sound_channel(CHANNEL_PREYLOOP)
|
||||
|
||||
Reference in New Issue
Block a user