Skip to content
This repository was archived by the owner on May 22, 2025. It is now read-only.

Commit cce08ca

Browse files
committed
lints stuff
1 parent 3b38a4a commit cce08ca

File tree

6 files changed

+44
-41
lines changed

6 files changed

+44
-41
lines changed

code/controllers/subsystem/explosions.dm

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -279,18 +279,18 @@ SUBSYSTEM_DEF(explosions)
279279
baseshakeamount = sqrt((orig_max_distance - dist)*0.1)
280280
// If inside the blast radius + world.view - 2
281281
if(dist <= round(max_range + world.view - 2, 1))
282-
M.playsound_local(epicenter, null, 100, 1, frequency, S = explosion_sound)
282+
M.playsound_local(epicenter, null, 100, 1, frequency, sound_to_use = explosion_sound)
283283
if(baseshakeamount > 0)
284284
shake_camera(M, 25, clamp(baseshakeamount, 0, 10))
285285
// You hear a far explosion if you're outside the blast radius. Small bombs shouldn't be heard all over the station.
286286
else if(dist <= far_dist)
287287
var/far_volume = clamp(far_dist/2, FAR_LOWER, FAR_UPPER) // Volume is based on explosion size and dist
288288
if(creaking_explosion)
289-
M.playsound_local(epicenter, null, far_volume, 1, frequency, S = creaking_explosion_sound, distance_multiplier = 0)
289+
M.playsound_local(epicenter, null, far_volume, 1, frequency, sound_to_use = creaking_explosion_sound, distance_multiplier = 0)
290290
else if(prob(PROB_SOUND)) // Sound variety during meteor storm/tesloose/other bad event
291-
M.playsound_local(epicenter, null, far_volume, 1, frequency, S = far_explosion_sound, distance_multiplier = 0) // Far sound
291+
M.playsound_local(epicenter, null, far_volume, 1, frequency, sound_to_use = far_explosion_sound, distance_multiplier = 0) // Far sound
292292
else
293-
M.playsound_local(epicenter, null, far_volume, 1, frequency, S = explosion_echo_sound, distance_multiplier = 0) // Echo sound
293+
M.playsound_local(epicenter, null, far_volume, 1, frequency, sound_to_use = explosion_echo_sound, distance_multiplier = 0) // Echo sound
294294

295295
if(baseshakeamount > 0 || devastation_range)
296296
if(!baseshakeamount) // Devastating explosions rock the station and ground
@@ -302,7 +302,7 @@ SUBSYSTEM_DEF(explosions)
302302
baseshakeamount = devastation_range
303303
shake_camera(M, 10, clamp(baseshakeamount*0.25, 0, SHAKE_CLAMP))
304304
echo_volume = 60
305-
M.playsound_local(epicenter, null, echo_volume, 1, frequency, S = explosion_echo_sound, distance_multiplier = 0)
305+
M.playsound_local(epicenter, null, echo_volume, 1, frequency, sound_to_use = explosion_echo_sound, distance_multiplier = 0)
306306

307307
if(creaking_explosion) // 5 seconds after the bang, the station begins to creak
308308
addtimer(CALLBACK(M, TYPE_PROC_REF(/mob, playsound_local), epicenter, null, rand(FREQ_LOWER, FREQ_UPPER), 1, frequency, null, null, FALSE, hull_creaking_sound, 0), CREAK_DELAY)

code/game/machinery/dance_machine.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@
183183
if(!L || !L.client)
184184
continue
185185
// it doesn't send at 0 volume so you get 0.001 volume on init
186-
L.playsound_local(get_turf(L), null, 0.001, channel = CHANNEL_JUKEBOX, S = song_played)
186+
L.playsound_local(get_turf(L), null, 0.001, channel = CHANNEL_JUKEBOX, sound_to_use = song_played)
187187
if(L in close && L.client.prefs.toggles & SOUND_JUKEBOX)
188188
L.set_sound_channel_volume(CHANNEL_JUKEBOX, volume) // TURN THAT SHIT UP!!!!
189189
else

code/game/sound.dm

