-
-
Notifications
You must be signed in to change notification settings - Fork 444
/
Copy pathsound.dm
425 lines (371 loc) · 19.1 KB
/
sound.dm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
GLOBAL_LIST_INIT(alt_sound_overrides, list(
'sound/machines/twobeep_voice1.ogg' = 'sound/machines/twobeep_high.ogg',
'sound/machines/twobeep_voice2.ogg' = 'sound/machines/twobeep_high.ogg',
'sound/misc/nootnoot.ogg' = 'yogstation/sound/misc/bikehorn_alert.ogg',
'sound/items/pshoom_2.ogg' = 'sound/items/pshoom.ogg',
))
///Default override for echo
/sound
echo = list(
0, // Direct
0, // DirectHF
-10000, // Room, -10000 means no low frequency sound reverb
-10000, // RoomHF, -10000 means no high frequency sound reverb
0, // Obstruction
0, // ObstructionLFRatio
0, // Occlusion
0.25, // OcclusionLFRatio
1.5, // OcclusionRoomRatio
1.0, // OcclusionDirectRatio
0, // Exclusion
1.0, // ExclusionLFRatio
0, // OutsideVolumeHF
0, // DopplerFactor
0, // RolloffFactor
0, // RoomRolloffFactor
1.0, // AirAbsorptionFactor
0, // Flags (1 = Auto Direct, 2 = Auto Room, 4 = Auto RoomHF)
)
environment = SOUND_ENVIRONMENT_NONE //Default to none so sounds without overrides dont get reverb
/*! playsound
playsound is a proc used to play a 3D sound in a specific range. This uses SOUND_RANGE + extra_range to determine that.
source - Origin of sound
soundin - Either a file, or a string that can be used to get an SFX
vol - The volume of the sound, excluding falloff and pressure affection.
vary - bool that determines if the sound changes pitch every time it plays
extrarange - modifier for sound range. This gets added on top of SOUND_RANGE
falloff_exponent - Rate of falloff for the audio. Higher means quicker drop to low volume. Should generally be over 1 to indicate a quick dive to 0 rather than a slow dive.
frequency - playback speed of audio
channel - The channel the sound is played at
pressure_affected - Whether or not difference in pressure affects the sound (E.g. if you can hear in space)
ignore_walls - Whether or not the sound can pass through walls.
falloff_distance - Distance at which falloff begins. Sound is at peak volume (in regards to falloff) aslong as it is in this range.
*/
/proc/playsound(atom/source, soundin, vol as num, vary, extrarange as num, falloff_exponent = SOUND_FALLOFF_EXPONENT, frequency = null, channel = 0, pressure_affected = TRUE, ignore_walls = TRUE, falloff_distance = SOUND_DEFAULT_FALLOFF_DISTANCE, use_reverb = TRUE)
if(isarea(source))
CRASH("playsound(): source is an area")
if(islist(soundin))
CRASH("playsound(): soundin attempted to pass a list! Consider using pick() source: [source.name]")
var/turf/turf_source = get_turf(source)
if (!turf_source)
return
//allocate a channel if necessary now so its the same for everyone
channel = channel || SSsounds.random_available_channel()
// Looping through the player list has the added bonus of working for mobs inside containers
var/sound/S = sound(get_sfx(soundin))
var/maxdistance = SOUND_RANGE + extrarange
var/source_z = turf_source.z
var/list/listeners = SSmobs.clients_by_zlevel[source_z].Copy()
. = list() //output everything that successfully heard the sound
var/turf/above_turf = GET_TURF_ABOVE(turf_source)
var/turf/below_turf = GET_TURF_BELOW(turf_source)
if(ignore_walls)
if(above_turf && istransparentturf(above_turf))
listeners += SSmobs.clients_by_zlevel[above_turf.z]
if(below_turf && istransparentturf(turf_source))
listeners += SSmobs.clients_by_zlevel[below_turf.z]
else //these sounds don't carry through walls
listeners = get_hearers_in_view(maxdistance, turf_source)
if(above_turf && istransparentturf(above_turf))
listeners += get_hearers_in_view(maxdistance, above_turf)
if(below_turf && istransparentturf(turf_source))
listeners += get_hearers_in_view(maxdistance, below_turf)
for(var/mob/listening_mob in listeners | SSmobs.dead_players_by_zlevel[source_z])//observers always hear through walls
if(get_dist(listening_mob, turf_source) <= maxdistance)
listening_mob.playsound_local(turf_source, soundin, vol, vary, frequency, falloff_exponent, channel, pressure_affected, S, maxdistance, falloff_distance, 1, use_reverb)
. += listening_mob
/*! playsound
playsound_local is a proc used to play a sound directly on a mob from a specific turf.
This is called by playsound to send sounds to players, in which case it also gets the max_distance of that sound.
turf_source - Origin of sound
soundin - Either a file, or a string that can be used to get an SFX
vol - The volume of the sound, excluding falloff
vary - bool that determines if the sound changes pitch every time it plays
frequency - playback speed of audio
falloff_exponent - Rate of falloff for the audio. Higher means quicker drop to low volume. Should generally be over 1 to indicate a quick dive to 0 rather than a slow dive.
channel - The channel the sound is played at
pressure_affected - Whether or not difference in pressure affects the sound (E.g. if you can hear in space)
max_distance - The peak distance of the sound, if this is a 3D sound
falloff_distance - Distance at which falloff begins, if this is a 3D sound
distance_multiplier - Can be used to multiply the distance at which the sound is heard
*/
/mob/proc/playsound_local(turf/turf_source, soundin, vol as num, vary, frequency, falloff_exponent = SOUND_FALLOFF_EXPONENT, channel = 0, pressure_affected = TRUE, sound/S, max_distance, falloff_distance = SOUND_DEFAULT_FALLOFF_DISTANCE, distance_multiplier = 1, use_reverb = TRUE)
if(!client || !can_hear())
return
if(!S)
S = sound(get_sfx(soundin))
S.wait = 0 //No queue
S.channel = channel || SSsounds.random_available_channel()
S.volume = vol
if (client?.prefs && !(client.prefs.toggles & SOUND_ALT) && (S.file in GLOB.alt_sound_overrides))
S.file = GLOB.alt_sound_overrides[S.file]
if(vary)
if(frequency)
S.frequency = frequency
else
S.frequency = get_rand_frequency()
if(isturf(turf_source))
var/turf/T = get_turf(src)
//sound volume falloff with distance
var/distance = get_dist(T, turf_source)
distance *= distance_multiplier
if(max_distance) //If theres no max_distance we're not a 3D sound, so no falloff.
S.volume -= (max(distance - falloff_distance, 0) ** (1 / falloff_exponent)) / ((max(max_distance, distance) - falloff_distance) ** (1 / falloff_exponent)) * S.volume
//https://www.desmos.com/calculator/sqdfl8ipgf
if(pressure_affected)
//Atmosphere affects sound
var/pressure_factor = 1
var/datum/gas_mixture/hearer_env = T.return_air()
var/datum/gas_mixture/source_env = turf_source.return_air()
if(hearer_env && source_env)
var/pressure = min(hearer_env.return_pressure(), source_env.return_pressure())
if(pressure < ONE_ATMOSPHERE)
pressure_factor = max((pressure - SOUND_MINIMUM_PRESSURE)/(ONE_ATMOSPHERE - SOUND_MINIMUM_PRESSURE), 0)
else //space
pressure_factor = 0
if(distance <= 1)
pressure_factor = max(pressure_factor, 0.15) //touching the source of the sound
S.volume *= pressure_factor
//End Atmosphere affecting sound
if(S.volume <= 0)
return //No sound
var/dx = turf_source.x - T.x // Hearing from the right/left
S.x = dx * distance_multiplier
var/dz = turf_source.y - T.y // Hearing from infront/behind
S.z = dz * distance_multiplier
var/dy = (turf_source.z - T.z) * 5 * distance_multiplier // Hearing from above / below, multiplied by 5 because we assume height is further along coords.
S.y = dy
S.falloff = max_distance || 1 //use max_distance, else just use 1 as we are a direct sound so falloff isnt relevant.
// Sounds can't have their own environment. A sound's environment will be:
// 1. the mob's
// 2. the area's (defaults to SOUND_ENVRIONMENT_NONE)
if(sound_environment_override != SOUND_ENVIRONMENT_NONE)
S.environment = sound_environment_override
else
var/area/A = get_area(src)
S.environment = A.sound_environment
if(use_reverb && S.environment != SOUND_ENVIRONMENT_NONE) //We have reverb, reset our echo setting
S.echo[3] = 0 //Room setting, 0 means normal reverb
S.echo[4] = 0 //RoomHF setting, 0 means normal reverb.
SEND_SOUND(src, S)
/proc/sound_to_playing_players(soundin, volume = 100, vary = FALSE, frequency = 0, channel = 0, pressure_affected = FALSE, sound/S)
if(!S)
S = sound(get_sfx(soundin))
for(var/m in GLOB.player_list)
if(ismob(m) && !isnewplayer(m))
var/mob/M = m
M.playsound_local(M, null, volume, vary, frequency, null, channel, pressure_affected, S)
/mob/proc/stop_sound_channel(chan)
SEND_SOUND(src, sound(null, repeat = 0, wait = 0, channel = chan))
if(chan == CHANNEL_LOBBYMUSIC) //yogs start
if(client && client.tgui_panel)
client.tgui_panel?.stop_music() //yogs end
/mob/proc/set_sound_channel_volume(channel, volume)
var/sound/S = sound(null, FALSE, FALSE, channel, volume)
S.status = SOUND_UPDATE
SEND_SOUND(src, S)
/client/proc/playtitlemusic(vol = 85)
set waitfor = FALSE
UNTIL(SSticker.login_music) //wait for SSticker init to set the login music
UNTIL(tgui_panel)
if(prefs && (prefs.toggles & SOUND_LOBBY))
tgui_panel?.play_music(SSticker.login_music_data["url"], SSticker.login_music_data)
to_chat(src, "<span class='notice'>Currently playing: </span>[SSticker.selected_lobby_music]")
/proc/get_rand_frequency()
return rand(32000, 55000) //Frequency stuff only works with 45kbps oggs.
/proc/get_sfx(soundin)
if(istext(soundin))
switch(soundin)
if(SFX_SHATTER)
soundin = pick('sound/effects/glassbr1.ogg','sound/effects/glassbr2.ogg','sound/effects/glassbr3.ogg')
if(SFX_EXPLOSION)
soundin = pick('sound/effects/explosion1.ogg','sound/effects/explosion2.ogg')
if(SFX_EXPLOSION_CREAKING)
soundin = pick('sound/effects/explosioncreak1.ogg', 'sound/effects/explosioncreak2.ogg')
if(SFX_HULL_CREAKING)
soundin = pick('sound/effects/creak1.ogg', 'sound/effects/creak2.ogg', 'sound/effects/creak3.ogg')
if(SFX_SPARKS)
soundin = pick('sound/effects/sparks1.ogg','sound/effects/sparks2.ogg','sound/effects/sparks3.ogg','sound/effects/sparks4.ogg')
if(SFX_SOFTSPARKS)
soundin = pick('sound/effects/sparks1.ogg','sound/effects/sparks2.ogg','sound/effects/sparks3.ogg')
if(SFX_RUSTLE)
soundin = pick(
'sound/effects/rustle1.ogg',
'sound/effects/rustle2.ogg',
'sound/effects/rustle3.ogg',
'sound/effects/rustle4.ogg',
'sound/effects/rustle5.ogg',
)
if(SFX_BODYFALL)
soundin = pick('sound/effects/bodyfall1.ogg','sound/effects/bodyfall2.ogg','sound/effects/bodyfall3.ogg','sound/effects/bodyfall4.ogg')
if(SFX_PUNCH)
soundin = pick('sound/weapons/punch1.ogg','sound/weapons/punch2.ogg','sound/weapons/punch3.ogg','sound/weapons/punch4.ogg')
if(SFX_CLOWNSTEP)
soundin = pick('sound/effects/clownstep1.ogg','sound/effects/clownstep2.ogg')
if(SFX_COLLARBELL)
soundin = pick('sound/effects/collarbell1.ogg','sound/effects/collarbell2.ogg')
if(SFX_SUITSTEP)
soundin = pick('sound/effects/suitstep1.ogg','sound/effects/suitstep2.ogg')
if(SFX_SWING_HIT)
soundin = pick('sound/weapons/genhit1.ogg', 'sound/weapons/genhit2.ogg', 'sound/weapons/genhit3.ogg')
if(SFX_HISS)
soundin = pick('sound/voice/hiss1.ogg','sound/voice/hiss2.ogg','sound/voice/hiss3.ogg','sound/voice/hiss4.ogg')
if(SFX_PAGE_TURN)
soundin = pick('sound/effects/pageturn1.ogg', 'sound/effects/pageturn2.ogg','sound/effects/pageturn3.ogg')
if(SFX_RICOCHET)
soundin = pick(
'sound/weapons/effects/ric1.ogg',
'sound/weapons/effects/ric2.ogg',
'sound/weapons/effects/ric3.ogg',
'sound/weapons/effects/ric4.ogg',
'sound/weapons/effects/ric5.ogg',
)
if(SFX_TERMINAL_TYPE)
soundin = pick(
'sound/machines/terminal_button01.ogg',
'sound/machines/terminal_button02.ogg',
'sound/machines/terminal_button03.ogg',
'sound/machines/terminal_button04.ogg',
'sound/machines/terminal_button05.ogg',
'sound/machines/terminal_button06.ogg',
'sound/machines/terminal_button07.ogg',
'sound/machines/terminal_button08.ogg',
)
if(SFX_DESCERATION)
soundin = pick('sound/misc/desceration-01.ogg', 'sound/misc/desceration-02.ogg', 'sound/misc/desceration-03.ogg')
if(SFX_IM_HERE)
soundin = pick('sound/hallucinations/im_here1.ogg', 'sound/hallucinations/im_here2.ogg')
if(SFX_CAN_OPEN)
soundin = pick('sound/effects/can_open1.ogg', 'sound/effects/can_open2.ogg', 'sound/effects/can_open3.ogg')
if(SFX_BULLET_MISS)
soundin = pick('sound/weapons/bulletflyby.ogg', 'sound/weapons/bulletflyby2.ogg', 'sound/weapons/bulletflyby3.ogg')
if(SFX_GUN_INSERT_EMPTY_MAGAZINE)
soundin = pick('sound/weapons/gun_magazine_insert_empty_1.ogg', 'sound/weapons/gun_magazine_insert_empty_2.ogg', 'sound/weapons/gun_magazine_insert_empty_3.ogg', 'sound/weapons/gun_magazine_insert_empty_4.ogg')
if(SFX_GUN_INSERT_FULL_MAGAZINE)
soundin = pick('sound/weapons/gun_magazine_insert_full_1.ogg', 'sound/weapons/gun_magazine_insert_full_2.ogg', 'sound/weapons/gun_magazine_insert_full_3.ogg', 'sound/weapons/gun_magazine_insert_full_4.ogg', 'sound/weapons/gun_magazine_insert_full_5.ogg')
if(SFX_GUN_REMOVE_EMPTY_MAGAZINE)
soundin = pick('sound/weapons/gun_magazine_remove_empty_1.ogg', 'sound/weapons/gun_magazine_remove_empty_2.ogg', 'sound/weapons/gun_magazine_remove_empty_3.ogg', 'sound/weapons/gun_magazine_remove_empty_4.ogg')
if(SFX_GUN_SLIDE_LOCK)
soundin = pick('sound/weapons/gun_slide_lock_1.ogg', 'sound/weapons/gun_slide_lock_2.ogg', 'sound/weapons/gun_slide_lock_3.ogg', 'sound/weapons/gun_slide_lock_4.ogg', 'sound/weapons/gun_slide_lock_5.ogg')
if(SFX_REVOLVER_SPIN)
soundin = pick('sound/weapons/revolverspin1.ogg', 'sound/weapons/revolverspin2.ogg', 'sound/weapons/revolverspin3.ogg')
if(SFX_LAW)
soundin = pick('sound/voice/beepsky/god.ogg', 'sound/voice/beepsky/iamthelaw.ogg', 'sound/voice/beepsky/secureday.ogg', 'sound/voice/beepsky/radio.ogg', 'sound/voice/beepsky/insult.ogg', 'sound/voice/beepsky/creep.ogg')
if(SFX_LAW_RUSSIAN)
soundin = pick('sound/voice/beepsky_russian/god.ogg', 'sound/voice/beepsky_russian/iamthelaw.ogg', 'sound/voice/beepsky_russian/secureday.ogg', 'sound/voice/beepsky_russian/radio.ogg', 'sound/voice/beepsky_russian/insult.ogg', 'sound/voice/beepsky_russian/creep.ogg')
if(SFX_HONKBOT_E)
soundin = pick(
'sound/items/bikehorn.ogg',
'sound/items/AirHorn2.ogg',
'sound/misc/sadtrombone.ogg',
'sound/items/AirHorn.ogg',
'sound/effects/reee.ogg',
'sound/items/WEEOO1.ogg',
'sound/voice/beepsky/iamthelaw.ogg',
'sound/voice/beepsky/creep.ogg',
'sound/magic/Fireball.ogg',
'sound/effects/pray.ogg',
'sound/voice/hiss1.ogg',
'sound/machines/buzz-sigh.ogg',
'sound/machines/ping.ogg',
'sound/weapons/flashbang.ogg',
'sound/weapons/bladeslice.ogg',
)
if(SFX_GOOSE)
soundin = pick('sound/creatures/goose1.ogg', 'sound/creatures/goose2.ogg', 'sound/creatures/goose3.ogg', 'sound/creatures/goose4.ogg')
if(SFX_CRAWLING_SHADOWS_WALK)
soundin = pick('yogstation/sound/creatures/crawlingshadows/crawling_shadows_walk_01.ogg', 'yogstation/sound/creatures/crawlingshadows/crawling_shadows_walk_02.ogg', 'yogstation/sound/creatures/crawlingshadows/crawling_shadows_walk_03.ogg') //WELCOME TO PATH HELL
if(SFX_SMCALM)
soundin = pick(
'sound/machines/sm/accent/normal/1.ogg',
'sound/machines/sm/accent/normal/2.ogg',
'sound/machines/sm/accent/normal/3.ogg',
'sound/machines/sm/accent/normal/4.ogg',
'sound/machines/sm/accent/normal/5.ogg',
'sound/machines/sm/accent/normal/6.ogg',
'sound/machines/sm/accent/normal/7.ogg',
'sound/machines/sm/accent/normal/8.ogg',
'sound/machines/sm/accent/normal/9.ogg',
'sound/machines/sm/accent/normal/10.ogg',
'sound/machines/sm/accent/normal/11.ogg',
'sound/machines/sm/accent/normal/12.ogg',
'sound/machines/sm/accent/normal/13.ogg',
'sound/machines/sm/accent/normal/14.ogg',
'sound/machines/sm/accent/normal/15.ogg',
'sound/machines/sm/accent/normal/16.ogg',
'sound/machines/sm/accent/normal/17.ogg',
'sound/machines/sm/accent/normal/18.ogg',
'sound/machines/sm/accent/normal/19.ogg',
'sound/machines/sm/accent/normal/20.ogg',
'sound/machines/sm/accent/normal/21.ogg',
'sound/machines/sm/accent/normal/22.ogg',
'sound/machines/sm/accent/normal/23.ogg',
'sound/machines/sm/accent/normal/24.ogg',
'sound/machines/sm/accent/normal/25.ogg',
'sound/machines/sm/accent/normal/26.ogg',
'sound/machines/sm/accent/normal/27.ogg',
'sound/machines/sm/accent/normal/28.ogg',
'sound/machines/sm/accent/normal/29.ogg',
'sound/machines/sm/accent/normal/30.ogg',
'sound/machines/sm/accent/normal/31.ogg',
'sound/machines/sm/accent/normal/32.ogg',
'sound/machines/sm/accent/normal/33.ogg',
)
if(SFX_SMDELAM)
soundin = pick(
'sound/machines/sm/accent/delam/1.ogg',
'sound/machines/sm/accent/normal/2.ogg',
'sound/machines/sm/accent/normal/3.ogg',
'sound/machines/sm/accent/normal/4.ogg',
'sound/machines/sm/accent/normal/5.ogg',
'sound/machines/sm/accent/normal/6.ogg',
'sound/machines/sm/accent/normal/7.ogg',
'sound/machines/sm/accent/normal/8.ogg',
'sound/machines/sm/accent/normal/9.ogg',
'sound/machines/sm/accent/normal/10.ogg',
'sound/machines/sm/accent/normal/11.ogg',
'sound/machines/sm/accent/normal/12.ogg',
'sound/machines/sm/accent/normal/13.ogg',
'sound/machines/sm/accent/normal/14.ogg',
'sound/machines/sm/accent/normal/15.ogg',
'sound/machines/sm/accent/normal/16.ogg',
'sound/machines/sm/accent/normal/17.ogg',
'sound/machines/sm/accent/normal/18.ogg',
'sound/machines/sm/accent/normal/19.ogg',
'sound/machines/sm/accent/normal/20.ogg',
'sound/machines/sm/accent/normal/21.ogg',
'sound/machines/sm/accent/normal/22.ogg',
'sound/machines/sm/accent/normal/23.ogg',
'sound/machines/sm/accent/normal/24.ogg',
'sound/machines/sm/accent/normal/25.ogg',
'sound/machines/sm/accent/normal/26.ogg',
'sound/machines/sm/accent/normal/27.ogg',
'sound/machines/sm/accent/normal/28.ogg',
'sound/machines/sm/accent/normal/29.ogg',
'sound/machines/sm/accent/normal/30.ogg',
'sound/machines/sm/accent/normal/31.ogg',
'sound/machines/sm/accent/normal/32.ogg',
'sound/machines/sm/accent/normal/33.ogg',
)
if(SFX_KEYSTROKE)
soundin = pick('sound/machines/keyboard/keypress1.ogg','sound/machines/keyboard/keypress2.ogg','sound/machines/keyboard/keypress3.ogg','sound/machines/keyboard/keypress4.ogg')
if(SFX_KEYBOARD)
soundin = pick('sound/machines/keyboard/keystroke1.ogg','sound/machines/keyboard/keystroke2.ogg','sound/machines/keyboard/keystroke3.ogg','sound/machines/keyboard/keystroke4.ogg')
if(SFX_BUTTON)
soundin = pick('sound/machines/button1.ogg','sound/machines/button2.ogg','sound/machines/button3.ogg','sound/machines/button4.ogg')
if(SFX_SWITCH)
soundin = pick('sound/machines/switch1.ogg','sound/machines/switch2.ogg','sound/machines/switch3.ogg')
return soundin
/client/proc/channel_in_use(channel)
for (var/sound/S in src.SoundQuery())
if (S.channel == channel)
return TRUE
return FALSE
/mob/proc/can_hear_ambience()
if (!src.can_hear()) // If they can't hear they can't hear
return FALSE
var/turf/T = get_turf(src)
var/datum/gas_mixture/hearer_env = T.return_air()
if (!hearer_env || hearer_env.return_pressure() < SOUND_MINIMUM_PRESSURE) // They can't hear ambience if there isn't enough pressure
return FALSE
return TRUE