diff --git a/code/__DEFINES/instruments.dm b/code/__DEFINES/instruments.dm
index 3c414f87f43..6a01630733e 100644
--- a/code/__DEFINES/instruments.dm
+++ b/code/__DEFINES/instruments.dm
@@ -6,11 +6,6 @@
/// Max number of playing notes per instrument.
#define CHANNELS_PER_INSTRUMENT 128
-/// Distance multiplier that makes us not be impacted by 3d sound as much. This is a multiplier so lower it is the closer we will pretend to be to people.
-#define INSTRUMENT_DISTANCE_FALLOFF_BUFF 0.2
-/// How many tiles instruments have no falloff for
-#define INSTRUMENT_DISTANCE_NO_FALLOFF 3
-
/// Maximum length a note should ever go for
#define INSTRUMENT_MAX_TOTAL_SUSTAIN (5 SECONDS)
diff --git a/code/__DEFINES/sound.dm b/code/__DEFINES/sound.dm
index 68b32b067a6..45ef8e8c94d 100644
--- a/code/__DEFINES/sound.dm
+++ b/code/__DEFINES/sound.dm
@@ -18,6 +18,17 @@
#define CHANNEL_BICYCLE 1011
//SKYRAT EDIT CHANGE END
+///Default range of a sound.
+#define SOUND_RANGE 17
+///default extra range for sounds considered to be quieter
+#define SHORT_RANGE_SOUND_EXTRARANGE -9
+///The range deducted from sound range for things that are considered silent / sneaky
+#define SILENCED_SOUND_EXTRARANGE -11
+///Percentage of sound's range where no falloff is applied
+#define SOUND_DEFAULT_FALLOFF_DISTANCE 1 //For a normal sound this would be 1 tile of no falloff
+///The default exponent of sound falloff
+#define SOUND_FALLOFF_EXPONENT 6
+
//THIS SHOULD ALWAYS BE THE LOWEST ONE!
//KEEP IT UPDATED
@@ -26,7 +37,6 @@
#define MAX_INSTRUMENT_CHANNELS (128 * 6)
#define SOUND_MINIMUM_PRESSURE 10
-#define FALLOFF_SOUNDS 1
//Ambience types
diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm
index f21d9e0705a..41167a0ccd7 100644
--- a/code/_onclick/item_attack.dm
+++ b/code/_onclick/item_attack.dm
@@ -91,7 +91,7 @@
if(!force)
playsound(loc, 'sound/weapons/tap.ogg', get_clamped_volume(), TRUE, -1)
else if(hitsound)
- playsound(loc, hitsound, get_clamped_volume(), TRUE, -1)
+ playsound(loc, hitsound, get_clamped_volume(), TRUE, extrarange = stealthy_audio ? SILENCED_SOUND_EXTRARANGE : -1, falloff_distance = 0)
M.lastattacker = user.real_name
M.lastattackerckey = user.ckey
diff --git a/code/controllers/subsystem/explosions.dm b/code/controllers/subsystem/explosions.dm
index 92d1be419d6..5435c0a75eb 100644
--- a/code/controllers/subsystem/explosions.dm
+++ b/code/controllers/subsystem/explosions.dm
@@ -257,7 +257,7 @@ SUBSYSTEM_DEF(explosions)
baseshakeamount = sqrt((orig_max_distance - dist)*0.1)
// If inside the blast radius + world.view - 2
if(dist <= round(max_range + world.view - 2, 1))
- M.playsound_local(epicenter, null, 100, 1, frequency, falloff = 5, S = explosion_sound)
+ M.playsound_local(epicenter, null, 100, 1, frequency, S = explosion_sound)
if(baseshakeamount > 0)
shake_camera(M, 25, clamp(baseshakeamount, 0, 10))
// You hear a far explosion if you're outside the blast radius. Small bombs shouldn't be heard all over the station.
diff --git a/code/datums/components/fantasy/suffixes.dm b/code/datums/components/fantasy/suffixes.dm
index a3c54c2aa5d..b9e0c47c5cd 100644
--- a/code/datums/components/fantasy/suffixes.dm
+++ b/code/datums/components/fantasy/suffixes.dm
@@ -167,5 +167,5 @@
/datum/fantasy_affix/fool/apply(datum/component/fantasy/comp, newName)
. = ..()
var/obj/item/master = comp.parent
- comp.appliedComponents += master.AddComponent(/datum/component/squeak, list('sound/items/bikehorn.ogg'=1), 50)
+ comp.appliedComponents += master.AddComponent(/datum/component/squeak, list('sound/items/bikehorn.ogg'=1), 50, falloff_exponent = 20)
return "[newName] of the fool"
diff --git a/code/datums/components/footstep.dm b/code/datums/components/footstep.dm
index 830364f6af9..d433e03b693 100644
--- a/code/datums/components/footstep.dm
+++ b/code/datums/components/footstep.dm
@@ -11,7 +11,7 @@
///This can be a list OR a soundfile OR null. Determines whatever sound gets played.
var/footstep_sounds
-/datum/component/footstep/Initialize(footstep_type_ = FOOTSTEP_MOB_BAREFOOT, volume_ = 0.5, e_range_ = -1)
+/datum/component/footstep/Initialize(footstep_type_ = FOOTSTEP_MOB_BAREFOOT, volume_ = 0.5, e_range_ = -8)
if(!isliving(parent))
return COMPONENT_INCOMPATIBLE
volume = volume_
@@ -47,7 +47,7 @@
return
if(LM.body_position == LYING_DOWN) //play crawling sound if we're lying
- playsound(T, 'sound/effects/footstep/crawl1.ogg', 15 * volume)
+ playsound(T, 'sound/effects/footstep/crawl1.ogg', 15 * volume, falloff_distance = 1)
return
if(iscarbon(LM))
@@ -75,7 +75,7 @@
if(!T)
return
if(isfile(footstep_sounds) || istext(footstep_sounds))
- playsound(T, footstep_sounds, volume)
+ playsound(T, footstep_sounds, volume, falloff_distance = 1)
return
var/turf_footstep
switch(footstep_type)
@@ -89,7 +89,7 @@
turf_footstep = T.footstep
if(!turf_footstep)
return
- playsound(T, pick(footstep_sounds[turf_footstep][1]), footstep_sounds[turf_footstep][2] * volume, TRUE, footstep_sounds[turf_footstep][3] + e_range)
+ playsound(T, pick(footstep_sounds[turf_footstep][1]), footstep_sounds[turf_footstep][2] * volume, TRUE, footstep_sounds[turf_footstep][3] + e_range, falloff_distance = 1)
/datum/component/footstep/proc/play_humanstep()
SIGNAL_HANDLER
@@ -106,12 +106,12 @@
playsound(T, pick(GLOB.footstep[T.footstep][1]),
GLOB.footstep[T.footstep][2] * volume,
TRUE,
- GLOB.footstep[T.footstep][3] + e_range)
+ GLOB.footstep[T.footstep][3] + e_range, falloff_distance = 1)
else
if(H.dna.species.special_step_sounds)
- playsound(T, pick(H.dna.species.special_step_sounds), 50, TRUE)
+ playsound(T, pick(H.dna.species.special_step_sounds), 50, TRUE, falloff_distance = 1)
else
playsound(T, pick(GLOB.barefootstep[T.barefootstep][1]),
GLOB.barefootstep[T.barefootstep][2] * volume,
TRUE,
- GLOB.barefootstep[T.barefootstep][3] + e_range)
+ GLOB.barefootstep[T.barefootstep][3] + e_range, falloff_distance = 1)
diff --git a/code/datums/components/squeak.dm b/code/datums/components/squeak.dm
index 3189a2fb9f9..2bb7cc66f0d 100644
--- a/code/datums/components/squeak.dm
+++ b/code/datums/components/squeak.dm
@@ -13,7 +13,14 @@
var/last_use = 0
var/use_delay = 20
-/datum/component/squeak/Initialize(custom_sounds, volume_override, chance_override, step_delay_override, use_delay_override)
+ ///extra-range for this component's sound
+ var/sound_extra_range = -1
+ ///when sounds start falling off for the squeak
+ var/sound_falloff_distance = SOUND_DEFAULT_FALLOFF_DISTANCE
+ ///sound exponent for squeak. Defaults to 10 as squeaking is loud and annoying enough.
+ var/sound_falloff_exponent = 10
+
+/datum/component/squeak/Initialize(custom_sounds, volume_override, chance_override, step_delay_override, use_delay_override, extrarange, falloff_exponent, fallof_distance)
if(!isatom(parent))
return COMPONENT_INCOMPATIBLE
RegisterSignal(parent, list(COMSIG_ATOM_ENTERED, COMSIG_ATOM_BLOB_ACT, COMSIG_ATOM_HULK_ATTACK, COMSIG_PARENT_ATTACKBY), .proc/play_squeak)
@@ -41,15 +48,21 @@
step_delay = step_delay_override
if(isnum(use_delay_override))
use_delay = use_delay_override
+ if(isnum(extrarange))
+ sound_extra_range = extrarange
+ if(isnum(falloff_exponent))
+ sound_falloff_exponent = falloff_exponent
+ if(isnum(fallof_distance))
+ sound_falloff_distance = fallof_distance
/datum/component/squeak/proc/play_squeak()
SIGNAL_HANDLER
if(prob(squeak_chance))
if(!override_squeak_sounds)
- playsound(parent, pickweight(default_squeak_sounds), volume, TRUE, -1)
+ playsound(parent, pickweight(default_squeak_sounds), volume, TRUE, sound_extra_range, sound_falloff_exponent, falloff_distance = sound_falloff_distance)
else
- playsound(parent, pickweight(override_squeak_sounds), volume, TRUE, -1)
+ playsound(parent, pickweight(override_squeak_sounds), volume, TRUE, sound_extra_range, sound_falloff_exponent, falloff_distance = sound_falloff_distance)
/datum/component/squeak/proc/step_squeak()
SIGNAL_HANDLER
diff --git a/code/datums/components/tackle.dm b/code/datums/components/tackle.dm
index 0c84147d037..a48568975c3 100644
--- a/code/datums/components/tackle.dm
+++ b/code/datums/components/tackle.dm
@@ -412,7 +412,7 @@
user.adjustBruteLoss(30)
user.Unconscious(100)
user.gain_trauma_type(BRAIN_TRAUMA_MILD)
- user.playsound_local(get_turf(user), 'sound/weapons/flashbang.ogg', 100, TRUE, 8, 0.9)
+ user.playsound_local(get_turf(user), 'sound/weapons/flashbang.ogg', 100, TRUE, 8)
shake_camera(user, 6, 6)
user.overlay_fullscreen("flash", /obj/screen/fullscreen/flash)
user.clear_fullscreen("flash", 3.5)
@@ -424,7 +424,7 @@
user.add_confusion(15)
if(prob(80))
user.gain_trauma(/datum/brain_trauma/mild/concussion)
- user.playsound_local(get_turf(user), 'sound/weapons/flashbang.ogg', 100, TRUE, 8, 0.9)
+ user.playsound_local(get_turf(user), 'sound/weapons/flashbang.ogg', 100, TRUE, 8)
user.Knockdown(40)
shake_camera(user, 5, 5)
user.overlay_fullscreen("flash", /obj/screen/fullscreen/flash)
diff --git a/code/datums/looping_sounds/_looping_sound.dm b/code/datums/looping_sounds/_looping_sound.dm
index 7801c50e1d5..6af3b3c993b 100644
--- a/code/datums/looping_sounds/_looping_sound.dm
+++ b/code/datums/looping_sounds/_looping_sound.dm
@@ -31,8 +31,9 @@
var/max_loops
var/direct
var/extra_range = 0
- var/falloff
+ var/falloff_exponent
var/timerid
+ var/falloff_distance
/datum/looping_sound/New(list/_output_atoms=list(), start_immediately=FALSE, _direct=FALSE)
if(!mid_sounds)
@@ -86,7 +87,7 @@
if(direct)
SEND_SOUND(thing, S)
else
- playsound(thing, S, volume, vary, extra_range, falloff)
+ playsound(thing, S, volume, vary, extra_range, falloff_exponent = falloff_exponent, falloff_distance = falloff_distance)
/datum/looping_sound/proc/get_sound(starttime, _mid_sounds)
. = _mid_sounds || mid_sounds
diff --git a/code/datums/looping_sounds/machinery_sounds.dm b/code/datums/looping_sounds/machinery_sounds.dm
index cdc35810a48..618077d8def 100644
--- a/code/datums/looping_sounds/machinery_sounds.dm
+++ b/code/datums/looping_sounds/machinery_sounds.dm
@@ -12,8 +12,9 @@
mid_sounds = list('sound/machines/sm/loops/calm.ogg' = 1)
mid_length = 60
volume = 40
- extra_range = 10
- falloff = 4
+ extra_range = 25
+ falloff_exponent = 10
+ falloff_distance = 5
vary = TRUE
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -23,7 +24,6 @@
mid_length = 60
volume = 55
extra_range = 15
- falloff = 5
vary = TRUE
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
@@ -77,7 +77,9 @@
mid_sounds = list('sound/machines/tcomms/tcomms_mid1.ogg'=1,'sound/machines/tcomms/tcomms_mid2.ogg'=1,'sound/machines/tcomms/tcomms_mid3.ogg'=1,'sound/machines/tcomms/tcomms_mid4.ogg'=1,\
'sound/machines/tcomms/tcomms_mid5.ogg'=1,'sound/machines/tcomms/tcomms_mid6.ogg'=1,'sound/machines/tcomms/tcomms_mid7.ogg'=1)
mid_length = 1.8 SECONDS
- extra_range = -4.5
+ extra_range = -11
+ falloff_distance = 1
+ falloff_exponent = 5
volume = 50
/datum/looping_sound/computer
@@ -88,11 +90,15 @@
mid_length = 1.8 SECONDS
end_sound = 'sound/machines/computer/computer_end.ogg'
end_volume = 10
- volume = 3
- extra_range = -5.5
+ volume = 2
+ falloff_exponent = 5 //Ultra quiet very fast
+ extra_range = -12
+ falloff_distance = 1 //Instant falloff after initial tile
/datum/looping_sound/gravgen
mid_sounds = list('sound/machines/gravgen/gravgen_mid1.ogg'=1,'sound/machines/gravgen/gravgen_mid2.ogg'=1,'sound/machines/gravgen/gravgen_mid3.ogg'=1,'sound/machines/gravgen/gravgen_mid4.ogg'=1,)
mid_length = 1.8 SECONDS
extra_range = 10
volume = 70
+ falloff_distance = 5
+ falloff_exponent = 20
diff --git a/code/datums/materials/basemats.dm b/code/datums/materials/basemats.dm
index a6d41da95fa..e794360d3f3 100644
--- a/code/datums/materials/basemats.dm
+++ b/code/datums/materials/basemats.dm
@@ -161,7 +161,7 @@ Unless you know what you're doing, only use the first three numbers. They're in
/datum/material/bananium/on_applied(atom/source, amount, material_flags)
. = ..()
- source.AddComponent(/datum/component/squeak, list('sound/items/bikehorn.ogg'=1), 50)
+ source.AddComponent(/datum/component/squeak, list('sound/items/bikehorn.ogg'=1), 50, falloff_exponent = 20)
source.AddComponent(/datum/component/slippery, min(amount / 10, 80))
/datum/material/bananium/on_removed(atom/source, amount, material_flags)
diff --git a/code/game/machinery/buttons.dm b/code/game/machinery/buttons.dm
index bf55f7a6e67..e1e9d738f25 100644
--- a/code/game/machinery/buttons.dm
+++ b/code/game/machinery/buttons.dm
@@ -111,7 +111,7 @@
return
req_access = list()
req_one_access = list()
- playsound(src, "sparks", 100, TRUE)
+ playsound(src, "sparks", 100, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
obj_flags |= EMAGGED
/obj/machinery/button/attack_ai(mob/user)
diff --git a/code/game/machinery/civilian_bounties.dm b/code/game/machinery/civilian_bounties.dm
index 29c02b43da3..63e73bdb92f 100644
--- a/code/game/machinery/civilian_bounties.dm
+++ b/code/game/machinery/civilian_bounties.dm
@@ -229,7 +229,7 @@
addtimer(CALLBACK(src, .proc/launch_payload), 1 SECONDS)
/obj/item/civ_bounty_beacon/proc/launch_payload()
- playsound(src, "sparks", 80, TRUE)
+ playsound(src, "sparks", 80, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
switch(uses)
if(2)
new /obj/machinery/piratepad/civilian(drop_location())
diff --git a/code/game/machinery/computer/apc_control.dm b/code/game/machinery/computer/apc_control.dm
index e4930eb78dc..8c1435010bd 100644
--- a/code/game/machinery/computer/apc_control.dm
+++ b/code/game/machinery/computer/apc_control.dm
@@ -180,7 +180,7 @@
return
obj_flags |= EMAGGED
log_game("[key_name(user)] emagged [src] at [AREACOORD(src)]")
- playsound(src, "sparks", 50, TRUE)
+ playsound(src, "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
/obj/machinery/computer/apc_control/proc/log_activity(log_text)
if(!should_log)
diff --git a/code/game/machinery/computer/arcade.dm b/code/game/machinery/computer/arcade.dm
index 0794abd79da..93898994a5a 100644
--- a/code/game/machinery/computer/arcade.dm
+++ b/code/game/machinery/computer/arcade.dm
@@ -536,7 +536,7 @@ GLOBAL_LIST_INIT(arcade_prize_pool, list(
gameover = TRUE
blocked = FALSE
temp = "
[enemy_name] has fallen! Rejoice!"
- playsound(loc, 'sound/arcade/win.ogg', 50, TRUE, extrarange = -3, falloff = 10)
+ playsound(loc, 'sound/arcade/win.ogg', 50, TRUE)
if(obj_flags & EMAGGED)
new /obj/effect/spawner/newbomb/timer/syndicate(loc)
@@ -557,7 +557,7 @@ GLOBAL_LIST_INIT(arcade_prize_pool, list(
timer_id = null
gameover = TRUE
temp = "
You have been crushed! GAME OVER"
- playsound(loc, 'sound/arcade/lose.ogg', 50, TRUE, extrarange = -3, falloff = 10)
+ playsound(loc, 'sound/arcade/lose.ogg', 50, TRUE)
xp_gained += 10//pity points
if(obj_flags & EMAGGED)
user.gib()
@@ -1548,7 +1548,7 @@ GLOBAL_LIST_INIT(arcade_prize_pool, list(
chopchop.dismember()
qdel(chopchop)
user.mind?.adjust_experience(/datum/skill/gaming, 100)
- playsound(loc, 'sound/arcade/win.ogg', 50, TRUE, extrarange = -3, falloff = 10)
+ playsound(loc, 'sound/arcade/win.ogg', 50, TRUE)
prizevend(user, rand(3,5))
else
to_chat(c_user, "You (wisely) decide against putting your hand in the machine.")
diff --git a/code/game/machinery/computer/prisoner/gulag_teleporter.dm b/code/game/machinery/computer/prisoner/gulag_teleporter.dm
index eb39c5177b2..2cb9b53ec7c 100644
--- a/code/game/machinery/computer/prisoner/gulag_teleporter.dm
+++ b/code/game/machinery/computer/prisoner/gulag_teleporter.dm
@@ -141,12 +141,12 @@
say("[contained_id]'s ID card goal defaulting to [contained_id.goal] points.")
log_game("[key_name(user)] teleported [key_name(prisoner)] to the Labor Camp [COORD(beacon)] for [id_goal_not_set ? "default goal of ":""][contained_id.goal] points.")
teleporter.handle_prisoner(contained_id, temporary_record)
- playsound(src, 'sound/weapons/emitter.ogg', 50, TRUE)
+ playsound(src, 'sound/weapons/emitter.ogg', 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
prisoner.forceMove(get_turf(beacon))
prisoner.Paralyze(40) // small travel dizziness
to_chat(prisoner, "The teleportation makes you a little dizzy.")
new /obj/effect/particle_effect/sparks(get_turf(prisoner))
- playsound(src, "sparks", 50, TRUE)
+ playsound(src, "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
if(teleporter.locked)
teleporter.locked = FALSE
teleporter.toggle_open()
diff --git a/code/game/machinery/doors/windowdoor.dm b/code/game/machinery/doors/windowdoor.dm
index 95c7802b0d2..8d389a554bf 100644
--- a/code/game/machinery/doors/windowdoor.dm
+++ b/code/game/machinery/doors/windowdoor.dm
@@ -210,7 +210,7 @@
obj_flags |= EMAGGED
operating = TRUE
flick("[base_state]spark", src)
- playsound(src, "sparks", 75, TRUE)
+ playsound(src, "sparks", 75, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
sleep(6)
operating = FALSE
desc += "
Its access panel is smoking slightly."
diff --git a/code/game/machinery/embedded_controller/access_controller.dm b/code/game/machinery/embedded_controller/access_controller.dm
index 4e6cb1cc653..44c99a21f6c 100644
--- a/code/game/machinery/embedded_controller/access_controller.dm
+++ b/code/game/machinery/embedded_controller/access_controller.dm
@@ -31,7 +31,7 @@
obj_flags |= EMAGGED
req_access = list()
req_one_access = list()
- playsound(src, "sparks", 100, TRUE)
+ playsound(src, "sparks", 100, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
to_chat(user, "You short out the access controller.")
/obj/machinery/door_buttons/proc/removeMe()
diff --git a/code/game/machinery/firealarm.dm b/code/game/machinery/firealarm.dm
index 7e7c2a150b7..2476e970462 100644
--- a/code/game/machinery/firealarm.dm
+++ b/code/game/machinery/firealarm.dm
@@ -117,7 +117,7 @@
if(user)
user.visible_message("Sparks fly out of [src]!",
"You emag [src], disabling its thermal sensors.")
- playsound(src, "sparks", 50, TRUE)
+ playsound(src, "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
/obj/machinery/firealarm/temperature_expose(datum/gas_mixture/air, temperature, volume)
if((temperature > T0C + 200 || temperature < BODYTEMP_COLD_DAMAGE_LIMIT) && (last_alarm+FIREALARM_COOLDOWN < world.time) && !(obj_flags & EMAGGED) && detecting && !machine_stat)
diff --git a/code/game/machinery/quantum_pad.dm b/code/game/machinery/quantum_pad.dm
index e62c14c2882..f22c38c67d9 100644
--- a/code/game/machinery/quantum_pad.dm
+++ b/code/game/machinery/quantum_pad.dm
@@ -159,9 +159,9 @@
target_pad.sparks()
flick("qpad-beam", src)
- playsound(get_turf(src), 'sound/weapons/emitter2.ogg', 25, TRUE, extrarange = 3, falloff = 5)
+ playsound(get_turf(src), 'sound/weapons/emitter2.ogg', 25, TRUE)
flick("qpad-beam", target_pad)
- playsound(get_turf(target_pad), 'sound/weapons/emitter2.ogg', 25, TRUE, extrarange = 3, falloff = 5)
+ playsound(get_turf(target_pad), 'sound/weapons/emitter2.ogg', 25, TRUE)
for(var/atom/movable/ROI in get_turf(src))
if(QDELETED(ROI))
continue //sleeps in CHECK_TICK
diff --git a/code/game/machinery/recycler.dm b/code/game/machinery/recycler.dm
index a6b1c1a2b93..6c755d98dc0 100644
--- a/code/game/machinery/recycler.dm
+++ b/code/game/machinery/recycler.dm
@@ -68,7 +68,7 @@
if(safety_mode)
safety_mode = FALSE
update_icon()
- playsound(src, "sparks", 75, TRUE, -1)
+ playsound(src, "sparks", 75, TRUE, SILENCED_SOUND_EXTRARANGE)
to_chat(user, "You use the cryptographic sequencer on [src].")
/obj/machinery/recycler/update_icon_state()
diff --git a/code/game/machinery/shieldgen.dm b/code/game/machinery/shieldgen.dm
index eaae315dbf1..11f12d53fc5 100644
--- a/code/game/machinery/shieldgen.dm
+++ b/code/game/machinery/shieldgen.dm
@@ -237,7 +237,7 @@
return
obj_flags |= EMAGGED
locked = FALSE
- playsound(src, "sparks", 100, TRUE)
+ playsound(src, "sparks", 100, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
to_chat(user, "You short out the access controller.")
/obj/machinery/shieldgen/update_icon_state()
@@ -429,7 +429,7 @@
return
obj_flags |= EMAGGED
locked = FALSE
- playsound(src, "sparks", 100, TRUE)
+ playsound(src, "sparks", 100, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
to_chat(user, "You short out the access controller.")
//////////////Containment Field START
diff --git a/code/game/machinery/slotmachine.dm b/code/game/machinery/slotmachine.dm
index 392639aaf23..963b411115e 100644
--- a/code/game/machinery/slotmachine.dm
+++ b/code/game/machinery/slotmachine.dm
@@ -129,7 +129,7 @@
var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread()
spark_system.set_up(4, 0, src.loc)
spark_system.start()
- playsound(src, "sparks", 50, TRUE)
+ playsound(src, "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
/obj/machinery/computer/slot_machine/ui_interact(mob/living/user)
. = ..()
diff --git a/code/game/objects/effects/effect_system/effects_sparks.dm b/code/game/objects/effects/effect_system/effects_sparks.dm
index 653c118e7cd..488060a351b 100644
--- a/code/game/objects/effects/effect_system/effects_sparks.dm
+++ b/code/game/objects/effects/effect_system/effects_sparks.dm
@@ -31,7 +31,7 @@
/obj/effect/particle_effect/sparks/LateInitialize()
flick(icon_state, src)
- playsound(src, "sparks", 100, TRUE)
+ playsound(src, "sparks", 100, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
var/turf/T = loc
if(isturf(T))
T.hotspot_expose(1000,100)
diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm
index b14c5779378..34a2c07a4a3 100644
--- a/code/game/objects/items.dm
+++ b/code/game/objects/items.dm
@@ -72,6 +72,8 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
var/pickup_sound
///Sound uses when dropping the item, or when its thrown.
var/drop_sound
+ ///Whether or not we use stealthy audio levels for this item's attack sounds
+ var/stealthy_audio = FALSE
///How large is the object, used for stuff like whether it can fit in backpacks or not
var/w_class = WEIGHT_CLASS_NORMAL
diff --git a/code/game/objects/items/clown_items.dm b/code/game/objects/items/clown_items.dm
index d4a188f29cb..3196d470ef4 100644
--- a/code/game/objects/items/clown_items.dm
+++ b/code/game/objects/items/clown_items.dm
@@ -189,7 +189,7 @@
/obj/item/bikehorn/Initialize()
. = ..()
- AddComponent(/datum/component/squeak, list('sound/items/bikehorn.ogg'=1), 50)
+ AddComponent(/datum/component/squeak, list('sound/items/bikehorn.ogg'=1), 50, falloff_exponent = 20) //die off quick please)
/obj/item/bikehorn/attack(mob/living/carbon/M, mob/living/carbon/user)
if(user != M && ishuman(user))
@@ -212,7 +212,7 @@
/obj/item/bikehorn/airhorn/Initialize()
. = ..()
- AddComponent(/datum/component/squeak, list('sound/items/airhorn2.ogg'=1), 50)
+ AddComponent(/datum/component/squeak, list('sound/items/airhorn2.ogg'=1), 50, falloff_exponent = 20) //die off quick please)
//golden bikehorn
/obj/item/bikehorn/golden
diff --git a/code/game/objects/items/devices/lightreplacer.dm b/code/game/objects/items/devices/lightreplacer.dm
index 811e65146c0..47dd084fc78 100644
--- a/code/game/objects/items/devices/lightreplacer.dm
+++ b/code/game/objects/items/devices/lightreplacer.dm
@@ -221,7 +221,7 @@
/obj/item/lightreplacer/proc/Emag()
obj_flags ^= EMAGGED
- playsound(src.loc, "sparks", 100, TRUE)
+ playsound(src.loc, "sparks", 100, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
if(obj_flags & EMAGGED)
name = "shortcircuited [initial(name)]"
else
diff --git a/code/game/objects/items/emags.dm b/code/game/objects/items/emags.dm
index 0c1577f8653..ce6bc6d287a 100644
--- a/code/game/objects/items/emags.dm
+++ b/code/game/objects/items/emags.dm
@@ -89,7 +89,7 @@
/obj/item/card/emag/doorjack/proc/recharge(mob/user)
charges = min(charges+1, max_charges)
- playsound(src,'sound/machines/twobeep.ogg',10,TRUE)
+ playsound(src,'sound/machines/twobeep.ogg',10,TRUE, extrarange = SILENCED_SOUND_EXTRARANGE, falloff_distance = 0)
charge_timers.Remove(charge_timers[1])
/obj/item/card/emag/doorjack/examine(mob/user)
diff --git a/code/game/objects/items/melee/transforming.dm b/code/game/objects/items/melee/transforming.dm
index 72e5e4d0979..5f8980c70b9 100644
--- a/code/game/objects/items/melee/transforming.dm
+++ b/code/game/objects/items/melee/transforming.dm
@@ -1,6 +1,7 @@
/obj/item/melee/transforming
sharpness = SHARP_EDGED
bare_wound_bonus = 20
+ stealthy_audio = TRUE //Most of these are antag weps so we dont want them to be /too/ overt.
var/active = FALSE
var/force_on = 30 //force when active
var/faction_bonus_force = 0 //Bonus force dealt against certain factions
diff --git a/code/game/objects/items/stacks/bscrystal.dm b/code/game/objects/items/stacks/bscrystal.dm
index 96dd8baee62..04e8e2d7c32 100644
--- a/code/game/objects/items/stacks/bscrystal.dm
+++ b/code/game/objects/items/stacks/bscrystal.dm
@@ -30,7 +30,7 @@
/obj/item/stack/ore/bluespace_crystal/attack_self(mob/user)
user.visible_message("[user] crushes [src]!", "You crush [src]!")
new /obj/effect/particle_effect/sparks(loc)
- playsound(loc, "sparks", 50, TRUE)
+ playsound(loc, "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
blink_mob(user)
use(1)
@@ -42,7 +42,7 @@
visible_message("[src] fizzles and disappears upon impact!")
var/turf/T = get_turf(hit_atom)
new /obj/effect/particle_effect/sparks(T)
- playsound(loc, "sparks", 50, TRUE)
+ playsound(loc, "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
if(isliving(hit_atom))
blink_mob(hit_atom)
use(1)
diff --git a/code/game/objects/structures/crates_lockers/closets.dm b/code/game/objects/structures/crates_lockers/closets.dm
index e4f8c2d603d..4f0fa2217f3 100644
--- a/code/game/objects/structures/crates_lockers/closets.dm
+++ b/code/game/objects/structures/crates_lockers/closets.dm
@@ -470,7 +470,7 @@
user.visible_message("Sparks fly from [src]!",
"You scramble [src]'s lock, breaking it open!",
"You hear a faint electrical spark.")
- playsound(src, "sparks", 50, TRUE)
+ playsound(src, "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
broken = TRUE
locked = FALSE
update_icon()
diff --git a/code/game/sound.dm b/code/game/sound.dm
index 371957d8f66..8d88f6716e6 100644
--- a/code/game/sound.dm
+++ b/code/game/sound.dm
@@ -1,4 +1,22 @@
-/proc/playsound(atom/source, soundin, vol as num, vary, extrarange as num, falloff, frequency = null, channel = 0, pressure_affected = TRUE, ignore_walls = TRUE)
+/*! 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)
if(isarea(source))
CRASH("playsound(): source is an area")
@@ -12,7 +30,7 @@
// Looping through the player list has the added bonus of working for mobs inside containers
var/sound/S = sound(get_sfx(soundin))
- var/maxdistance = (world.view + extrarange)
+ var/maxdistance = SOUND_RANGE + extrarange
var/source_z = turf_source.z
var/list/listeners = SSmobs.clients_by_zlevel[source_z].Copy()
@@ -38,14 +56,34 @@
for(var/P in listeners)
var/mob/M = P
if(get_dist(M, turf_source) <= maxdistance)
- M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff, channel, pressure_affected, S)
+ M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff_exponent, channel, pressure_affected, S, maxdistance, falloff_distance)
for(var/P in SSmobs.dead_players_by_zlevel[source_z])
var/mob/M = P
if(get_dist(M, turf_source) <= maxdistance)
- M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff, channel, pressure_affected, S)
+ M.playsound_local(turf_source, soundin, vol, vary, frequency, falloff_exponent, channel, pressure_affected, S, maxdistance, falloff_distance)
+
+/*! 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) //ORIGINAL
+/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,envwet = -10000, envdry = 0) //SKYRAT EDIT CHANGE - SOUND ECHO
-///mob/proc/playsound_local(turf/turf_source, soundin, vol as num, vary, frequency, falloff, channel = 0, pressure_affected = TRUE, sound/S, distance_multiplier = 1) //ORIGINAL
-/mob/proc/playsound_local(turf/turf_source, soundin, vol as num, vary, frequency, falloff, channel = 0, pressure_affected = TRUE, sound/S, distance_multiplier = 1 ,envwet = -10000, envdry = 0) //SKYRAT EDIT CHANGE - SOUND ECHO
if(!client || !can_hear())
return
@@ -71,7 +109,9 @@
distance *= distance_multiplier
- S.volume -= max(distance - world.view, 0) * 2 //multiplicative falloff to add on top of natural audio falloff.
+ 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
@@ -104,17 +144,17 @@
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 = (falloff ? falloff : FALLOFF_SOUNDS)
+ S.falloff = max_distance || 0 //use max_distance, else just use 0 as we are a direct sound so falloff isnt relevant.
SEND_SOUND(src, S)
-/proc/sound_to_playing_players(soundin, volume = 100, vary = FALSE, frequency = 0, falloff = FALSE, channel = 0, pressure_affected = FALSE, sound/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, falloff, channel, pressure_affected, S)
+ 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))
diff --git a/code/modules/antagonists/abductor/equipment/glands/electric.dm b/code/modules/antagonists/abductor/equipment/glands/electric.dm
index 015b87f47e8..41a545b851a 100644
--- a/code/modules/antagonists/abductor/equipment/glands/electric.dm
+++ b/code/modules/antagonists/abductor/equipment/glands/electric.dm
@@ -18,7 +18,7 @@
/obj/item/organ/heart/gland/electric/activate()
owner.visible_message("[owner]'s skin starts emitting electric arcs!",\
"You feel electric energy building up inside you!")
- playsound(get_turf(owner), "sparks", 100, TRUE, -1)
+ playsound(get_turf(owner), "sparks", 100, TRUE, -1, SHORT_RANGE_SOUND_EXTRARANGE)
addtimer(CALLBACK(src, .proc/zap), rand(30, 100))
/obj/item/organ/heart/gland/electric/proc/zap()
diff --git a/code/modules/antagonists/cult/cult_comms.dm b/code/modules/antagonists/cult/cult_comms.dm
index cdf4db9b8fc..fb0f9312a72 100644
--- a/code/modules/antagonists/cult/cult_comms.dm
+++ b/code/modules/antagonists/cult/cult_comms.dm
@@ -174,13 +174,13 @@
switch(i)
if(1)
new /obj/effect/temp_visual/cult/sparks(mobloc, B.current.dir)
- playsound(mobloc, "sparks", 50, TRUE)
+ playsound(mobloc, "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
if(2)
new /obj/effect/temp_visual/dir_setting/cult/phase/out(mobloc, B.current.dir)
- playsound(mobloc, "sparks", 75, TRUE)
+ playsound(mobloc, "sparks", 75, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
if(3)
new /obj/effect/temp_visual/dir_setting/cult/phase(mobloc, B.current.dir)
- playsound(mobloc, "sparks", 100, TRUE)
+ playsound(mobloc, "sparks", 100, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
if(4)
playsound(mobloc, 'sound/magic/exit_blood.ogg', 100, TRUE)
if(B.current != owner)
diff --git a/code/modules/antagonists/cult/cult_items.dm b/code/modules/antagonists/cult/cult_items.dm
index e39b369daf9..394c8e622ba 100644
--- a/code/modules/antagonists/cult/cult_items.dm
+++ b/code/modules/antagonists/cult/cult_items.dm
@@ -561,7 +561,7 @@
uses--
if(uses <= 0)
icon_state ="shifter_drained"
- playsound(mobloc, "sparks", 50, TRUE)
+ playsound(mobloc, "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
new /obj/effect/temp_visual/dir_setting/cult/phase/out(mobloc, C.dir)
var/atom/movable/pulled = handle_teleport_grab(destination, C)
@@ -569,8 +569,8 @@
if(pulled)
C.start_pulling(pulled) //forcemove resets pulls, so we need to re-pull
new /obj/effect/temp_visual/dir_setting/cult/phase(destination, C.dir)
- playsound(destination, 'sound/effects/phasein.ogg', 25, TRUE)
- playsound(destination, "sparks", 50, TRUE)
+ playsound(destination, 'sound/effects/phasein.ogg', 25, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
+ playsound(destination, "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
else
to_chat(C, "The veil cannot be torn here!")
diff --git a/code/modules/antagonists/eldritch_cult/eldritch_effects.dm b/code/modules/antagonists/eldritch_cult/eldritch_effects.dm
index 8b30c5bd90d..be2c05ed7c5 100644
--- a/code/modules/antagonists/eldritch_cult/eldritch_effects.dm
+++ b/code/modules/antagonists/eldritch_cult/eldritch_effects.dm
@@ -79,7 +79,7 @@
continue
flick("[icon_state]_active",src)
- playsound(user, 'sound/magic/castsummon.ogg', 75, TRUE)
+ playsound(user, 'sound/magic/castsummon.ogg', 75, TRUE, extrarange = SILENCED_SOUND_EXTRARANGE, falloff_exponent = 10)
//we are doing this since some on_finished_recipe subtract the atoms from selected_atoms making them invisible permanently.
var/list/atoms_to_disappear = selected_atoms.Copy()
for(var/to_disappear in atoms_to_disappear)
diff --git a/code/modules/atmospherics/machinery/airalarm.dm b/code/modules/atmospherics/machinery/airalarm.dm
index d10b45abb26..b4beaffd679 100644
--- a/code/modules/atmospherics/machinery/airalarm.dm
+++ b/code/modules/atmospherics/machinery/airalarm.dm
@@ -850,7 +850,7 @@
return
obj_flags |= EMAGGED
visible_message("Sparks fly out of [src]!", "You emag [src], disabling its safeties.")
- playsound(src, "sparks", 50, TRUE)
+ playsound(src, "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
/obj/machinery/airalarm/deconstruct(disassembled = TRUE)
if(!(flags_1 & NODECONSTRUCT_1))
diff --git a/code/modules/chatter/chatter.dm b/code/modules/chatter/chatter.dm
index 1cfe42a8429..669b282192d 100644
--- a/code/modules/chatter/chatter.dm
+++ b/code/modules/chatter/chatter.dm
@@ -38,7 +38,7 @@
var/path = "sound/runtime/chatter/[phomeme]_[length].ogg"
playsound(loc, path,
- vol = 40, vary = 0, extrarange = 3, falloff = FALSE)
+ vol = 40, vary = 0, extrarange = 3)
sleep((length + 1) * chatter_get_sleep_multiplier(phomeme))
diff --git a/code/modules/clothing/head/helmet.dm b/code/modules/clothing/head/helmet.dm
index 814785c1a99..e00e2b9131e 100644
--- a/code/modules/clothing/head/helmet.dm
+++ b/code/modules/clothing/head/helmet.dm
@@ -466,7 +466,7 @@
magnification.gib()
//either used up correctly or taken off before polling finished (punish this by destroying the helmet)
playsound(src, 'sound/machines/buzz-sigh.ogg', 30, TRUE)
- playsound(src, "sparks", 100, TRUE)
+ playsound(src, "sparks", 100, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
visible_message("[src] fizzles and breaks apart!")
magnification = null
new /obj/effect/decal/cleanable/ash/crematorium(drop_location()) //just in case they're in a locker or other containers it needs to use crematorium ash, see the path itself for an explanation
diff --git a/code/modules/clothing/shoes/bananashoes.dm b/code/modules/clothing/shoes/bananashoes.dm
index ae654cbac44..28bbd8b969d 100644
--- a/code/modules/clothing/shoes/bananashoes.dm
+++ b/code/modules/clothing/shoes/bananashoes.dm
@@ -17,7 +17,7 @@
. = ..()
AddElement(/datum/element/update_icon_updates_onmob)
AddComponent(/datum/component/material_container, list(/datum/material/bananium), 200000, TRUE, /obj/item/stack)
- AddComponent(/datum/component/squeak, list('sound/items/bikehorn.ogg'=1), 75)
+ AddComponent(/datum/component/squeak, list('sound/items/bikehorn.ogg'=1), 75, falloff_exponent = 20)
/obj/item/clothing/shoes/clown_shoes/banana_shoes/step_action()
. = ..()
diff --git a/code/modules/clothing/shoes/miscellaneous.dm b/code/modules/clothing/shoes/miscellaneous.dm
index 7faa245126d..fb0dcf96cc7 100644
--- a/code/modules/clothing/shoes/miscellaneous.dm
+++ b/code/modules/clothing/shoes/miscellaneous.dm
@@ -102,7 +102,7 @@
/obj/item/clothing/shoes/clown_shoes/Initialize()
. = ..()
- AddComponent(/datum/component/squeak, list('sound/effects/clownstep1.ogg'=1,'sound/effects/clownstep2.ogg'=1), 50)
+ AddComponent(/datum/component/squeak, list('sound/effects/clownstep1.ogg'=1,'sound/effects/clownstep2.ogg'=1), 50, falloff_exponent = 20) //die off quick please)
AddElement(/datum/element/swabable, CELL_LINE_TABLE_CLOWN, CELL_VIRUS_TABLE_GENERIC, rand(2,3), 0)
/obj/item/clothing/shoes/clown_shoes/equipped(mob/user, slot)
@@ -297,7 +297,7 @@
/obj/item/clothing/shoes/bronze/Initialize()
. = ..()
- AddComponent(/datum/component/squeak, list('sound/machines/clockcult/integration_cog_install.ogg' = 1, 'sound/magic/clockwork/fellowship_armory.ogg' = 1), 50)
+ AddComponent(/datum/component/squeak, list('sound/machines/clockcult/integration_cog_install.ogg' = 1, 'sound/magic/clockwork/fellowship_armory.ogg' = 1), 50, extrarange = SHORT_RANGE_SOUND_EXTRARANGE)
/obj/item/clothing/shoes/wheelys
name = "Wheely-Heels"
diff --git a/code/modules/clothing/spacesuits/_spacesuits.dm b/code/modules/clothing/spacesuits/_spacesuits.dm
index 3bd40e84ecd..b5648412cee 100644
--- a/code/modules/clothing/spacesuits/_spacesuits.dm
+++ b/code/modules/clothing/spacesuits/_spacesuits.dm
@@ -212,7 +212,7 @@
obj_flags |= EMAGGED
user.visible_message("You emag [src], overwriting thermal regulator restrictions.")
log_game("[key_name(user)] emagged [src] at [AREACOORD(src)], overwriting thermal regulator restrictions.")
- playsound(src, "sparks", 50, TRUE)
+ playsound(src, "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
// update the HUD icon
/obj/item/clothing/suit/space/proc/update_hud_icon(mob/user)
diff --git a/code/modules/clothing/under/jobs/civilian/clown_mime.dm b/code/modules/clothing/under/jobs/civilian/clown_mime.dm
index 33b07754aec..21476deab4e 100644
--- a/code/modules/clothing/under/jobs/civilian/clown_mime.dm
+++ b/code/modules/clothing/under/jobs/civilian/clown_mime.dm
@@ -101,4 +101,4 @@
/obj/item/clothing/under/rank/civilian/clown/Initialize()
. = ..()
- AddComponent(/datum/component/squeak, list('sound/items/bikehorn.ogg'=1), 50)
+ AddComponent(/datum/component/squeak, list('sound/items/bikehorn.ogg'=1), 50, falloff_exponent = 20) //die off quick please
diff --git a/code/modules/instruments/songs/play_legacy.dm b/code/modules/instruments/songs/play_legacy.dm
index f0918fe01ac..7a86ef895f3 100644
--- a/code/modules/instruments/songs/play_legacy.dm
+++ b/code/modules/instruments/songs/play_legacy.dm
@@ -87,5 +87,5 @@
L.apply_status_effect(STATUS_EFFECT_GOOD_MUSIC)
if(!(M?.client?.prefs?.toggles & SOUND_INSTRUMENTS))
continue
- M.playsound_local(source, null, volume * using_instrument.volume_multiplier, falloff = 5, S = music_played)
+ M.playsound_local(source, null, volume * using_instrument.volume_multiplier, S = music_played)
// Could do environment and echo later but not for now
diff --git a/code/modules/instruments/songs/play_synthesized.dm b/code/modules/instruments/songs/play_synthesized.dm
index 25a4df40e3a..f24f01417eb 100644
--- a/code/modules/instruments/songs/play_synthesized.dm
+++ b/code/modules/instruments/songs/play_synthesized.dm
@@ -67,7 +67,7 @@
L.apply_status_effect(STATUS_EFFECT_GOOD_MUSIC)
if(!(M?.client?.prefs?.toggles & SOUND_INSTRUMENTS))
continue
- M.playsound_local(get_turf(parent), null, volume, FALSE, K.frequency, INSTRUMENT_DISTANCE_NO_FALLOFF, channel, null, copy, distance_multiplier = INSTRUMENT_DISTANCE_FALLOFF_BUFF)
+ M.playsound_local(get_turf(parent), null, volume, FALSE, K.frequency, null, channel, null, copy)
// Could do environment and echo later but not for now
/**
diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
index 63ff0646c86..eaa8743a1c9 100644
--- a/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
+++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid.dm
@@ -29,7 +29,7 @@
/mob/living/carbon/alien/humanoid/Initialize()
. = ..()
- AddComponent(/datum/component/footstep, FOOTSTEP_MOB_CLAW, 0.5, -3)
+ AddComponent(/datum/component/footstep, FOOTSTEP_MOB_CLAW, 0.5, -11)
/mob/living/carbon/alien/humanoid/show_inv(mob/user)
diff --git a/code/modules/mob/living/carbon/human/human.dm b/code/modules/mob/living/carbon/human/human.dm
index ce3f5aab42d..f285842f458 100644
--- a/code/modules/mob/living/carbon/human/human.dm
+++ b/code/modules/mob/living/carbon/human/human.dm
@@ -20,8 +20,8 @@
RegisterSignal(src, COMSIG_COMPONENT_CLEAN_FACE_ACT, .proc/clean_face)
AddComponent(/datum/component/personal_crafting)
- //AddComponent(/datum/component/footstep, FOOTSTEP_MOB_HUMAN, 1, 2) //ORIGINAL
- AddComponent(/datum/component/footstep, FOOTSTEP_MOB_HUMAN, 0.6, 2) //SKYRAT EDIT CHANGE - AESTHETICS
+ //AddComponent(/datum/component/footstep, FOOTSTEP_MOB_HUMAN, 1, -6) //ORIGINAL
+ AddComponent(/datum/component/footstep, FOOTSTEP_MOB_HUMAN, 0.6, -6) //SKYRAT EDIT CHANGE - AESTHETICS
AddComponent(/datum/component/bloodysoles/feet)
GLOB.human_list += src
diff --git a/code/modules/mob/living/carbon/human/species_types/golems.dm b/code/modules/mob/living/carbon/human/species_types/golems.dm
index f43b33b8e46..4e786d99840 100644
--- a/code/modules/mob/living/carbon/human/species_types/golems.dm
+++ b/code/modules/mob/living/carbon/human/species_types/golems.dm
@@ -421,7 +421,7 @@
/datum/species/golem/bluespace/proc/reactive_teleport(mob/living/carbon/human/H)
H.visible_message("[H] teleports!", "You destabilize and teleport!")
new /obj/effect/particle_effect/sparks(get_turf(H))
- playsound(get_turf(H), "sparks", 50, TRUE)
+ playsound(get_turf(H), "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
do_teleport(H, get_turf(H), 6, asoundin = 'sound/weapons/emitter2.ogg', channel = TELEPORT_CHANNEL_BLUESPACE)
last_teleport = world.time
diff --git a/code/modules/mob/living/carbon/monkey/monkey.dm b/code/modules/mob/living/carbon/monkey/monkey.dm
index 16a4670df18..37b6ee9c34d 100644
--- a/code/modules/mob/living/carbon/monkey/monkey.dm
+++ b/code/modules/mob/living/carbon/monkey/monkey.dm
@@ -46,7 +46,7 @@
create_dna(src)
dna.initialize_dna(random_blood_type())
- AddComponent(/datum/component/footstep, FOOTSTEP_MOB_BAREFOOT, 1, 2)
+ AddComponent(/datum/component/footstep, FOOTSTEP_MOB_BAREFOOT, 1, -6)
AddComponent(/datum/component/bloodysoles/feet)
/mob/living/carbon/monkey/Destroy()
diff --git a/code/modules/mob/living/simple_animal/bot/firebot.dm b/code/modules/mob/living/simple_animal/bot/firebot.dm
index 41f8f24420d..3cbf52802b6 100644
--- a/code/modules/mob/living/simple_animal/bot/firebot.dm
+++ b/code/modules/mob/living/simple_animal/bot/firebot.dm
@@ -125,7 +125,7 @@
if(user)
to_chat(user, "[src] buzzes and beeps.")
audible_message("[src] buzzes oddly!")
- playsound(src, "sparks", 75, TRUE)
+ playsound(src, "sparks", 75, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
if(user)
old_target_fire = user
extinguish_fires = FALSE
diff --git a/code/modules/mob/living/simple_animal/bot/medbot.dm b/code/modules/mob/living/simple_animal/bot/medbot.dm
index aba6b6c0644..36af11d4f35 100644
--- a/code/modules/mob/living/simple_animal/bot/medbot.dm
+++ b/code/modules/mob/living/simple_animal/bot/medbot.dm
@@ -218,7 +218,7 @@
to_chat(user, "You short out [src]'s reagent synthesis circuits.")
audible_message("[src] buzzes oddly!")
flick("medibot_spark", src)
- playsound(src, "sparks", 75, TRUE)
+ playsound(src, "sparks", 75, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
if(user)
oldpatient = user
diff --git a/code/modules/mob/living/simple_animal/bot/mulebot.dm b/code/modules/mob/living/simple_animal/bot/mulebot.dm
index 4c5fb5bf2f7..3b44dd063bc 100644
--- a/code/modules/mob/living/simple_animal/bot/mulebot.dm
+++ b/code/modules/mob/living/simple_animal/bot/mulebot.dm
@@ -184,7 +184,7 @@
locked = !locked
to_chat(user, "You [locked ? "lock" : "unlock"] [src]'s controls!")
flick("[base_icon]-emagged", src)
- playsound(src, "sparks", 100, FALSE)
+ playsound(src, "sparks", 100, FALSE, SHORT_RANGE_SOUND_EXTRARANGE)
/mob/living/simple_animal/bot/mulebot/update_icon_state() //if you change the icon_state names, please make sure to update /datum/wires/mulebot/on_pulse() as well. <3
icon_state = "[base_icon][on ? wires.is_cut(WIRE_AVOIDANCE) : 0]"
diff --git a/code/modules/mob/living/simple_animal/friendly/mouse.dm b/code/modules/mob/living/simple_animal/friendly/mouse.dm
index 476a911f09b..6cc4869b82c 100644
--- a/code/modules/mob/living/simple_animal/friendly/mouse.dm
+++ b/code/modules/mob/living/simple_animal/friendly/mouse.dm
@@ -34,7 +34,7 @@
/mob/living/simple_animal/mouse/Initialize()
. = ..()
- AddComponent(/datum/component/squeak, list('sound/effects/mousesqueek.ogg'=1), 100)
+ AddComponent(/datum/component/squeak, list('sound/effects/mousesqueek.ogg'=1), 100, extrarange = SHORT_RANGE_SOUND_EXTRARANGE) //as quiet as a mouse or whatever
if(!body_color)
body_color = pick( list("brown","gray","white") )
icon_state = "mouse_[body_color]"
diff --git a/code/modules/mob/living/simple_animal/hostile/ooze.dm b/code/modules/mob/living/simple_animal/hostile/ooze.dm
index cd05aa9917f..9c94a3a0092 100644
--- a/code/modules/mob/living/simple_animal/hostile/ooze.dm
+++ b/code/modules/mob/living/simple_animal/hostile/ooze.dm
@@ -37,7 +37,7 @@
. = ..()
create_reagents(300)
add_cell_sample()
- AddComponent(/datum/component/footstep, FOOTSTEP_MOB_SLIME, 7.5)
+ AddComponent(/datum/component/footstep, FOOTSTEP_MOB_SLIME, 0)
/mob/living/simple_animal/hostile/ooze/attacked_by(obj/item/I, mob/living/user)
if(!check_edible(I))
diff --git a/code/modules/mob/living/simple_animal/slime/slime.dm b/code/modules/mob/living/simple_animal/slime/slime.dm
index 5d5c4c7cc3b..163387e7cdd 100644
--- a/code/modules/mob/living/simple_animal/slime/slime.dm
+++ b/code/modules/mob/living/simple_animal/slime/slime.dm
@@ -100,7 +100,7 @@
set_colour(new_colour)
. = ..()
set_nutrition(700)
- AddComponent(/datum/component/footstep, FOOTSTEP_MOB_SLIME, 7.5)
+ AddComponent(/datum/component/footstep, FOOTSTEP_MOB_SLIME, 0)
add_cell_sample()
/mob/living/simple_animal/slime/Destroy()
diff --git a/code/modules/modular_computers/file_system/programs/arcade.dm b/code/modules/modular_computers/file_system/programs/arcade.dm
index d5fa9bde371..42c6b246049 100644
--- a/code/modules/modular_computers/file_system/programs/arcade.dm
+++ b/code/modules/modular_computers/file_system/programs/arcade.dm
@@ -28,7 +28,7 @@
user?.mind?.adjust_experience(/datum/skill/gaming, 1)
if(boss_hp <= 0)
heads_up = "You have crushed [boss_name]! Rejoice!"
- playsound(computer.loc, 'sound/arcade/win.ogg', 50, TRUE, extrarange = -3, falloff = 10)
+ playsound(computer.loc, 'sound/arcade/win.ogg', 50)
game_active = FALSE
program_icon_state = "arcade_off"
if(istype(computer))
@@ -38,7 +38,7 @@
sleep(10)
else if(player_hp <= 0 || player_mp <= 0)
heads_up = "You have been defeated... how will the station survive?"
- playsound(computer.loc, 'sound/arcade/lose.ogg', 50, TRUE, extrarange = -3, falloff = 10)
+ playsound(computer.loc, 'sound/arcade/lose.ogg', 50)
game_active = FALSE
program_icon_state = "arcade_off"
if(istype(computer))
@@ -58,17 +58,17 @@
return
if (boss_mp <= 5)
heads_up = "[boss_mpamt] magic power has been stolen from you!"
- playsound(computer.loc, 'sound/arcade/steal.ogg', 50, TRUE, extrarange = -3, falloff = 10)
+ playsound(computer.loc, 'sound/arcade/steal.ogg', 50, TRUE)
player_mp -= boss_mpamt
boss_mp += boss_mpamt
else if(boss_mp > 5 && boss_hp <12)
heads_up = "[boss_name] heals for [bossheal] health!"
- playsound(computer.loc, 'sound/arcade/heal.ogg', 50, TRUE, extrarange = -3, falloff = 10)
+ playsound(computer.loc, 'sound/arcade/heal.ogg', 50, TRUE)
boss_hp += bossheal
boss_mp -= boss_mpamt
else
heads_up = "[boss_name] attacks you for [boss_attackamt] damage!"
- playsound(computer.loc, 'sound/arcade/hit.ogg', 50, TRUE, extrarange = -3, falloff = 10)
+ playsound(computer.loc, 'sound/arcade/hit.ogg', 50, TRUE)
player_hp -= boss_attackamt
pause_state = FALSE
@@ -112,7 +112,7 @@
attackamt = rand(2,6) + rand(0, gamerSkill)
pause_state = TRUE
heads_up = "You attack for [attackamt] damage."
- playsound(computer.loc, 'sound/arcade/hit.ogg', 50, TRUE, extrarange = -3, falloff = 10)
+ playsound(computer.loc, 'sound/arcade/hit.ogg', 50, TRUE)
boss_hp -= attackamt
sleep(10)
game_check()
@@ -129,7 +129,7 @@
healcost = rand(1, maxPointCost)
pause_state = TRUE
heads_up = "You heal for [healamt] damage."
- playsound(computer.loc, 'sound/arcade/heal.ogg', 50, TRUE, extrarange = -3, falloff = 10)
+ playsound(computer.loc, 'sound/arcade/heal.ogg', 50, TRUE)
player_hp += healamt
player_mp -= healcost
sleep(10)
@@ -142,7 +142,7 @@
rechargeamt = rand(4,7) + rand(0, gamerSkill)
pause_state = TRUE
heads_up = "You regain [rechargeamt] magic power."
- playsound(computer.loc, 'sound/arcade/mana.ogg', 50, TRUE, extrarange = -3, falloff = 10)
+ playsound(computer.loc, 'sound/arcade/mana.ogg', 50, TRUE)
player_mp += rechargeamt
sleep(10)
game_check()
diff --git a/code/modules/ninja/energy_katana.dm b/code/modules/ninja/energy_katana.dm
index 99dd344788e..7c16bb58354 100644
--- a/code/modules/ninja/energy_katana.dm
+++ b/code/modules/ninja/energy_katana.dm
@@ -39,7 +39,7 @@
jaunt.Teleport(user, target)
if(proximity_flag && (isobj(target) || issilicon(target)))
spark_system.start()
- playsound(user, "sparks", 50, TRUE)
+ playsound(user, "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
playsound(user, 'sound/weapons/blade1.ogg', 50, TRUE)
target.emag_act(user)
@@ -75,7 +75,7 @@
if(doSpark)
spark_system.start()
- playsound(get_turf(src), "sparks", 50, TRUE)
+ playsound(get_turf(src), "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
var/msg = ""
diff --git a/code/modules/ninja/suit/n_suit_verbs/ninja_sword_recall.dm b/code/modules/ninja/suit/n_suit_verbs/ninja_sword_recall.dm
index aa12c301759..a68dc0dce25 100644
--- a/code/modules/ninja/suit/n_suit_verbs/ninja_sword_recall.dm
+++ b/code/modules/ninja/suit/n_suit_verbs/ninja_sword_recall.dm
@@ -28,7 +28,7 @@
if(inview) //If we can see the katana, throw it towards ourselves, damaging people as we go.
energyKatana.spark_system.start()
- playsound(H, "sparks", 50, TRUE)
+ playsound(H, "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
H.visible_message("\the [energyKatana] flies towards [H]!","You hold out your hand and \the [energyKatana] flies towards you!")
energyKatana.throw_at(H, distance+1, energyKatana.throw_speed,H)
diff --git a/code/modules/ninja/suit/ninjaDrainAct.dm b/code/modules/ninja/suit/ninjaDrainAct.dm
index 02dceb3b40f..460061a7ef1 100644
--- a/code/modules/ninja/suit/ninjaDrainAct.dm
+++ b/code/modules/ninja/suit/ninjaDrainAct.dm
@@ -43,7 +43,7 @@ They *could* go in their appropriate files, but this is supposed to be modular
if (do_after(H,10, target = src))
spark_system.start()
- playsound(loc, "sparks", 50, TRUE)
+ playsound(loc, "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
cell.use(drain)
S.cell.give(drain)
. += drain
@@ -52,7 +52,7 @@ They *could* go in their appropriate files, but this is supposed to be modular
if(!(obj_flags & EMAGGED))
flick("apc-spark", G)
- playsound(loc, "sparks", 50, TRUE)
+ playsound(loc, "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
obj_flags |= EMAGGED
locked = FALSE
update_icon()
@@ -87,7 +87,7 @@ They *could* go in their appropriate files, but this is supposed to be modular
if (do_after(H,10, target = src))
spark_system.start()
- playsound(loc, "sparks", 50, TRUE)
+ playsound(loc, "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
charge -= drain
S.cell.give(drain)
. += drain
@@ -209,7 +209,7 @@ They *could* go in their appropriate files, but this is supposed to be modular
maxcapacity = 1
if (do_after(H,10, target = src))
spark_system.start()
- playsound(loc, "sparks", 50, TRUE)
+ playsound(loc, "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
cell.use(drain)
S.cell.give(drain)
. += drain
@@ -237,7 +237,7 @@ They *could* go in their appropriate files, but this is supposed to be modular
maxcapacity = 1
if (do_after(H,10))
spark_system.start()
- playsound(loc, "sparks", 50, TRUE)
+ playsound(loc, "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
cell.use(drain)
S.cell.give(drain)
. += drain
@@ -258,6 +258,6 @@ They *could* go in their appropriate files, but this is supposed to be modular
//Got that electric touch
var/datum/effect_system/spark_spread/spark_system = new /datum/effect_system/spark_spread()
spark_system.set_up(5, 0, loc)
- playsound(src, "sparks", 50, TRUE)
+ playsound(src, "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
visible_message("[H] electrocutes [src] with [H.p_their()] touch!", "[H] electrocutes you with [H.p_their()] touch!")
electrocute_act(25, H)
diff --git a/code/modules/power/apc.dm b/code/modules/power/apc.dm
index ed89d9ec488..cad0ef88305 100644
--- a/code/modules/power/apc.dm
+++ b/code/modules/power/apc.dm
@@ -780,7 +780,7 @@
to_chat(user, "Nothing happens!")
else
flick("apc-spark", src)
- playsound(src, "sparks", 75, TRUE)
+ playsound(src, "sparks", 75, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
obj_flags |= EMAGGED
locked = FALSE
to_chat(user, "You emag the APC interface.")
diff --git a/code/modules/power/supermatter/supermatter.dm b/code/modules/power/supermatter/supermatter.dm
index 1b768509ce0..6e088fe152e 100644
--- a/code/modules/power/supermatter/supermatter.dm
+++ b/code/modules/power/supermatter/supermatter.dm
@@ -309,6 +309,8 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
///Disables the sm's proccessing totally.
var/processes = TRUE
+
+
/obj/machinery/power/supermatter_crystal/Initialize()
. = ..()
uid = gl_uid++
@@ -385,11 +387,11 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
/obj/machinery/power/supermatter_crystal/proc/alarm()
switch(get_status())
if(SUPERMATTER_DELAMINATING)
- playsound(src, 'sound/misc/bloblarm.ogg', 100)
+ playsound(src, 'sound/misc/bloblarm.ogg', 100, FALSE, 40, 30, falloff_distance = 10)
if(SUPERMATTER_EMERGENCY)
- playsound(src, 'sound/machines/engine_alert1.ogg', 100)
+ playsound(src, 'sound/machines/engine_alert1.ogg', 100, FALSE, 30, 30, falloff_distance = 10)
if(SUPERMATTER_DANGER)
- playsound(src, 'sound/machines/engine_alert2.ogg', 100)
+ playsound(src, 'sound/machines/engine_alert2.ogg', 100, FALSE, 30, 30, falloff_distance = 10)
if(SUPERMATTER_WARNING)
playsound(src, 'sound/machines/terminal_alert.ogg', 75)
@@ -509,9 +511,9 @@ GLOBAL_DATUM(main_supermatter_engine, /obj/machinery/power/supermatter_crystal)
if(last_accent_sound < world.time && prob(20))
var/aggression = min(((damage / 800) * (power / 2500)), 1.0) * 100
if(damage >= 300)
- playsound(src, "smdelam", max(50, aggression), FALSE, 10)
+ playsound(src, "smdelam", max(50, aggression), FALSE, 40, 30, falloff_distance = 10)
else
- playsound(src, "smcalm", max(50, aggression), FALSE, 10)
+ playsound(src, "smcalm", max(50, aggression), FALSE, 25, 25, falloff_distance = 10)
var/next_sound = round((100 - aggression) * 5)
last_accent_sound = world.time + max(SUPERMATTER_ACCENT_SOUND_MIN_COOLDOWN, next_sound)
diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm
index 861b1bd449a..1387cb8fce9 100644
--- a/code/modules/projectiles/gun.dm
+++ b/code/modules/projectiles/gun.dm
@@ -165,7 +165,7 @@
shake_camera(user, recoil + 1, recoil)
if(suppressed)
- playsound(user, suppressed_sound, suppressed_volume, vary_fire_sound, ignore_walls = FALSE)
+ playsound(user, suppressed_sound, suppressed_volume, vary_fire_sound, ignore_walls = FALSE, extrarange = SILENCED_SOUND_EXTRARANGE, falloff_distance = 0)
else
playsound(user, fire_sound, fire_sound_volume, vary_fire_sound)
if(message)
diff --git a/code/modules/reagents/chemistry/reagents/food_reagents.dm b/code/modules/reagents/chemistry/reagents/food_reagents.dm
index b9b6bc70062..9035d1d740b 100755
--- a/code/modules/reagents/chemistry/reagents/food_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/food_reagents.dm
@@ -757,7 +757,7 @@
/datum/reagent/consumable/liquidelectricity/on_mob_life(mob/living/carbon/M)
if(prob(25) && !isethereal(M))
M.electrocute_act(rand(10,15), "Liquid Electricity in their body", 1) //lmao at the newbs who eat energy bars
- playsound(M, "sparks", 50, TRUE)
+ playsound(M, "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
return ..()
/datum/reagent/consumable/astrotame
diff --git a/code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm b/code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm
index e48c7a83295..d7ea7b25cc8 100644
--- a/code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm
+++ b/code/modules/reagents/chemistry/reagents/pyrotechnic_reagents.dm
@@ -252,7 +252,7 @@
if(shock_timer >= rand(5,30)) //Random shocks are wildly unpredictable
shock_timer = 0
M.electrocute_act(rand(5,20), "Teslium in their body", 1, SHOCK_NOGLOVES) //SHOCK_NOGLOVES because it's caused from INSIDE of you
- playsound(M, "sparks", 50, TRUE)
+ playsound(M, "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
..()
/datum/reagent/teslium/on_mob_metabolize(mob/living/carbon/human/L)
diff --git a/code/modules/research/experimentor.dm b/code/modules/research/experimentor.dm
index 1e6362c32a6..abfc98f5ade 100644
--- a/code/modules/research/experimentor.dm
+++ b/code/modules/research/experimentor.dm
@@ -605,19 +605,19 @@
smoke.start()
/obj/item/relic/proc/corgicannon(mob/user)
- playsound(src, "sparks", rand(25,50), TRUE)
+ playsound(src, "sparks", rand(25,50), TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
var/mob/living/simple_animal/pet/dog/corgi/C = new/mob/living/simple_animal/pet/dog/corgi(get_turf(user))
C.throw_at(pick(oview(10,user)), 10, rand(3,8), callback = CALLBACK(src, .proc/throwSmoke, C))
warn_admins(user, "Corgi Cannon", 0)
/obj/item/relic/proc/clean(mob/user)
- playsound(src, "sparks", rand(25,50), TRUE)
+ playsound(src, "sparks", rand(25,50), TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
var/obj/item/grenade/chem_grenade/cleaner/CL = new/obj/item/grenade/chem_grenade/cleaner(get_turf(user))
CL.prime()
warn_admins(user, "Smoke", 0)
/obj/item/relic/proc/flash(mob/user)
- playsound(src, "sparks", rand(25,50), TRUE)
+ playsound(src, "sparks", rand(25,50), TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
var/obj/item/grenade/flashbang/CB = new/obj/item/grenade/flashbang(user.loc)
CB.prime()
warn_admins(user, "Flash")
diff --git a/code/modules/research/nanites/nanite_programs/suppression.dm b/code/modules/research/nanites/nanite_programs/suppression.dm
index 8100e50aa78..0b24d9ec24c 100644
--- a/code/modules/research/nanites/nanite_programs/suppression.dm
+++ b/code/modules/research/nanites/nanite_programs/suppression.dm
@@ -51,7 +51,7 @@
rogue_types = list(/datum/nanite_program/shocking, /datum/nanite_program/nerve_decay)
/datum/nanite_program/stun/on_trigger(comm_message)
- playsound(host_mob, "sparks", 75, TRUE, -1)
+ playsound(host_mob, "sparks", 75, TRUE, -1, SHORT_RANGE_SOUND_EXTRARANGE)
host_mob.Paralyze(80)
/datum/nanite_program/pacifying
diff --git a/code/modules/research/rdconsole.dm b/code/modules/research/rdconsole.dm
index 37c368dab55..4efaa0b3d95 100644
--- a/code/modules/research/rdconsole.dm
+++ b/code/modules/research/rdconsole.dm
@@ -142,7 +142,7 @@ Nothing else in the console has ID requirements.
/obj/machinery/computer/rdconsole/emag_act(mob/user)
if(!(obj_flags & EMAGGED))
to_chat(user, "You disable the security protocols[locked? " and unlock the console":""].")
- playsound(src, "sparks", 75, TRUE)
+ playsound(src, "sparks", 75, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
obj_flags |= EMAGGED
locked = FALSE
return ..()
diff --git a/code/modules/research/server.dm b/code/modules/research/server.dm
index 4390075f65c..3771f3d4155 100644
--- a/code/modules/research/server.dm
+++ b/code/modules/research/server.dm
@@ -191,6 +191,6 @@
/obj/machinery/computer/rdservercontrol/emag_act(mob/user)
if(obj_flags & EMAGGED)
return
- playsound(src, "sparks", 75, TRUE)
+ playsound(src, "sparks", 75, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
obj_flags |= EMAGGED
to_chat(user, "You disable the security protocols.")
diff --git a/code/modules/research/xenobiology/crossbreeding/burning.dm b/code/modules/research/xenobiology/crossbreeding/burning.dm
index c93bf0b4d13..9ac0e1d67d8 100644
--- a/code/modules/research/xenobiology/crossbreeding/burning.dm
+++ b/code/modules/research/xenobiology/crossbreeding/burning.dm
@@ -156,7 +156,7 @@ Burning extracts:
if(L != user)
do_teleport(L, get_turf(L), 6, asoundin = 'sound/effects/phasein.ogg', channel = TELEPORT_CHANNEL_BLUESPACE) //Somewhere between the effectiveness of fake and real BS crystal
new /obj/effect/particle_effect/sparks(get_turf(L))
- playsound(get_turf(L), "sparks", 50, TRUE)
+ playsound(get_turf(L), "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
..()
/obj/item/slimecross/burning/sepia
diff --git a/code/modules/research/xenobiology/crossbreeding/charged.dm b/code/modules/research/xenobiology/crossbreeding/charged.dm
index 2ce5c6968c7..b7f66858dc3 100644
--- a/code/modules/research/xenobiology/crossbreeding/charged.dm
+++ b/code/modules/research/xenobiology/crossbreeding/charged.dm
@@ -203,7 +203,7 @@ Charged extracts:
/obj/item/slimecross/charged/gold/process()
visible_message("[src] lets off a spark, and produces a living creature!")
new /obj/effect/particle_effect/sparks(get_turf(src))
- playsound(get_turf(src), "sparks", 50, TRUE)
+ playsound(get_turf(src), "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
create_random_mob(get_turf(src), HOSTILE_SPAWN)
spawned++
if(spawned >= max_spawn)
diff --git a/code/modules/research/xenobiology/crossbreeding/consuming.dm b/code/modules/research/xenobiology/crossbreeding/consuming.dm
index 6322ae98ac2..c1e3f3de3f6 100644
--- a/code/modules/research/xenobiology/crossbreeding/consuming.dm
+++ b/code/modules/research/xenobiology/crossbreeding/consuming.dm
@@ -247,7 +247,7 @@ Consuming extracts:
if(target)
do_teleport(M, target, 0, asoundin = 'sound/effects/phasein.ogg', channel = TELEPORT_CHANNEL_BLUESPACE)
new /obj/effect/particle_effect/sparks(get_turf(M))
- playsound(get_turf(M), "sparks", 50, TRUE)
+ playsound(get_turf(M), "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
/obj/item/slimecross/consuming/sepia
colour = "sepia"
diff --git a/code/modules/shuttle/shuttle.dm b/code/modules/shuttle/shuttle.dm
index 18b7d53fa7f..102a4888288 100644
--- a/code/modules/shuttle/shuttle.dm
+++ b/code/modules/shuttle/shuttle.dm
@@ -891,7 +891,7 @@
for(var/mob/M in SSmobs.clients_by_zlevel[z])
var/dist_far = get_dist(M, distant_source)
if(dist_far <= long_range && dist_far > range)
- M.playsound_local(distant_source, "sound/runtime/hyperspace/[selected_sound]_distance.ogg", 100, falloff = 20)
+ M.playsound_local(distant_source, "sound/runtime/hyperspace/[selected_sound]_distance.ogg", 100)
else if(dist_far <= range)
var/source
if(engine_list.len == 0)
@@ -903,7 +903,7 @@
if(dist_near < closest_dist)
source = O
closest_dist = dist_near
- M.playsound_local(source, "sound/runtime/hyperspace/[selected_sound].ogg", 100, falloff = range / 2)
+ M.playsound_local(source, "sound/runtime/hyperspace/[selected_sound].ogg", 100)
// Losing all initial engines should get you 2
// Adding another set of engines at 0.5 time
diff --git a/code/modules/swarmers/swarmer_objs.dm b/code/modules/swarmers/swarmer_objs.dm
index a7a657c1620..8b165f0689d 100644
--- a/code/modules/swarmers/swarmer_objs.dm
+++ b/code/modules/swarmers/swarmer_objs.dm
@@ -141,7 +141,7 @@
/obj/effect/temp_visual/swarmer/disintegration/Initialize()
. = ..()
- playsound(loc, "sparks", 100, TRUE)
+ playsound(loc, "sparks", 100, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
/obj/effect/temp_visual/swarmer/dismantle
icon_state = "dismantle"
diff --git a/modular_skyrat/modules/horrorform/code/modules/mob/hostile/true_changeling.dm b/modular_skyrat/modules/horrorform/code/modules/mob/hostile/true_changeling.dm
index d941c39493f..cc8545bd530 100644
--- a/modular_skyrat/modules/horrorform/code/modules/mob/hostile/true_changeling.dm
+++ b/modular_skyrat/modules/horrorform/code/modules/mob/hostile/true_changeling.dm
@@ -86,10 +86,10 @@
if(M_turf && M_turf.z == src.z)
var/dist = get_dist(M_turf, src)
if(dist <= 7) //source of sound very close
- M.playsound_local(src, 'modular_skyrat/modules/horrorform/sound/effects/horror_scream.ogg', 80, 1, frequency, falloff = 2)
+ M.playsound_local(src, 'modular_skyrat/modules/horrorform/sound/effects/horror_scream.ogg', 80, 1, frequency)
else
var/vol = clamp(100-((dist-7)*5), 10, 100) //Every tile decreases sound volume by 5
- M.playsound_local(src, 'modular_skyrat/modules/horrorform/sound/effects/horror_scream_reverb.ogg', vol, 1, frequency, falloff = 5)
+ M.playsound_local(src, 'modular_skyrat/modules/horrorform/sound/effects/horror_scream_reverb.ogg', vol, 1, frequency)
if(M.stat == DEAD && (M.client.prefs.chat_toggles & CHAT_GHOSTSIGHT) && !(M in viewers(get_turf(src),null)))
M.show_message(message)
audible_message(message)