Lines changed: 35 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -30,23 +30,22 @@ GLOBAL_LIST_INIT(alt_sound_overrides, list(
3030
)
3131
environment = SOUND_ENVIRONMENT_NONE //Default to none so sounds without overrides dont get reverb
3232

33-
/*! playsound
34-
35-
playsound is a proc used to play a 3D sound in a specific range. This uses SOUND_RANGE + extra_range to determine that.
36-
37-
source - Origin of sound
38-
soundin - Either a file, or a string that can be used to get an SFX
39-
vol - The volume of the sound, excluding falloff and pressure affection.
40-
vary - bool that determines if the sound changes pitch every time it plays
41-
extrarange - modifier for sound range. This gets added on top of SOUND_RANGE
42-
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.
43-
frequency - playback speed of audio
44-
channel - The channel the sound is played at
45-
pressure_affected - Whether or not difference in pressure affects the sound (E.g. if you can hear in space)
46-
ignore_walls - Whether or not the sound can pass through walls.
47-
falloff_distance - Distance at which falloff begins. Sound is at peak volume (in regards to falloff) aslong as it is in this range.
48-
49-
*/
33+
/**
34+
* playsound is a proc used to play a 3D sound in a specific range. This uses SOUND_RANGE + extra_range to determine that.
35+
*
36+
* Arguments:
37+
* * source - Origin of sound.
38+
* * soundin - Either a file, or a string that can be used to get an SFX.
39+
* * vol - The volume of the sound, excluding falloff and pressure affection.
40+
* * vary - bool that determines if the sound changes pitch every time it plays.
41+
* * extrarange - modifier for sound range. This gets added on top of SOUND_RANGE.
42+
* * 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.
43+
* * frequency - playback speed of audio.
44+
* * channel - The channel the sound is played at.
45+
* * pressure_affected - Whether or not difference in pressure affects the sound (E.g. if you can hear in space).
46+
* * ignore_walls - Whether or not the sound can pass through walls.
47+
* * falloff_distance - Distance at which falloff begins. Sound is at peak volume (in regards to falloff) aslong as it is in this range.
48+
*/
5049

5150
/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)
5251
if(isarea(source))
@@ -95,21 +94,25 @@ falloff_distance - Distance at which falloff begins. Sound is at peak volume (in
9594
listening_mob.playsound_local(turf_source, soundin, vol, vary, frequency, falloff_exponent, channel, pressure_affected, S, maxdistance, falloff_distance, 1, use_reverb)
9695
. += listening_mob
9796

98-
/*! playsound
99-
playsound_local is a proc used to play a sound directly on a mob from a specific turf.
100-
This is called by playsound to send sounds to players, in which case it also gets the max_distance of that sound.
101-
turf_source - Origin of sound
102-
soundin - Either a file, or a string that can be used to get an SFX
103-
vol - The volume of the sound, excluding falloff
104-
vary - bool that determines if the sound changes pitch every time it plays
105-
frequency - playback speed of audio
106-
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.
107-
channel - The channel the sound is played at
108-
pressure_affected - Whether or not difference in pressure affects the sound (E.g. if you can hear in space)
109-
max_distance - The peak distance of the sound, if this is a 3D sound
110-
falloff_distance - Distance at which falloff begins, if this is a 3D sound
111-
distance_multiplier - Can be used to multiply the distance at which the sound is heard
112-
*/
97+
/**
98+
* Plays a sound with a specific point of origin for src mob
99+
* Affected by pressure, distance, terrain and environment (see arguments)
100+
*
101+
* Arguments:
102+
* * turf_source - The turf our sound originates from, if this is not a turf, the sound is played with no spatial audio
103+
* * soundin - Either a file, or a string that can be used to get an SFX.
104+
* * vol - The volume of the sound, excluding falloff and pressure affection.
105+
* * vary - bool that determines if the sound changes pitch every time it plays.
106+
* * frequency - playback speed of audio.
107+
* * 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.
108+
* * channel - Optional: The channel the sound is played at.
109+
* * pressure_affected - bool Whether or not difference in pressure affects the sound (E.g. if you can hear in space).
110+
* * sound_to_use - Optional: Will default to soundin when absent
111+
* * max_distance - number, determines the maximum distance of our sound
112+
* * falloff_distance - Distance at which falloff begins. Sound is at peak volume (in regards to falloff) aslong as it is in this range.
113+
* * distance_multiplier - Default 1, multiplies the maximum distance of our sound
114+
* * use_reverb - bool default TRUE, determines if our sound has reverb
115+
*/
113116

114117
/mob/proc/playsound_local(turf/turf_source, soundin, vol as num, vary, frequency, falloff_exponent = SOUND_FALLOFF_EXPONENT, channel = 0, pressure_affected = TRUE, sound/sound_to_use, max_distance, falloff_distance = SOUND_DEFAULT_FALLOFF_DISTANCE, distance_multiplier = 1, use_reverb = TRUE)
115118
if(!client || !can_hear())

code/modules/instruments/songs/play_legacy.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,5 +87,5 @@
8787
L.apply_status_effect(STATUS_EFFECT_GOOD_MUSIC)
8888
if(!(M?.client?.prefs?.toggles & SOUND_INSTRUMENTS))
8989
continue
90-
M.playsound_local(source, null, volume * using_instrument.volume_multiplier, falloff_exponent = 5, S = music_played)
90+
M.playsound_local(source, null, volume * using_instrument.volume_multiplier, falloff_exponent = 5, sound_to_use = music_played)
9191
// Could do environment and echo later but not for now

code/modules/power/gravitygenerator.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -425,7 +425,7 @@ GLOBAL_LIST_EMPTY(gravity_generators) // We will keep track of this by adding ne
425425
M.update_gravity(M.mob_has_gravity())
426426
if(M.client)
427427
shake_camera(M, 15, 1)
428-
M.playsound_local(T, null, 100, 1, 0.5, S = alert_sound)
428+
M.playsound_local(T, null, 100, 1, 0.5, sound_to_use = alert_sound)
429429

430430
/obj/machinery/gravity_generator/main/proc/gravity_in_level()
431431
var/turf/T = get_turf(src)

code/modules/ruins/objects_and_mobs/necropolis_gate.dm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ GLOBAL_DATUM(necropolis_gate, /obj/structure/necropolis_gate/legion_gate)
184184
for(var/mob/M in GLOB.player_list)
185185
if(M.z == z)
186186
to_chat(M, span_userdanger("Discordant whispers flood your mind in a thousand voices. Each one speaks your name, over and over. Something horrible has been released."))
187-
M.playsound_local(T, null, 100, FALSE, 0, FALSE, pressure_affected = FALSE, S = legion_sound)
187+
M.playsound_local(T, null, 100, FALSE, 0, FALSE, pressure_affected = FALSE, sound_to_use = legion_sound)
188188
flash_color(M, flash_color = "#FF0000", flash_time = 50)
189189
var/mutable_appearance/release_overlay = mutable_appearance('icons/effects/effects.dmi', "legiondoor")
190190
notify_ghosts("Legion has been released in the [get_area(src)]!", source = src, alert_overlay = release_overlay, action = NOTIFY_JUMP)

0 commit comments

Comments
 (0)