diff --git a/code/__DEFINES/sound.dm b/code/__DEFINES/sound.dm index b8327d326144..470c2e3161e6 100644 --- a/code/__DEFINES/sound.dm +++ b/code/__DEFINES/sound.dm @@ -26,6 +26,8 @@ #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 +/// When a sound is from a non-visible source, add this many turfs to the distance between the source and the hearer +#define SOUND_OCCLUSION_DISTANCE_MODIFIER 3 //#define SOUND_MINIMUM_PRESSURE 10 diff --git a/code/__HELPERS/honkerblast.dm b/code/__HELPERS/honkerblast.dm index c8b9ab17ef54..8512fd30a29f 100644 --- a/code/__HELPERS/honkerblast.dm +++ b/code/__HELPERS/honkerblast.dm @@ -5,7 +5,7 @@ var/list/properly_honked = list() var/list/severely_honked = list() - playsound(origin_turf, 'sound/items/airhorn.ogg', 100, TRUE) + playsound(origin_turf, 'sound/items/airhorn.ogg', 100, TRUE, ignore_walls = 'sound/items/airhorn.ogg') for(var/mob/living/carbon/victim as anything in hearers(max(light_range, medium_range, heavy_range), origin_turf)) if(!victim.can_hear()) diff --git a/code/_onclick/item_attack.dm b/code/_onclick/item_attack.dm index 7030ac19f616..2e45ee086625 100644 --- a/code/_onclick/item_attack.dm +++ b/code/_onclick/item_attack.dm @@ -201,11 +201,12 @@ user.do_attack_animation(M) var/attack_return = M.attacked_by(src, user) + var/hitsound = get_hitsound() switch(attack_return) if(MOB_ATTACKEDBY_NO_DAMAGE) playsound(loc, 'sound/weapons/tap.ogg', get_clamped_volume(), TRUE, -1) if(MOB_ATTACKEDBY_SUCCESS) - playsound(loc, get_hitsound(), get_clamped_volume(), TRUE, extrarange = stealthy_audio ? SILENCED_SOUND_EXTRARANGE : -1, falloff_distance = 0) + playsound(loc, hitsound, get_clamped_volume(), TRUE, extrarange = stealthy_audio ? SILENCED_SOUND_EXTRARANGE : -1, falloff_distance = 0, ignore_walls = hitsound) if(MOB_ATTACKEDBY_MISS) playsound(loc, get_misssound(), get_clamped_volume(), TRUE, extrarange = stealthy_audio ? SILENCED_SOUND_EXTRARANGE : -1) diff --git a/code/datums/actions/mobs/blood_warp.dm b/code/datums/actions/mobs/blood_warp.dm index 9479d23d3345..3494d2380a3d 100644 --- a/code/datums/actions/mobs/blood_warp.dm +++ b/code/datums/actions/mobs/blood_warp.dm @@ -50,9 +50,9 @@ found_bloodpool = pick(pools) if(found_bloodpool) owner.visible_message("[owner] sinks into the blood...") - playsound(get_turf(owner), 'sound/magic/enter_blood.ogg', 100, TRUE, -1) + playsound(get_turf(owner), 'sound/magic/enter_blood.ogg', 100, TRUE, -1, ignore_walls = 'sound/magic/enter_blood.ogg') owner.forceMove(get_turf(found_bloodpool)) - playsound(get_turf(owner), 'sound/magic/exit_blood.ogg', 100, TRUE, -1) + playsound(get_turf(owner), 'sound/magic/exit_blood.ogg', 100, TRUE, -1, ignore_walls = 'sound/magic/exit_blood.ogg') owner.visible_message("And springs back out!") SEND_SIGNAL(owner, COMSIG_BLOOD_WARP) return TRUE diff --git a/code/datums/actions/mobs/charge.dm b/code/datums/actions/mobs/charge.dm index b638084d4360..0d909caa1404 100644 --- a/code/datums/actions/mobs/charge.dm +++ b/code/datums/actions/mobs/charge.dm @@ -127,7 +127,7 @@ /datum/action/cooldown/mob_cooldown/charge/proc/on_moved(atom/source) SIGNAL_HANDLER - playsound(source, 'sound/effects/meteorimpact.ogg', 200, TRUE, 2, TRUE) + playsound(source, 'sound/effects/meteorimpact.ogg', 200, TRUE, 2, TRUE, ignore_walls = 'sound/effects/meteorimpact.ogg') INVOKE_ASYNC(src, PROC_REF(DestroySurroundings), source) /datum/action/cooldown/mob_cooldown/charge/proc/DestroySurroundings(atom/movable/charger) diff --git a/code/datums/actions/mobs/projectileattack.dm b/code/datums/actions/mobs/projectileattack.dm index 6950027c5740..ea311538b9b2 100644 --- a/code/datums/actions/mobs/projectileattack.dm +++ b/code/datums/actions/mobs/projectileattack.dm @@ -139,7 +139,7 @@ if(counter < 1) counter = 16 shoot_projectile(firer, target, counter * 22.5, firer, null, null) - playsound(get_turf(firer), projectile_sound, 20, TRUE) + playsound(get_turf(firer), projectile_sound, 20, TRUE, ignore_walls = projectile_sound) SLEEP_CHECK_DEATH(0.1 SECONDS, firer) /datum/action/cooldown/mob_cooldown/projectile_attack/random_aoe @@ -153,7 +153,7 @@ /datum/action/cooldown/mob_cooldown/projectile_attack/random_aoe/attack_sequence(mob/living/firer, atom/target) var/turf/U = get_turf(firer) - playsound(U, projectile_sound, 300, TRUE, 5) + playsound(U, projectile_sound, 300, TRUE, 5, ignore_walls = projectile_sound) for(var/i in 1 to 32) shoot_projectile(firer, target, rand(0, 360), firer, null, null) @@ -176,7 +176,7 @@ fire_shotgun(firer, target, shot_angles) /datum/action/cooldown/mob_cooldown/projectile_attack/shotgun_blast/proc/fire_shotgun(mob/living/firer, atom/target, list/chosen_angles) - playsound(firer, projectile_sound, 200, TRUE, 2) + playsound(firer, projectile_sound, 200, TRUE, 2, ignore_walls = projectile_sound) for(var/spread in chosen_angles) shoot_projectile(firer, target, null, firer, spread, null) @@ -217,7 +217,7 @@ /datum/action/cooldown/mob_cooldown/projectile_attack/dir_shots/proc/fire_in_directions(mob/living/firer, atom/target, list/dirs) if(!islist(dirs)) dirs = GLOB.alldirs.Copy() - playsound(firer, projectile_sound, 200, TRUE, 2) + playsound(firer, projectile_sound, 200, TRUE, 2, ignore_walls = projectile_sound) for(var/d in dirs) var/turf/E = get_step(firer, d) shoot_projectile(firer, E, null, firer, null, null) diff --git a/code/datums/components/cult_ritual_item.dm b/code/datums/components/cult_ritual_item.dm index f77b38094c06..e4fd3e35cfb1 100644 --- a/code/datums/components/cult_ritual_item.dm +++ b/code/datums/components/cult_ritual_item.dm @@ -175,7 +175,7 @@ * cultist - the mob doing the destroying */ /datum/component/cult_ritual_item/proc/do_destroy_girder(obj/structure/girder/cult/cult_girder, mob/living/cultist) - playsound(cult_girder, 'sound/weapons/resonator_blast.ogg', 40, TRUE, ignore_walls = FALSE) + playsound(cult_girder, 'sound/weapons/resonator_blast.ogg', 40, TRUE) cultist.visible_message( span_warning("[cultist] strikes [cult_girder] with [parent]!"), span_notice("You demolish [cult_girder].") @@ -190,7 +190,7 @@ * cultist - the mob doing the unanchoring. */ /datum/component/cult_ritual_item/proc/do_unanchor_structure(obj/structure/cult_structure, mob/living/cultist) - playsound(cult_structure, 'sound/items/deconstruct.ogg', 30, TRUE, ignore_walls = FALSE) + playsound(cult_structure, 'sound/items/deconstruct.ogg', 30, TRUE) cult_structure.set_anchored(!cult_structure.anchored) to_chat(cultist, span_notice("You [cult_structure.anchored ? "":"un"]secure \the [cult_structure] [cult_structure.anchored ? "to":"from"] the floor.")) diff --git a/code/datums/components/spirit_holding.dm b/code/datums/components/spirit_holding.dm index 6b7460237d1a..ec4e44fdef18 100644 --- a/code/datums/components/spirit_holding.dm +++ b/code/datums/components/spirit_holding.dm @@ -103,10 +103,10 @@ /datum/component/spirit_holding/proc/attempt_exorcism(mob/exorcist) var/atom/movable/exorcised_movable = parent to_chat(exorcist, span_notice("You begin to exorcise [parent]...")) - playsound(parent, 'sound/hallucinations/veryfar_noise.ogg',40,TRUE) + playsound(parent, 'sound/hallucinations/veryfar_noise.ogg',40,TRUE, ignore_walls = 'sound/hallucinations/veryfar_noise.ogg') if(!do_after(exorcist, exorcised_movable, 4 SECONDS)) return - playsound(parent, 'sound/effects/pray_chaplain.ogg',60,TRUE) + playsound(parent, 'sound/effects/pray_chaplain.ogg',60,TRUE, ignore_walls = 'sound/effects/pray_chaplain.ogg') UnregisterSignal(exorcised_movable, list(COMSIG_ATOM_RELAYMOVE, COMSIG_BIBLE_SMACKED)) RegisterSignal(exorcised_movable, COMSIG_ITEM_ATTACK_SELF, PROC_REF(on_attack_self)) to_chat(bound_spirit, span_userdanger("You were exorcised!")) diff --git a/code/datums/components/thermite.dm b/code/datums/components/thermite.dm index a1050068435d..97a7cbfaa078 100644 --- a/code/datums/components/thermite.dm +++ b/code/datums/components/thermite.dm @@ -81,7 +81,7 @@ /datum/component/thermite/proc/thermite_melt(mob/user) var/turf/master = parent master.cut_overlay(overlay) - playsound(master, 'sound/items/welder.ogg', 100, TRUE) + playsound(master, 'sound/items/welder.ogg', 100, TRUE, ignore_walls = 'sound/items/welder.ogg') fakefire = new(master) burn_timer = addtimer(CALLBACK(src, PROC_REF(burn_parent), user), min(amount * 0.35 SECONDS, 20 SECONDS), TIMER_STOPPABLE) UnregisterFromParent() diff --git a/code/datums/dash_weapon.dm b/code/datums/dash_weapon.dm index bab6db716ba7..6eb1e227d555 100644 --- a/code/datums/dash_weapon.dm +++ b/code/datums/dash_weapon.dm @@ -42,7 +42,7 @@ return FALSE var/obj/spot1 = new phaseout(get_turf(user), user.dir) - playsound(target_turf, dash_sound, 25, TRUE) + playsound(target_turf, dash_sound, 25, TRUE, ignore_walls = dash_sound) var/obj/spot2 = new phasein(get_turf(user), user.dir) spot1.Beam(spot2,beam_effect,time=2 SECONDS) current_charges-- @@ -55,7 +55,7 @@ /datum/action/innate/dash/proc/charge() current_charges = clamp(current_charges + 1, 0, max_charges) if(recharge_sound) - playsound(dashing_item, recharge_sound, 50, TRUE) + playsound(dashing_item, recharge_sound, 50, TRUE, ignore_walls = recharge_sound) if(!owner) return diff --git a/code/datums/elements/footstep.dm b/code/datums/elements/footstep.dm index 969094644fde..41fbb8848e03 100644 --- a/code/datums/elements/footstep.dm +++ b/code/datums/elements/footstep.dm @@ -69,7 +69,7 @@ if(source.body_position == LYING_DOWN) //play crawling sound if we're lying if(turf.footstep) - playsound(turf, 'sound/effects/footstep/crawl1.ogg', 15 * volume, falloff_distance = 1, vary = sound_vary) + playsound(turf, 'sound/effects/footstep/crawl1.ogg', 15 * volume, falloff_distance = 1, vary = sound_vary, ignore_walls = 'sound/effects/footstep/crawl1.ogg') return if(iscarbon(source)) @@ -115,21 +115,23 @@ return if(isfile(footstep_sounds) || istext(footstep_sounds)) - playsound(source.loc, footstep_sounds, volume, falloff_distance = 1, vary = sound_vary) + playsound(source.loc, footstep_sounds, volume, falloff_distance = 1, vary = sound_vary, ignore_walls = footstep_sounds) return var/turf_footstep = prepared_steps[footstep_type] if(isnull(turf_footstep) || !footstep_sounds[turf_footstep]) return + var/sound_played = pick(footstep_sounds[turf_footstep][1]) playsound( source.loc, - pick(footstep_sounds[turf_footstep][1]), + sound_played, footstep_sounds[turf_footstep][2] * volume, TRUE, footstep_sounds[turf_footstep][3] + e_range, falloff_distance = 1, - vary = sound_vary + vary = sound_vary, + ignore_walls = sound_played, ) /datum/element/footstep/proc/play_humanstep(mob/living/carbon/human/source, atom/oldloc, direction, forced, list/old_locs, momentum_change) @@ -159,26 +161,30 @@ var/shoestep_type = prepared_steps[FOOTSTEP_MOB_SHOE] if(!isnull(shoestep_type) && footstep_sounds[shoestep_type]) // shoestep type can be null + var/sound_played = pick(footstep_sounds[shoestep_type][1]) heard_clients = playsound( source.loc, - pick(footstep_sounds[shoestep_type][1]), + sound_played, footstep_sounds[shoestep_type][2] * volume * volume_multiplier, TRUE, footstep_sounds[shoestep_type][3] + e_range + range_adjustment, falloff_distance = 1, - vary = sound_vary + vary = sound_vary, + ignore_walls = sound_played, ) else // we are barefoot if(source.dna.species.special_step_sounds) + var/sound_played = pick(source.dna.species.special_step_sounds) heard_clients = playsound( source.loc, - pick(source.dna.species.special_step_sounds), + sound_played, 50, TRUE, falloff_distance = 1, - vary = sound_vary + vary = sound_vary, + ignore_walls = sound_played, ) else var/obj/item/bodypart/leg/right_leg = source.get_bodypart(BODY_ZONE_R_LEG) @@ -200,14 +206,16 @@ sound_pool = GLOB.footstep if(!isnull(sound_pool) && !isnull(barefoot_type) && sound_pool[turf_sound_type]) + var/sound_played = pick(sound_pool[turf_sound_type][1]) heard_clients = playsound( source.loc, - pick(sound_pool[turf_sound_type][1]), + sound_played, sound_pool[turf_sound_type][2] * volume * volume_multiplier, TRUE, sound_pool[turf_sound_type][3] + e_range + range_adjustment, falloff_distance = 1, - vary = sound_vary + vary = sound_vary, + ignore_walls = sound_played, ) if(heard_clients) @@ -227,6 +235,6 @@ if(CHECK_MOVE_LOOP_FLAGS(source, MOVEMENT_LOOP_OUTSIDE_CONTROL)) return - playsound(source_loc, footstep_sounds, 50, falloff_distance = 1, vary = sound_vary) + playsound(source_loc, footstep_sounds, 50, falloff_distance = 1, vary = sound_vary, ignore_walls = footstep_sounds) #undef SHOULD_DISABLE_FOOTSTEPS diff --git a/code/datums/elements/ranged_attacks.dm b/code/datums/elements/ranged_attacks.dm index 6b45ff9dfd22..6ac96ef33715 100644 --- a/code/datums/elements/ranged_attacks.dm +++ b/code/datums/elements/ranged_attacks.dm @@ -34,12 +34,12 @@ if(casingtype) var/obj/item/ammo_casing/casing = new casingtype(startloc) - playsound(firer, projectilesound, 100, TRUE) + playsound(firer, projectilesound, 100, TRUE, ignore_walls = projectilesound) casing.fire_casing(target, firer, null, null, null, ran_zone(), 0, firer) else if(projectiletype) var/obj/projectile/P = new projectiletype(startloc) - playsound(firer, projectilesound, 100, TRUE) + playsound(firer, projectilesound, 100, TRUE, ignore_walls = projectilesound) P.starting = startloc P.firer = firer P.fired_from = firer diff --git a/code/datums/martial/cqc.dm b/code/datums/martial/cqc.dm index 318e6411f1d8..6208fea28a66 100644 --- a/code/datums/martial/cqc.dm +++ b/code/datums/martial/cqc.dm @@ -45,7 +45,7 @@ D.visible_message(span_danger("[A] slams [D] into the ground!"), \ span_userdanger("You're slammed into the ground by [A]!"), span_hear("You hear a sickening sound of flesh hitting flesh!"), null, A) to_chat(A, span_danger("You slam [D] into the ground!")) - playsound(get_turf(A), 'sound/weapons/slam.ogg', 50, TRUE, -1) + playsound(get_turf(A), 'sound/weapons/slam.ogg', 50, TRUE, -1, ignore_walls = 'sound/weapons/slam.ogg') D.apply_damage(10, BRUTE) D.Paralyze(120) log_combat(A, D, "slammed (CQC)") @@ -58,7 +58,7 @@ D.visible_message(span_danger("[A] kicks [D] back!"), \ span_userdanger("You're kicked back by [A]!"), span_hear("You hear a sickening sound of flesh hitting flesh!"), COMBAT_MESSAGE_RANGE, A) to_chat(A, span_danger("You kick [D] back!")) - playsound(get_turf(A), 'sound/weapons/cqchit1.ogg', 50, TRUE, -1) + playsound(get_turf(A), 'sound/weapons/cqchit1.ogg', 50, TRUE, -1, ignore_walls = 'sound/weapons/cqchit1.ogg') var/atom/throw_target = get_edge_target_turf(D, A.dir) D.throw_at(throw_target, 1, 14, A) D.apply_damage(10, A.get_attack_type()) @@ -69,7 +69,7 @@ D.visible_message(span_danger("[A] kicks [D]'s head, knocking [D.p_them()] out!"), \ span_userdanger("You're knocked unconscious by [A]!"), span_hear("You hear a sickening sound of flesh hitting flesh!"), null, A) to_chat(A, span_danger("You kick [D]'s head, knocking [D.p_them()] out!")) - playsound(get_turf(A), SFX_PUNCH, 50, TRUE, -1) + playsound(get_turf(A), SFX_PUNCH, 50, TRUE, -1, ignore_walls = SFX_PUNCH) D.SetSleeping(300) D.adjustOrganLoss(ORGAN_SLOT_BRAIN, 15, 150) . = TRUE @@ -82,7 +82,7 @@ span_userdanger("Your neck is punched by [A]!"), span_hear("You hear a sickening sound of flesh hitting flesh!"), COMBAT_MESSAGE_RANGE, A) to_chat(A, span_danger("You punch [D]'s neck!")) D.stamina.adjust(-60) - playsound(get_turf(A), 'sound/weapons/cqchit1.ogg', 50, TRUE, -1) + playsound(get_turf(A), 'sound/weapons/cqchit1.ogg', 50, TRUE, -1, ignore_walls = 'sound/weapons/cqchit1.ogg') return TRUE /datum/martial_art/cqc/proc/Restrain(mob/living/A, mob/living/D) @@ -109,7 +109,7 @@ D.visible_message(span_danger("[A] strikes [D]'s abdomen, neck and back consecutively"), \ span_userdanger("Your abdomen, neck and back are struck consecutively by [A]!"), span_hear("You hear a sickening sound of flesh hitting flesh!"), COMBAT_MESSAGE_RANGE, A) to_chat(A, span_danger("You strike [D]'s abdomen, neck and back consecutively!")) - playsound(get_turf(D), 'sound/weapons/cqchit2.ogg', 50, TRUE, -1) + playsound(get_turf(D), 'sound/weapons/cqchit2.ogg', 50, TRUE, -1, ignore_walls = 'sound/weapons/cqchit2.ogg') var/obj/item/I = D.get_active_held_item() if(I && D.temporarilyRemoveItemFromInventory(I)) A.put_in_hands(I) @@ -156,9 +156,9 @@ picked_hit_type = "stomp" D.apply_damage(bonus_damage, BRUTE) if(picked_hit_type == "kick" || picked_hit_type == "stomp") - playsound(get_turf(D), 'sound/weapons/cqchit2.ogg', 50, TRUE, -1) + playsound(get_turf(D), 'sound/weapons/cqchit2.ogg', 50, TRUE, -1, ignore_walls = 'sound/weapons/cqchit2.ogg') else - playsound(get_turf(D), 'sound/weapons/cqchit1.ogg', 50, TRUE, -1) + playsound(get_turf(D), 'sound/weapons/cqchit1.ogg', 50, TRUE, -1, ignore_walls = 'sound/weapons/cqchit1.ogg') D.visible_message(span_danger("[A] [picked_hit_type]ed [D]!"), \ span_userdanger("You're [picked_hit_type]ed by [A]!"), span_hear("You hear a sickening sound of flesh hitting flesh!"), COMBAT_MESSAGE_RANGE, A) to_chat(A, span_danger("You [picked_hit_type] [D]!")) @@ -167,7 +167,7 @@ D.visible_message(span_danger("[A] leg sweeps [D]!"), \ span_userdanger("Your legs are sweeped by [A]!"), span_hear("You hear a sickening sound of flesh hitting flesh!"), null, A) to_chat(A, span_danger("You leg sweep [D]!")) - playsound(get_turf(A), 'sound/effects/hit_kick.ogg', 50, TRUE, -1) + playsound(get_turf(A), 'sound/effects/hit_kick.ogg', 50, TRUE, -1, ignore_walls = 'sound/effects/hit_kick.ogg') D.apply_damage(10, BRUTE) D.Paralyze(60) log_combat(A, D, "sweeped (CQC)") @@ -186,7 +186,7 @@ D.visible_message(span_danger("[A] strikes [D]'s jaw with their hand!"), \ span_userdanger("Your jaw is struck by [A], you feel disoriented!"), span_hear("You hear a sickening sound of flesh hitting flesh!"), COMBAT_MESSAGE_RANGE, A) to_chat(A, span_danger("You strike [D]'s jaw, leaving [D.p_them()] disoriented!")) - playsound(get_turf(D), 'sound/weapons/cqchit1.ogg', 50, TRUE, -1) + playsound(get_turf(D), 'sound/weapons/cqchit1.ogg', 50, TRUE, -1, ignore_walls = 'sound/weapons/cqchit1.ogg') if(I && D.temporarilyRemoveItemFromInventory(I)) A.put_in_hands(I) D.set_timed_status_effect(4 SECONDS, /datum/status_effect/jitter, only_if_higher = TRUE) diff --git a/code/datums/martial/plasma_fist.dm b/code/datums/martial/plasma_fist.dm index 42cd8640d3c9..1d84bbb8f5f1 100644 --- a/code/datums/martial/plasma_fist.dm +++ b/code/datums/martial/plasma_fist.dm @@ -48,7 +48,7 @@ D.visible_message(span_danger("[A] hits [D] with Plasma Punch!"), \ span_userdanger("You're hit with a Plasma Punch by [A]!"), span_hear("You hear a sickening sound of flesh hitting flesh!"), null, A) to_chat(A, span_danger("You hit [D] with Plasma Punch!")) - playsound(D.loc, SFX_PUNCH, 50, TRUE, -1) + playsound(D.loc, SFX_PUNCH, 50, TRUE, -1, ignore_walls = SFX_PUNCH) var/atom/throw_target = get_edge_target_turf(D, get_dir(D, get_step_away(D, A))) D.throw_at(throw_target, 200, 4,A) A.say("HYAH!", forced="plasma fist") @@ -59,7 +59,7 @@ var/hasclient = D.client ? TRUE : FALSE A.do_attack_animation(D, ATTACK_EFFECT_PUNCH) - playsound(D.loc, SFX_PUNCH, 50, TRUE, -1) + playsound(D.loc, SFX_PUNCH, 50, TRUE, -1, ignore_walls = SFX_PUNCH) A.say("PLASMA FIST!", forced="plasma fist") D.visible_message(span_danger("[A] hits [D] with THE PLASMA FIST TECHNIQUE!"), \ span_userdanger("You're suddenly hit with THE PLASMA FIST TECHNIQUE by [A]!"), span_hear("You hear a sickening sound of flesh hitting flesh!"), null, A) @@ -110,7 +110,7 @@ user.apply_damage(rand(50,70), BRUTE) addtimer(CALLBACK(src,PROC_REF(Apotheosis_end), user), 6 SECONDS) - playsound(boomspot, SFX_PUNCH, 50, TRUE, -1) + playsound(boomspot, SFX_PUNCH, 50, TRUE, -1, ignore_walls = SFX_PUNCH) explosion(user, devastation_range = plasma_power, heavy_impact_range = plasma_power*2, light_impact_range = plasma_power*4, ignorecap = TRUE, explosion_cause = src) plasma_power = 1 //just in case there is any clever way to cause it to happen again diff --git a/code/datums/martial/psychotic_brawl.dm b/code/datums/martial/psychotic_brawl.dm index 76c99a497d8a..11be46fdbac5 100644 --- a/code/datums/martial/psychotic_brawl.dm +++ b/code/datums/martial/psychotic_brawl.dm @@ -48,7 +48,7 @@ D.visible_message(span_danger("[A] [atk_verb]s [D]!"), \ span_userdanger("You're [atk_verb]ed by [A]!"), span_hear("You hear a sickening sound of flesh hitting flesh!"), null, A) to_chat(A, span_danger("You [atk_verb] [D]!")) - playsound(get_turf(D), SFX_PUNCH, 40, TRUE, -1) + playsound(get_turf(D), SFX_PUNCH, 40, TRUE, -1, ignore_walls = SFX_PUNCH) D.apply_damage(rand(5,10), A.get_attack_type(), BODY_ZONE_HEAD) A.apply_damage(rand(5,10), A.get_attack_type(), BODY_ZONE_HEAD) if (iscarbon(D)) diff --git a/code/datums/martial/sleeping_carp.dm b/code/datums/martial/sleeping_carp.dm index 0ee74a0861f4..d3001257a4a0 100644 --- a/code/datums/martial/sleeping_carp.dm +++ b/code/datums/martial/sleeping_carp.dm @@ -33,7 +33,7 @@ D.visible_message(span_danger("[A] [atk_verb]s [D]!"), \ span_userdanger("[A] [atk_verb]s you!"), null, null, A) to_chat(A, span_danger("You [atk_verb] [D]!")) - playsound(get_turf(D), SFX_PUNCH, 25, TRUE, -1) + playsound(get_turf(D), SFX_PUNCH, 25, TRUE, -1, ignore_walls = SFX_PUNCH) log_combat(A, D, "strong punched (Sleeping Carp)") D.apply_damage(20, A.get_attack_type(), affecting) return @@ -87,7 +87,7 @@ span_userdanger("[A] [atk_verb]s you!"), null, null, A) to_chat(A, span_danger("You [atk_verb] [D]!")) D.apply_damage(rand(10,15), BRUTE, affecting) - playsound(get_turf(D), SFX_PUNCH, 25, TRUE, -1) + playsound(get_turf(D), SFX_PUNCH, 25, TRUE, -1, ignore_walls = SFX_PUNCH) log_combat(A, D, "punched (Sleeping Carp)") return TRUE diff --git a/code/datums/mutations/hulk.dm b/code/datums/mutations/hulk.dm index 85829da1fec8..77df19938819 100644 --- a/code/datums/mutations/hulk.dm +++ b/code/datums/mutations/hulk.dm @@ -201,7 +201,7 @@ continue yeeted_person.adjustBruteLoss(step*0.5) - playsound(collateral_mob,SFX_PUNCH,50,TRUE) + playsound(collateral_mob,SFX_PUNCH,50,TRUE, ignore_walls = SFX_PUNCH) log_combat(the_hulk, collateral_mob, "has smacked with tail swing victim") log_combat(the_hulk, yeeted_person, "has smacked this person into someone while tail swinging") // i have no idea how to better word this @@ -242,7 +242,7 @@ yeeted_person.visible_message(span_danger("[the_hulk] throws [yeeted_person]!"), \ span_userdanger("You're thrown by [the_hulk]!"), span_hear("You hear aggressive shuffling and a loud thud!"), null, the_hulk) to_chat(the_hulk, span_danger("You throw [yeeted_person]!")) - playsound(the_hulk.loc, SFX_SWING_HIT, 50, TRUE) + playsound(the_hulk.loc, SFX_SWING_HIT, 50, TRUE, ignore_walls = SFX_SWING_HIT) var/turf/T = get_edge_target_turf(the_hulk, the_hulk.dir) if(!isturf(T)) return diff --git a/code/datums/mutations/sight.dm b/code/datums/mutations/sight.dm index 974c8be66e35..d729c95d7958 100644 --- a/code/datums/mutations/sight.dm +++ b/code/datums/mutations/sight.dm @@ -172,7 +172,7 @@ LE.aimed_def_zone = ran_zone(source.zone_selected) LE.preparePixelProjectile(target, source, modifiers) INVOKE_ASYNC(LE, TYPE_PROC_REF(/obj/projectile, fire)) - playsound(source, 'sound/weapons/taser2.ogg', 75, TRUE) + playsound(source, 'sound/weapons/taser2.ogg', 75, TRUE, ignore_walls = 'sound/weapons/taser2.ogg') ///Projectile type used by laser eyes /obj/projectile/beam/laser_eyes diff --git a/code/datums/storage/subtypes/bag_of_holding.dm b/code/datums/storage/subtypes/bag_of_holding.dm index 6c86ad668160..5400489265da 100644 --- a/code/datums/storage/subtypes/bag_of_holding.dm +++ b/code/datums/storage/subtypes/bag_of_holding.dm @@ -16,7 +16,7 @@ var/turf/loccheck = get_turf(parent) to_chat(user, span_danger("The Bluespace interfaces of the two devices catastrophically malfunction!")) qdel(to_insert) - playsound(loccheck,'sound/effects/supermatter.ogg', 200, TRUE) + playsound(loccheck,'sound/effects/supermatter.ogg', 200, TRUE, ignore_walls = TRUE) message_admins("[ADMIN_LOOKUPFLW(user)] detonated a bag of holding at [ADMIN_VERBOSEJMP(loccheck)].") log_game("[key_name(user)] detonated a bag of holding at [loc_name(loccheck)].") diff --git a/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm b/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm index f991148ee643..bb45abbddbe2 100644 --- a/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm +++ b/code/game/gamemodes/dynamic/dynamic_rulesets_midround.dm @@ -647,7 +647,7 @@ player_mind.add_antag_datum(/datum/antagonist/nightmare) S.set_species(/datum/species/shadow/nightmare) - playsound(S, 'sound/magic/ethereal_exit.ogg', 50, TRUE, -1) + playsound(S, 'sound/magic/ethereal_exit.ogg', 50, TRUE, -1, ignore_walls = 'sound/magic/ethereal_exit.ogg') message_admins("[ADMIN_LOOKUPFLW(S)] has been made into a Nightmare by the midround ruleset.") log_game("DYNAMIC: [key_name(S)] was spawned as a Nightmare by the midround ruleset.") return S @@ -695,7 +695,7 @@ player_mind.special_role = ROLE_SPACE_DRAGON player_mind.add_antag_datum(/datum/antagonist/space_dragon) - playsound(S, 'sound/magic/ethereal_exit.ogg', 50, TRUE, -1) + playsound(S, 'sound/magic/ethereal_exit.ogg', 50, TRUE, -1, ignore_walls = 'sound/magic/ethereal_exit.ogg') message_admins("[ADMIN_LOOKUPFLW(S)] has been made into a Space Dragon by the midround ruleset.") log_game("DYNAMIC: [key_name(S)] was spawned as a Space Dragon by the midround ruleset.") priority_announce("A large organic energy flux has been recorded near of [station_name()], please stand-by.") diff --git a/code/game/machinery/doors/airlock.dm b/code/game/machinery/doors/airlock.dm index b5b3b23602f3..884e09b0af5e 100644 --- a/code/game/machinery/doors/airlock.dm +++ b/code/game/machinery/doors/airlock.dm @@ -245,7 +245,7 @@ if(locked) return set_bolt(TRUE) - playsound(src,boltDown,30,FALSE,3) + playsound(src,boltDown,30,FALSE,3, ignore_walls = boltDown) audible_message(span_hear("You hear a click from the bottom of the door."), null, 1) update_appearance() @@ -263,7 +263,7 @@ if(!locked) return set_bolt(FALSE) - playsound(src,boltUp,30,FALSE,3) + playsound(src,boltUp,30,FALSE,3, ignore_walls = boltUp) audible_message(span_hear("You hear a click from the bottom of the door."), null, 1) update_appearance() @@ -533,9 +533,9 @@ if(!machine_stat) update_icon(ALL, AIRLOCK_DENY) if(prob(1) && prob(10)) //1000. - playsound(src, 'sound/machines/access_denied_hl.ogg', 50, FALSE, 3) + playsound(src, 'sound/machines/access_denied_hl.ogg', 50, FALSE, 3, ignore_walls = 'sound/machines/access_denied_hl.ogg') else - playsound(src,doorDeni,50,FALSE,3) + playsound(src,doorDeni,50,FALSE,3, ignore_walls = doorDeni) addtimer(CALLBACK(src, TYPE_PROC_REF(/atom, update_icon), ALL, AIRLOCK_CLOSED), AIRLOCK_DENY_ANIMATION_TIME) /obj/machinery/door/airlock/examine(mob/user) @@ -721,7 +721,7 @@ if(ishuman(user) && prob(40) && density) var/mob/living/carbon/human/H = user if((HAS_TRAIT(H, TRAIT_DUMB)) && Adjacent(user)) - playsound(src, 'sound/effects/bang.ogg', 25, TRUE) + playsound(src, 'sound/effects/bang.ogg', 25, TRUE, ignore_walls = 'sound/effects/bang.ogg') if(!istype(H.head, /obj/item/clothing/head/helmet)) H.visible_message( span_danger("[user] headbutts the airlock."), \ @@ -948,7 +948,7 @@ return user.visible_message(span_notice("[user] begins sealing [src]."), span_notice("You begin sealing [src].")) - playsound(src, 'sound/items/jaws_pry.ogg', 30, TRUE) + playsound(src, 'sound/items/jaws_pry.ogg', 30, TRUE, ignore_walls = 'sound/items/jaws_pry.ogg') if(!do_after(user, src, airlockseal.seal_time)) return @@ -964,7 +964,7 @@ to_chat(user, span_warning("For some reason, you can't attach [airlockseal]!")) return - playsound(src, forcedClosed, 30, TRUE) + playsound(src, forcedClosed, 30, TRUE, ignore_walls = forcedClosed) user.visible_message(span_notice("[user] finishes sealing [src]."), span_notice("You finish sealing [src].")) seal = airlockseal modify_max_integrity(max_integrity * AIRLOCK_SEAL_MULTIPLIER) @@ -1039,12 +1039,12 @@ to_chat(user, span_warning("You don't have the dexterity to remove the seal!")) return TRUE user.visible_message(span_notice("[user] begins removing the seal from [src]."), span_notice("You begin removing [src]'s pneumatic seal.")) - playsound(src, forcedOpen, 30, TRUE) + playsound(src, forcedOpen, 30, TRUE, ignore_walls = forcedOpen) if(!do_after(user, src, airlockseal.unseal_time)) return TRUE if(!seal) return TRUE - playsound(src, 'sound/items/jaws_pry.ogg', 30, TRUE) + playsound(src, 'sound/items/jaws_pry.ogg', 30, TRUE, ignore_walls = 'sound/items/jaws_pry.ogg') airlockseal.forceMove(get_turf(user)) user.visible_message(span_notice("[user] finishes removing the seal from [src]."), span_notice("You finish removing [src]'s pneumatic seal.")) seal = null @@ -1104,7 +1104,7 @@ if(!prying_so_hard) var/time_to_open = 50 - playsound(src, 'sound/machines/airlock_alien_prying.ogg', 100, TRUE) //is it aliens or just the CE being a dick? + playsound(src, 'sound/machines/airlock_alien_prying.ogg', 100, TRUE, ignore_walls = 'sound/machines/airlock_alien_prying.ogg') //is it aliens or just the CE being a dick? prying_so_hard = TRUE if(do_after(user, src, time_to_open)) if(check_electrified && shock(user,100)) @@ -1137,10 +1137,10 @@ if(obj_flags & EMAGGED) return FALSE use_power(50) - playsound(src, doorOpen, 45, TRUE) + playsound(src, doorOpen, 45, TRUE, ignore_walls = doorOpen) else //playsound(src, 'sound/machines/airlockforced.ogg', 30, TRUE) - Original - playsound(src, forcedOpen, 45, TRUE) //PARIAH STATION EDIT - aesthetics/airlock module + playsound(src, forcedOpen, 45, TRUE, ignore_walls = forcedOpen) //PARIAH STATION EDIT - aesthetics/airlock module if(autoclose) autoclose_in(normalspeed ? 8 SECONDS : 1.5 SECONDS) @@ -1205,10 +1205,10 @@ if(obj_flags & EMAGGED) return use_power(50) - playsound(src, doorClose, 30, TRUE) + playsound(src, doorClose, 30, TRUE, ignore_walls = doorClose) else - playsound(src, forcedClosed, 60, TRUE) + playsound(src, forcedClosed, 60, TRUE, ignore_walls = forcedClosed) var/obj/structure/window/killthis = (locate(/obj/structure/window) in get_turf(src)) if(killthis) @@ -1319,7 +1319,7 @@ var/time_to_open = 5 //half a second if(hasPower()) time_to_open = 5 SECONDS //Powered airlocks take longer to open, and are loud. - playsound(src, 'sound/machines/airlock_alien_prying.ogg', 100, TRUE) + playsound(src, 'sound/machines/airlock_alien_prying.ogg', 100, TRUE, ignore_walls = 'sound/machines/airlock_alien_prying.ogg') if(do_after(user, src, time_to_open)) diff --git a/code/game/machinery/doors/door.dm b/code/game/machinery/doors/door.dm index ff8034cedd29..08a78f20e1da 100644 --- a/code/game/machinery/doors/door.dm +++ b/code/game/machinery/doors/door.dm @@ -201,7 +201,7 @@ DEFINE_INTERACTABLE(/obj/machinery/door) if(!red_alert_access) return audible_message(span_notice("[src] whirr[p_s()] as [p_they()] automatically lift[p_s()] access requirements!")) - playsound(src, 'sound/machines/boltsup.ogg', 50, TRUE) + playsound(src, 'sound/machines/boltsup.ogg', 50, TRUE, ignore_walls = 'sound/machines/boltsup.ogg') /obj/machinery/door/proc/try_safety_unlock(mob/user) return FALSE @@ -391,9 +391,9 @@ DEFINE_INTERACTABLE(/obj/machinery/door) switch(damage_type) if(BRUTE) if(glass) - playsound(loc, 'sound/effects/glasshit.ogg', 90, TRUE) + playsound(loc, 'sound/effects/glasshit.ogg', 90, TRUE, ignore_walls = 'sound/effects/glasshit.ogg') else if(damage_amount) - playsound(loc, 'sound/weapons/smash.ogg', 50, TRUE) + playsound(loc, 'sound/weapons/smash.ogg', 50, TRUE, ignore_walls = 'sound/weapons/smash.ogg') else playsound(src, 'sound/weapons/tap.ogg', 50, TRUE) if(BURN) diff --git a/code/game/machinery/ecto_sniffer.dm b/code/game/machinery/ecto_sniffer.dm index c0131fdb57a6..46b284188046 100644 --- a/code/game/machinery/ecto_sniffer.dm +++ b/code/game/machinery/ecto_sniffer.dm @@ -32,7 +32,7 @@ /obj/machinery/ecto_sniffer/proc/activate(mob/activator) flick("ecto_sniffer_flick", src) - playsound(loc, 'sound/machines/ectoscope_beep.ogg', 75) + playsound(loc, 'sound/machines/ectoscope_beep.ogg', 75, ignore_walls = 'sound/machines/ectoscope_beep.ogg') use_power(active_power_usage) say("Reporting [pick(world.file2list("strings/spook_levels.txt"))] levels of paranormal activity!") if(activator?.ckey) diff --git a/code/game/machinery/harvester.dm b/code/game/machinery/harvester.dm index e3cb355d50e6..ceff34868ec5 100644 --- a/code/game/machinery/harvester.dm +++ b/code/game/machinery/harvester.dm @@ -105,7 +105,7 @@ update_appearance() if(!harvesting || state_open || !powered() || !occupant || !iscarbon(occupant)) return - playsound(src, 'sound/machines/juicer.ogg', 20, TRUE) + playsound(src, 'sound/machines/juicer.ogg', 20, TRUE, ignore_walls = 'sound/machines/juicer.ogg') var/mob/living/carbon/C = occupant if(!LAZYLEN(operation_order)) //The list is empty, so we're done here end_harvesting() diff --git a/code/game/machinery/porta_turret/portable_turret.dm b/code/game/machinery/porta_turret/portable_turret.dm index 3ff27dbfb677..c94f71debf03 100644 --- a/code/game/machinery/porta_turret/portable_turret.dm +++ b/code/game/machinery/porta_turret/portable_turret.dm @@ -616,11 +616,11 @@ DEFINE_BITFIELD(turret_flags, list( if(mode == TURRET_STUN) use_power(reqpower) A = new stun_projectile(T) - playsound(loc, stun_projectile_sound, 75, TRUE) + playsound(loc, stun_projectile_sound, 75, TRUE, ignore_walls = stun_projectile_sound) else use_power(reqpower * 2) A = new lethal_projectile(T) - playsound(loc, lethal_projectile_sound, 75, TRUE) + playsound(loc, lethal_projectile_sound, 75, TRUE, ignore_walls = lethal_projectile_sound) //Shooting Code: diff --git a/code/game/machinery/syndicatebomb.dm b/code/game/machinery/syndicatebomb.dm index 67f7c13a4bc1..b9b1f1a695dc 100644 --- a/code/game/machinery/syndicatebomb.dm +++ b/code/game/machinery/syndicatebomb.dm @@ -73,7 +73,7 @@ volume = 10 else volume = 5 - playsound(loc, beepsound, volume, FALSE) + playsound(loc, beepsound, volume, FALSE, ignore_walls = beepsound) next_beep = world.time + 10 if(active && ((detonation_timer <= world.time) || explode_now)) @@ -463,7 +463,7 @@ message_admins(adminlog) log_game(adminlog) - playsound(loc, 'sound/effects/bamf.ogg', 75, TRUE, 5) + playsound(loc, 'sound/effects/bamf.ogg', 75, TRUE, 5, ignore_walls = TRUE) /obj/item/bombcore/chemical/attackby(obj/item/I, mob/user, params) if(I.tool_behaviour == TOOL_CROWBAR && beakers.len > 0) diff --git a/code/game/objects/items.dm b/code/game/objects/items.dm index c31f9cdcd2ba..485686ba6cd5 100644 --- a/code/game/objects/items.dm +++ b/code/game/objects/items.dm @@ -780,7 +780,7 @@ DEFINE_INTERACTABLE(/obj/item) SEND_SIGNAL(src, COMSIG_ITEM_DROPPED, user) if(!silent) - playsound(src, drop_sound, DROP_SOUND_VOLUME, ignore_walls = FALSE) + playsound(src, drop_sound, DROP_SOUND_VOLUME) user?.update_equipment_speed_mods() user?.update_mouse_pointer() @@ -837,9 +837,9 @@ DEFINE_INTERACTABLE(/obj/item) item_flags |= IN_INVENTORY if(!initial) if(equip_sound && (slot_flags & slot)) - playsound(src, equip_sound, EQUIP_SOUND_VOLUME, TRUE, ignore_walls = FALSE) + playsound(src, equip_sound, EQUIP_SOUND_VOLUME, TRUE) else if(slot == ITEM_SLOT_HANDS) - playsound(src, pickup_sound, PICKUP_SOUND_VOLUME, ignore_walls = FALSE) + playsound(src, pickup_sound, PICKUP_SOUND_VOLUME) user.update_equipment_speed_mods() @@ -1027,16 +1027,16 @@ DEFINE_INTERACTABLE(/obj/item) var/volume = get_volume_by_throwforce_and_or_w_class() if (throwforce > 0) if (mob_throw_hit_sound) - playsound(hit_atom, mob_throw_hit_sound, volume, TRUE, -1) + playsound(hit_atom, mob_throw_hit_sound, volume, TRUE, -1, ignore_walls = mob_throw_hit_sound) else if(hitsound) - playsound(hit_atom, hitsound, volume, TRUE, -1) + playsound(hit_atom, hitsound, volume, TRUE, -1, ignore_walls = hitsound) else - playsound(hit_atom, 'sound/weapons/genhit.ogg',volume, TRUE, -1) + playsound(hit_atom, 'sound/weapons/genhit.ogg',volume, TRUE, -1, ignore_walls = 'sound/weapons/genhit.ogg') else playsound(hit_atom, 'sound/weapons/throwtap.ogg', 1, volume, -1) else - playsound(src, drop_sound, YEET_SOUND_VOLUME, ignore_walls = FALSE) + playsound(src, drop_sound, YEET_SOUND_VOLUME) return hit_atom.hitby(src, 0, itempush, throwingdatum=throwingdatum) /obj/item/throw_at(atom/target, range, speed, mob/thrower, spin=1, diagonals_first = 0, datum/callback/callback, force, gentle = FALSE, quickstart = TRUE) diff --git a/code/game/objects/items/chainsaw.dm b/code/game/objects/items/chainsaw.dm index 0517584108ec..8da8304ac257 100644 --- a/code/game/objects/items/chainsaw.dm +++ b/code/game/objects/items/chainsaw.dm @@ -33,13 +33,13 @@ /obj/item/chainsaw/suicide_act(mob/living/carbon/user) if(on) user.visible_message(span_suicide("[user] begins to tear [user.p_their()] head off with [src]! It looks like [user.p_theyre()] trying to commit suicide!")) - playsound(src, 'sound/weapons/chainsawhit.ogg', 100, TRUE) + playsound(src, 'sound/weapons/chainsawhit.ogg', 100, TRUE, ignore_walls = 'sound/weapons/chainsawhit.ogg') var/obj/item/bodypart/head/myhead = user.get_bodypart(BODY_ZONE_HEAD) if(myhead) myhead.dismember() else user.visible_message(span_suicide("[user] smashes [src] into [user.p_their()] neck, destroying [user.p_their()] esophagus! It looks like [user.p_theyre()] trying to commit suicide!")) - playsound(src, 'sound/weapons/genhit1.ogg', 100, TRUE) + playsound(src, 'sound/weapons/genhit1.ogg', 100, TRUE, ignore_walls = 'sound/weapons/genhit1.ogg') return(BRUTELOSS) /obj/item/chainsaw/attack_self(mob/user) diff --git a/code/game/objects/items/clown_items.dm b/code/game/objects/items/clown_items.dm index 628fcaf94a36..51344160e2a2 100644 --- a/code/game/objects/items/clown_items.dm +++ b/code/game/objects/items/clown_items.dm @@ -219,7 +219,7 @@ /obj/item/bikehorn/suicide_act(mob/user) user.visible_message(span_suicide("[user] solemnly points [src] at [user.p_their()] temple! It looks like [user.p_theyre()] trying to commit suicide!")) - playsound(src, 'sound/items/bikehorn.ogg', 50, TRUE) + playsound(src, 'sound/items/bikehorn.ogg', 50, TRUE, ignore_walls = 'sound/items/bikehorn.ogg') return (BRUTELOSS) //air horn diff --git a/code/game/objects/items/crab17.dm b/code/game/objects/items/crab17.dm index c643b41fbb91..873953d1bd03 100644 --- a/code/game/objects/items/crab17.dm +++ b/code/game/objects/items/crab17.dm @@ -242,6 +242,6 @@ /obj/effect/dumpeet_target/proc/endLaunch() QDEL_NULL(DF) //Delete the falling machine effect, because at this point its animation is over. We dont use temp_visual because we want to manually delete it as soon as the pod appears - playsound(src, SFX_EXPLOSION, 80, TRUE) + playsound(src, SFX_EXPLOSION, 80, TRUE, ignore_walls = TRUE) dump.forceMove(get_turf(src)) qdel(src) //The target's purpose is complete. It can rest easy now diff --git a/code/game/objects/items/defib.dm b/code/game/objects/items/defib.dm index b4ac01dbe0b3..b9b7ae5a460d 100644 --- a/code/game/objects/items/defib.dm +++ b/code/game/objects/items/defib.dm @@ -251,10 +251,10 @@ if(cell) if(cell.charge >= paddles.revivecost) visible_message(span_notice("[src] beeps: Unit ready.")) - playsound(src, 'sound/machines/defib_ready.ogg', 50, FALSE) + playsound(src, 'sound/machines/defib_ready.ogg', 50, FALSE, ignore_walls = 'sound/machines/defib_ready.ogg') else visible_message(span_notice("[src] beeps: Charge depleted.")) - playsound(src, 'sound/machines/defib_failed.ogg', 50, FALSE) + playsound(src, 'sound/machines/defib_failed.ogg', 50, FALSE, ignore_walls = 'sound/machines/defib_failed.ogg') paddles.cooldown = FALSE paddles.update_appearance() update_power() @@ -386,7 +386,7 @@ sleep(time) var/turf/T = get_turf(src) T.audible_message(span_notice("[src] beeps: Unit is recharged.")) - playsound(src, 'sound/machines/defib_ready.ogg', 50, FALSE) + playsound(src, 'sound/machines/defib_ready.ogg', 50, FALSE, ignore_walls = 'sound/machines/defib_ready.ogg') cooldown = FALSE update_appearance() @@ -405,7 +405,7 @@ user.visible_message(span_danger("[user] is putting the live paddles on [user.p_their()] chest! It looks like [user.p_theyre()] trying to commit suicide!")) if(req_defib) defib.deductcharge(revivecost) - playsound(src, 'sound/machines/defib_zap.ogg', 50, TRUE, -1) + playsound(src, 'sound/machines/defib_zap.ogg', 50, TRUE, -1, ignore_walls = 'sound/machines/defib_zap.ogg') return (OXYLOSS) /obj/item/shockpaddles/update_icon_state() @@ -437,7 +437,7 @@ defib?.update_power() if(req_defib && !defib.powered) user.visible_message(span_warning("[defib] beeps: Not enough charge!")) - playsound(src, 'sound/machines/defib_failed.ogg', 50, FALSE) + playsound(src, 'sound/machines/defib_failed.ogg', 50, FALSE, ignore_walls = 'sound/machines/defib_failed.ogg') return if(!wielded) if(iscyborg(user)) @@ -484,6 +484,10 @@ if(busy) busy = FALSE + spawn(1.2 SECONDS) + if(!QDELETED(src)) + playsound(src, 'sound/machines/defib_success.ogg', 50, FALSE, -1, ignore_walls = 'sound/machines/defib_success.ogg') + update_appearance() if(req_defib) defib.deductcharge(revivecost) @@ -515,7 +519,7 @@ M.Knockdown(75) M.set_timed_status_effect(100 SECONDS, /datum/status_effect/jitter, only_if_higher = TRUE) M.apply_status_effect(/datum/status_effect/convulsing) - playsound(src, 'sound/machines/defib_zap.ogg', 50, TRUE, -1) + playsound(src, 'sound/machines/defib_zap.ogg', 50, TRUE, -1, ignore_walls = 'sound/machines/defib_zap.ogg') if(HAS_TRAIT(M,MOB_ORGANIC)) M.emote("gasp") log_combat(user, M, "zapped", src) @@ -532,7 +536,7 @@ user.visible_message(span_notice("[user] places [src] on [H]'s chest."), span_warning("You place [src] on [H]'s chest and begin to charge them.")) var/turf/T = get_turf(defib) - playsound(src, 'sound/machines/defib_charge.ogg', 50, FALSE) + playsound(src, 'sound/machines/defib_charge.ogg', 75, FALSE, ignore_walls = 'sound/machines/defib_charge.ogg') if(req_defib) T.audible_message(span_warning("\The [defib] lets out an urgent beep and lets out a steadily rising hum...")) else @@ -543,12 +547,12 @@ return if(H && H.stat == DEAD) to_chat(user, span_warning("[H] is dead.")) - playsound(src, 'sound/machines/defib_failed.ogg', 50, FALSE) + playsound(src, 'sound/machines/defib_failed.ogg', 50, FALSE, ignore_walls = 'sound/machines/defib_failed.ogg') do_cancel() return user.visible_message(span_boldannounce("[user] shocks [H] with \the [src]!"), span_warning("You shock [H] with \the [src]!")) - playsound(src, 'sound/machines/defib_zap.ogg', 100, TRUE, -1) - playsound(src, 'sound/weapons/egloves.ogg', 100, TRUE, -1) + playsound(src, 'sound/machines/defib_zap.ogg', 100, TRUE, -1, ignore_walls = 'sound/machines/defib_zap.ogg') + playsound(src, 'sound/weapons/egloves.ogg', 100, TRUE, -1, ignore_walls = 'sound/weapons/egloves.ogg') H.emote("scream") shock_pulling(45, H) if(H.set_heartattack(TRUE)) @@ -574,14 +578,14 @@ return user.visible_message(span_notice("[user] places [src] on [H]'s chest."), span_warning("You place [src] on [H]'s chest.")) - playsound(src, 'sound/machines/defib_charge.ogg', 75, FALSE) + playsound(src, 'sound/machines/defib_charge.ogg', 75, FALSE, ignore_walls = 'sound/machines/defib_charge.ogg') // Check to see if the patient's chest is covered or we don't care. if((!combat && !req_defib) || (req_defib && !defib.combat)) for(var/obj/item/clothing/C in H.get_equipped_items()) if((C.body_parts_covered & CHEST) && (C.clothing_flags & THICKMATERIAL)) //check to see if something is obscuring their chest. user.audible_message(span_warning("[req_defib ? "[defib]" : "[src]"] buzzes: Patient's chest is obscured. Operation aborted.")) - playsound(src, 'sound/machines/defib_failed.ogg', 50, FALSE) + playsound(src, 'sound/machines/defib_failed.ogg', 50, FALSE, ignore_walls = 'sound/machines/defib_failed.ogg') do_cancel() return @@ -599,14 +603,14 @@ // Do they even have a heart? if (!heart) user.audible_message(span_warning("[req_defib ? "[defib]" : "[src]"] buzzes: Resuscitation failed - Patient's heart is missing. Operation aborted.")) - playsound(src, 'sound/machines/defib_failed.ogg', 50, FALSE) + playsound(src, 'sound/machines/defib_failed.ogg', 50, FALSE, ignore_walls = 'sound/machines/defib_failed.ogg') do_cancel() return // At this point a shock has occured. H.visible_message(span_warning("[H]'s body convulses a bit.")) playsound(src, SFX_BODYFALL, 50, TRUE) - playsound(src, 'sound/machines/defib_zap.ogg', 75, TRUE, -1) + playsound(src, 'sound/machines/defib_zap.ogg', 75, TRUE, -1, ignore_walls = 'sound/machines/defib_zap.ogg') shock_pulling(30, H) H.apply_damage(5, BURN, BODY_ZONE_CHEST) do_success() //Deduct charge @@ -616,7 +620,7 @@ if(H.stat == DEAD) shock_pulling(30, H) user.audible_message(span_warning("[req_defib ? "[defib]" : "[src]"] pings: Resuscitation failed - Severe neurological decay makes recovery of patient impossible. Further attempts futile.")) - playsound(src, 'sound/machines/defib_failed.ogg', 50, FALSE) + playsound(src, 'sound/machines/defib_failed.ogg', 50, FALSE, ignore_walls = 'sound/machines/defib_failed.ogg') return user.audible_message(span_notice("[req_defib ? "[defib]" : "[src]"] pings: Resuscitation successful.")) diff --git a/code/game/objects/items/devices/megaphone.dm b/code/game/objects/items/devices/megaphone.dm index d761f4f9b237..daa56797a611 100644 --- a/code/game/objects/items/devices/megaphone.dm +++ b/code/game/objects/items/devices/megaphone.dm @@ -38,7 +38,7 @@ if(spamcheck > world.time) to_chat(user, span_warning("\The [src] needs to recharge!")) else - playsound(loc, megaphone_sound, 100, FALSE, TRUE) + playsound(loc, megaphone_sound, 100, FALSE, TRUE, ignore_walls = megaphone_sound) spamcheck = world.time + 50 speech_args[SPEECH_SPANS] |= voicespan diff --git a/code/game/objects/items/door_seal.dm b/code/game/objects/items/door_seal.dm index 6d10ee89d9e4..d3f48b850f78 100644 --- a/code/game/objects/items/door_seal.dm +++ b/code/game/objects/items/door_seal.dm @@ -21,6 +21,6 @@ /obj/item/door_seal/suicide_act(mob/user) user.visible_message(span_suicide("[user] is sealing [user.p_them()]self off from the world with [src]! It looks like [user.p_theyre()] trying to commit suicide!")) - playsound(src, 'sound/items/jaws_pry.ogg', 30, TRUE) + playsound(src, 'sound/items/jaws_pry.ogg', 30, TRUE, ignore_walls = 'sound/items/jaws_pry.ogg') return(BRUTELOSS) diff --git a/code/game/objects/items/food/burgers.dm b/code/game/objects/items/food/burgers.dm index 83fe5522fbe7..cad5390beb36 100644 --- a/code/game/objects/items/food/burgers.dm +++ b/code/game/objects/items/food/burgers.dm @@ -157,7 +157,7 @@ var/obj/machinery/light/light = locate(/obj/machinery/light) in view(4, src) light?.flicker() if(62 to 64) - playsound(loc, pick('sound/hallucinations/i_see_you1.ogg', 'sound/hallucinations/i_see_you2.ogg'), 50, TRUE, ignore_walls = FALSE) + playsound(loc, pick('sound/hallucinations/i_see_you1.ogg', 'sound/hallucinations/i_see_you2.ogg'), 50, TRUE) if(61) visible_message("[src] spews out a glob of ectoplasm!") new /obj/effect/decal/cleanable/greenglow/ecto(loc) diff --git a/code/game/objects/items/granters/martial_arts/cqc.dm b/code/game/objects/items/granters/martial_arts/cqc.dm index 697541e02162..49cac51149cc 100644 --- a/code/game/objects/items/granters/martial_arts/cqc.dm +++ b/code/game/objects/items/granters/martial_arts/cqc.dm @@ -22,7 +22,7 @@ /obj/item/book/granter/martial/cqc/recoil(mob/living/user) to_chat(user, span_warning("[src] explodes!")) - playsound(src,'sound/effects/explosion1.ogg',40,TRUE) + playsound(src,'sound/effects/explosion1.ogg',40,TRUE, ignore_walls = TRUE) user.flash_act(1, 1) user.adjustBruteLoss(6) user.adjustFireLoss(6) diff --git a/code/game/objects/items/grenades/flashbang.dm b/code/game/objects/items/grenades/flashbang.dm index 009903c097b8..2cc51a7423b4 100644 --- a/code/game/objects/items/grenades/flashbang.dm +++ b/code/game/objects/items/grenades/flashbang.dm @@ -16,7 +16,7 @@ if(!flashbang_turf) return do_sparks(rand(5, 9), FALSE, src) - playsound(flashbang_turf, 'sound/weapons/flashbang.ogg', 100, TRUE, 8, 0.9) + playsound(flashbang_turf, 'sound/weapons/flashbang.ogg', 100, TRUE, 8, 0.9, ignore_walls = 'sound/weapons/flashbang.ogg') new /obj/effect/dummy/lighting_obj (flashbang_turf, flashbang_range + 2, 4, COLOR_WHITE, 2) for(var/mob/living/living_mob in get_hearers_in_view(flashbang_range, flashbang_turf)) bang(get_turf(living_mob), living_mob) diff --git a/code/game/objects/items/grenades/hypno.dm b/code/game/objects/items/grenades/hypno.dm index 36512b92ba28..aa0d7cc8e42c 100644 --- a/code/game/objects/items/grenades/hypno.dm +++ b/code/game/objects/items/grenades/hypno.dm @@ -17,7 +17,7 @@ if(!flashbang_turf) return do_sparks(rand(5, 9), FALSE, src) - playsound(flashbang_turf, 'sound/effects/screech.ogg', 100, TRUE, 8, 0.9) + playsound(flashbang_turf, 'sound/effects/screech.ogg', 100, TRUE, 8, 0.9, ignore_walls = 'sound/effects/screech.ogg') new /obj/effect/dummy/lighting_obj (flashbang_turf, flashbang_range + 2, 4, LIGHT_COLOR_PURPLE, 2) for(var/mob/living/living_mob in get_hearers_in_view(flashbang_range, flashbang_turf)) bang(get_turf(living_mob), living_mob) diff --git a/code/game/objects/items/his_grace.dm b/code/game/objects/items/his_grace.dm index 430fe93474af..2c9b9ec9424b 100644 --- a/code/game/objects/items/his_grace.dm +++ b/code/game/objects/items/his_grace.dm @@ -112,7 +112,7 @@ REMOVE_TRAIT(src, TRAIT_NODROP, HIS_GRACE_TRAIT) master.Paralyze(60) master.adjustBruteLoss(master.maxHealth) - playsound(master, 'sound/effects/splat.ogg', 100, FALSE) + playsound(master, 'sound/effects/splat.ogg', 100, FALSE, ignore_walls = 'sound/effects/splat.ogg') else master.apply_status_effect(/datum/status_effect/his_grace) return @@ -137,8 +137,8 @@ if(!L.stat) L.visible_message(span_warning("[src] lunges at [L]!"), "[src] lunges at you!") do_attack_animation(L, null, src) - playsound(L, 'sound/weapons/smash.ogg', 50, TRUE) - playsound(L, 'sound/misc/desecration-01.ogg', 50, TRUE) + playsound(L, 'sound/weapons/smash.ogg', 50, TRUE, ignore_walls = 'sound/weapons/smash.ogg') + playsound(L, 'sound/misc/desecration-01.ogg', 50, TRUE, ignore_walls = 'sound/misc/desecration-01.ogg') L.adjustBruteLoss(force) adjust_bloodthirst(-5) //Don't stop attacking they're right there! else @@ -154,7 +154,7 @@ gender = MALE adjust_bloodthirst(1) force_bonus = HIS_GRACE_FORCE_BONUS * LAZYLEN(contents) - playsound(user, 'sound/effects/pope_entry.ogg', 100) + playsound(user, 'sound/effects/pope_entry.ogg', 100, ignore_walls = 'sound/effects/pope_entry.ogg') update_appearance() move_gracefully() @@ -202,8 +202,8 @@ var/victims = 0 meal.visible_message(span_warning("[src] swings open and devours [meal]!"), "[src] consumes you!") meal.adjustBruteLoss(200) - playsound(meal, 'sound/misc/desecration-02.ogg', 75, TRUE) - playsound(src, 'sound/items/eatfood.ogg', 100, TRUE) + playsound(meal, 'sound/misc/desecration-02.ogg', 75, TRUE, ignore_walls = 'sound/misc/desecration-02.ogg') + playsound(src, 'sound/items/eatfood.ogg', 100, TRUE, ignore_walls = 'sound/items/eatfood.ogg') meal.forceMove(src) force_bonus += HIS_GRACE_FORCE_BONUS prev_bloodthirst = bloodthirst @@ -272,7 +272,7 @@ desc = "A legendary toolbox and a distant artifact from The Age of Three Powers. On its three latches engraved are the words \"The Sun\", \"The Moon\", and \"The Stars\". The entire toolbox has the words \"The World\" engraved into its sides." ascended = TRUE update_appearance() - playsound(src, 'sound/effects/his_grace_ascend.ogg', 100) + playsound(src, 'sound/effects/his_grace_ascend.ogg', 100, ignore_walls = 'sound/effects/his_grace_ascend.ogg') if(istype(master)) master.update_held_items() master.visible_message("Gods will be watching.") diff --git a/code/game/objects/items/melee/energy.dm b/code/game/objects/items/melee/energy.dm index f564eab2358f..f90e0836a566 100644 --- a/code/game/objects/items/melee/energy.dm +++ b/code/game/objects/items/melee/energy.dm @@ -87,8 +87,12 @@ var/mob/living/carbon/carbon_user = user if(carbon_user.wear_mask) in_mouth = ", barely missing [carbon_user.p_their()] nose" + + . = span_warning("[user] swings [user.p_their()] [name][in_mouth]. [user.p_they(TRUE)] light[user.p_s()] [user.p_their()] [atom.name] in the process.") - playsound(loc, get_hitsound(), get_clamped_volume(), TRUE, -1) + + var/sound_played = get_hitsound() + playsound(loc, get_hitsound(), get_clamped_volume(), TRUE, -1, ignore_walls = sound_played) add_fingerprint(user) /* @@ -120,7 +124,8 @@ heat = initial(heat) STOP_PROCESSING(SSobj, src) - playsound(user ? user : src, active ? 'sound/weapons/saberon.ogg' : 'sound/weapons/saberoff.ogg', 35, TRUE) + var/sound_played = active ? 'sound/weapons/saberon.ogg' : 'sound/weapons/saberoff.ogg' + playsound(user ? user : src, sound_played, 35, TRUE, ignore_walls = sound_played) set_light_on(active) return COMPONENT_NO_DEFAULT_MESSAGE diff --git a/code/game/objects/items/melee/misc.dm b/code/game/objects/items/melee/misc.dm index cd148bbb1bb4..fc13ad2b05bc 100644 --- a/code/game/objects/items/melee/misc.dm +++ b/code/game/objects/items/melee/misc.dm @@ -265,7 +265,7 @@ var/turf/newT = turf.ScrapeAway(flags = CHANGETURF_INHERIT_AIR) if(newT.type == oldtype) return - playsound(turf, 'sound/effects/supermatter.ogg', 50, TRUE) + playsound(turf, 'sound/effects/supermatter.ogg', 50, TRUE, ignore_walls = TRUE) turf.visible_message( span_danger("[turf] smacks into [src] and rapidly flashes to ash."), span_hear("You hear a loud crack as you are washed with a wave of heat."), diff --git a/code/game/objects/items/pneumaticCannon.dm b/code/game/objects/items/pneumaticCannon.dm index de61a2f3e5af..6c4e47213794 100644 --- a/code/game/objects/items/pneumaticCannon.dm +++ b/code/game/objects/items/pneumaticCannon.dm @@ -190,7 +190,7 @@ span_danger("You fire \the [src]!")) log_combat(user, target, "fired at", src) var/turf/T = get_target(target, get_turf(src)) - playsound(src, fire_sound, 50, TRUE) + playsound(src, fire_sound, 50, TRUE, ignore_walls = fire_sound) fire_items(T, user) if(pressureSetting >= 3 && iscarbon(user)) var/mob/living/carbon/C = user diff --git a/code/game/objects/items/powerfist.dm b/code/game/objects/items/powerfist.dm index 3085ee223e99..a5d53e6fb7bd 100644 --- a/code/game/objects/items/powerfist.dm +++ b/code/game/objects/items/powerfist.dm @@ -88,7 +88,7 @@ if(!gasused) to_chat(user, span_warning("\The [src]'s tank is empty!")) target.apply_damage((force / 5), BRUTE) - playsound(loc, SFX_PUNCH, 50, TRUE) + playsound(loc, SFX_PUNCH, 50, TRUE, ignore_walls = SFX_PUNCH) target.visible_message(span_danger("[user]'s powerfist lets out a dull thunk as [user.p_they()] punch[user.p_es()] [target.name]!"), \ span_userdanger("[user]'s punches you!")) return diff --git a/code/game/objects/items/shields.dm b/code/game/objects/items/shields.dm index 330d4e0ce9ec..e24d1fe58ed6 100644 --- a/code/game/objects/items/shields.dm +++ b/code/game/objects/items/shields.dm @@ -48,7 +48,7 @@ if(istype(W, /obj/item/melee/baton)) if(cooldown < world.time - 25) user.visible_message(span_warning("[user] bashes [src] with [W]!")) - playsound(user.loc, 'sound/effects/shieldbash.ogg', 50, TRUE) + playsound(user.loc, 'sound/effects/shieldbash.ogg', 50, TRUE, ignore_walls = 'sound/effects/shieldbash.ogg') cooldown = world.time else if(istype(W, /obj/item/stack/sheet/mineral/titanium)) if (atom_integrity >= max_integrity) @@ -73,7 +73,7 @@ . += span_warning("It's falling apart!") /obj/item/shield/riot/proc/shatter(mob/living/carbon/human/owner) - playsound(owner, 'sound/effects/glassbr3.ogg', 100) + playsound(owner, 'sound/effects/glassbr3.ogg', 100, ignore_walls = 'sound/effects/glassbr3.ogg') new /obj/item/shard((get_turf(src))) /obj/item/shield/riot/on_shield_block(mob/living/carbon/human/owner, atom/movable/hitby, attack_text = "the attack", damage = 0, attack_type = MELEE_ATTACK) @@ -104,7 +104,7 @@ max_integrity = 30 /obj/item/shield/riot/roman/shatter(mob/living/carbon/human/owner) - playsound(owner, 'sound/effects/grillehit.ogg', 100) + playsound(owner, 'sound/effects/grillehit.ogg', 100, ignore_walls = 'sound/effects/grillehit.ogg') new /obj/item/stack/sheet/iron(get_turf(src)) /obj/item/shield/riot/buckler @@ -122,7 +122,7 @@ w_class = WEIGHT_CLASS_NORMAL /obj/item/shield/riot/buckler/shatter(mob/living/carbon/human/owner) - playsound(owner, 'sound/effects/bang.ogg', 50) + playsound(owner, 'sound/effects/bang.ogg', 50, ignore_walls = 'sound/effects/bang.ogg') new /obj/item/stack/sheet/mineral/wood(get_turf(src)) /obj/item/shield/riot/flash @@ -238,7 +238,8 @@ enabled = active balloon_alert(user, "[active ? "activated":"deactivated"]") - playsound(user ? user : src, active ? 'sound/weapons/saberon.ogg' : 'sound/weapons/saberoff.ogg', 35, TRUE) + var/sound_played = active ? 'sound/weapons/saberon.ogg' : 'sound/weapons/saberoff.ogg' + playsound(user ? user : src, sound_played, 35, TRUE, ignore_walls = sound_played) return COMPONENT_NO_DEFAULT_MESSAGE /obj/item/shield/riot/tele diff --git a/code/game/objects/items/shooting_range.dm b/code/game/objects/items/shooting_range.dm index 39ffdd85b252..e06e364387f4 100644 --- a/code/game/objects/items/shooting_range.dm +++ b/code/game/objects/items/shooting_range.dm @@ -40,7 +40,7 @@ /obj/item/target/clown/bullet_act(obj/projectile/P) . = ..() - playsound(src.loc, 'sound/items/bikehorn.ogg', 50, TRUE) + playsound(src.loc, 'sound/items/bikehorn.ogg', 50, TRUE, ignore_walls = 'sound/items/bikehorn.ogg') /obj/item/target/bullet_act(obj/projectile/P) if(istype(P, /obj/projectile/bullet/reusable)) // If it's a foam dart, don't bother with any of this other shit diff --git a/code/game/objects/items/storage/book.dm b/code/game/objects/items/storage/book.dm index c2d8783cd49b..566a3bca54ea 100644 --- a/code/game/objects/items/storage/book.dm +++ b/code/game/objects/items/storage/book.dm @@ -145,7 +145,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "burning", H.visible_message(span_notice("[user] heals [H] with the power of [deity_name]!")) to_chat(H, span_boldnotice("May the power of [deity_name] compel you to be healed!")) - playsound(src.loc, SFX_PUNCH, 25, TRUE, -1) + playsound(src.loc, SFX_PUNCH, 25, TRUE, -1, ignore_walls = SFX_PUNCH) return TRUE /obj/item/storage/book/bible/attack(mob/living/M, mob/living/carbon/human/user, heal_mode = TRUE) @@ -170,7 +170,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "burning", if (M.stat == DEAD) M.visible_message(span_danger("[user] smacks [M]'s lifeless corpse with [src].")) - playsound(src.loc, SFX_PUNCH, 25, TRUE, -1) + playsound(src.loc, SFX_PUNCH, 25, TRUE, -1, ignore_walls = SFX_PUNCH) return if(user == M) @@ -190,7 +190,7 @@ GLOBAL_LIST_INIT(bibleitemstates, list("bible", "koran", "scrapbook", "burning", if(smack) M.visible_message(span_danger("[user] beats [M] over the head with [src]!"), \ span_userdanger("[user] beats [M] over the head with [src]!")) - playsound(src.loc, SFX_PUNCH, 25, TRUE, -1) + playsound(src.loc, SFX_PUNCH, 25, TRUE, -1, ignore_walls = SFX_PUNCH) log_combat(user, M, "attacked", src) /obj/item/storage/book/bible/afterattack(atom/bible_smacked, mob/user, proximity) diff --git a/code/game/objects/items/theft_tools.dm b/code/game/objects/items/theft_tools.dm index 5a286cd37ca8..2453b0575da2 100644 --- a/code/game/objects/items/theft_tools.dm +++ b/code/game/objects/items/theft_tools.dm @@ -188,7 +188,7 @@ else to_chat(user, span_notice("As it touches \the [src], both \the [src] and \the [W] burst into dust!")) radiation_pulse(user, max_range = 2, threshold = RAD_EXTREME_INSULATION, chance = 40) - playsound(src, 'sound/effects/supermatter.ogg', 50, TRUE) + playsound(src, 'sound/effects/supermatter.ogg', 50, TRUE, ignore_walls = TRUE) qdel(W) qdel(src) @@ -211,7 +211,7 @@ span_hear("Everything suddenly goes silent.")) victim.dust() radiation_pulse(src, max_range = 2, threshold = RAD_EXTREME_INSULATION, chance = 40) - playsound(src, 'sound/effects/supermatter.ogg', 50, TRUE) + playsound(src, 'sound/effects/supermatter.ogg', 50, TRUE, ignore_walls = TRUE) qdel(src) /obj/item/nuke_core/supermatter_sliver/pickup(mob/living/user) @@ -222,7 +222,7 @@ span_userdanger("You reach for [src] with your hands. That was dumb."),\ span_hear("Everything suddenly goes silent.")) radiation_pulse(user, max_range = 2, threshold = RAD_EXTREME_INSULATION, chance = 40) - playsound(src, 'sound/effects/supermatter.ogg', 50, TRUE) + playsound(src, 'sound/effects/supermatter.ogg', 50, TRUE, ignore_walls = TRUE) user.dust() /obj/item/nuke_core_container/supermatter @@ -333,6 +333,6 @@ span_hear("Everything suddenly goes silent.")) user.dust() radiation_pulse(src, max_range = 2, threshold = RAD_EXTREME_INSULATION, chance = 40) - playsound(src, 'sound/effects/supermatter.ogg', 50, TRUE) + playsound(src, 'sound/effects/supermatter.ogg', 50, TRUE, ignore_walls = TRUE) QDEL_NULL(sliver) update_appearance() diff --git a/code/game/objects/items/tools/wrench.dm b/code/game/objects/items/tools/wrench.dm index da1f5380f18b..c444d8b6fc90 100644 --- a/code/game/objects/items/tools/wrench.dm +++ b/code/game/objects/items/tools/wrench.dm @@ -29,7 +29,7 @@ /obj/item/wrench/suicide_act(mob/user) user.visible_message(span_suicide("[user] is beating [user.p_them()]self to death with [src]! It looks like [user.p_theyre()] trying to commit suicide!")) - playsound(loc, 'sound/weapons/genhit.ogg', 50, TRUE, -1) + playsound(loc, 'sound/weapons/genhit.ogg', 50, TRUE, -1, ignore_walls = 'sound/weapons/genhit.ogg') return (BRUTELOSS) /obj/item/wrench/abductor @@ -121,5 +121,6 @@ toolspeed = initial(toolspeed) balloon_alert(user, "[name] [active ? "active, woe!":"restrained"]") - playsound(user ? user : src, active ? 'sound/weapons/saberon.ogg' : 'sound/weapons/saberoff.ogg', 5, TRUE) + var/sound_played = active ? 'sound/weapons/saberon.ogg' : 'sound/weapons/saberoff.ogg' + playsound(user ? user : src, sound_played, 5, TRUE, ignore_walls = sound_played) return COMPONENT_NO_DEFAULT_MESSAGE diff --git a/code/game/objects/items/toys.dm b/code/game/objects/items/toys.dm index f2a198164a38..44d72e826bc1 100644 --- a/code/game/objects/items/toys.dm +++ b/code/game/objects/items/toys.dm @@ -396,7 +396,8 @@ icon_state = "[icon_state]_[saber_color]" balloon_alert(user, "[active ? "flicked out":"pushed in"] [src]") - playsound(user ? user : src, active ? 'sound/weapons/saberon.ogg' : 'sound/weapons/saberoff.ogg', 20, TRUE) + var/sound_played = active ? 'sound/weapons/saberon.ogg' : 'sound/weapons/saberoff.ogg' + playsound(user ? user : src, sound_played, 20, TRUE, ignore_walls = sound_played) return COMPONENT_NO_DEFAULT_MESSAGE // Copied from /obj/item/melee/energy/sword/attackby @@ -1544,16 +1545,16 @@ GLOBAL_LIST_EMPTY(intento_players) to_chat(user, span_notice("You flip \the [src].")) flick("groan_tube_flip", src) if(flipped) - playsound(loc, groan_sounds[GROAN_AAAU], 50, FALSE, 3) + playsound(loc, groan_sounds[GROAN_AAAU], 50, FALSE, 3, ignore_walls = groan_sounds[GROAN_AAAU]) say("AAAUUU") else - playsound(loc, groan_sounds[GROAN_UUUA], 50, FALSE, 3) + playsound(loc, groan_sounds[GROAN_UUUA], 50, FALSE, 3, ignore_walls = groan_sounds[GROAN_UUUA]) say("UUAAAA") flipped = !flipped COOLDOWN_START(src, groan_cooldown, cooldown_time) return - ..() + return ..() #undef GROAN_AAAU #undef GROAN_UUUA diff --git a/code/game/objects/items/weaponry.dm b/code/game/objects/items/weaponry.dm index e89f377cfaf4..df217c7b76c3 100644 --- a/code/game/objects/items/weaponry.dm +++ b/code/game/objects/items/weaponry.dm @@ -32,7 +32,7 @@ for further reading, please see: https://github.com/tgstation/tgstation/pull/301 M.visible_message(span_danger("[user] are stroking the head of [M] with a bangammer."), span_userdanger("[user] are stroking your head with a bangammer."), span_hear("You hear a bangammer stroking a head.")) // see above comment else M.visible_message(span_danger("[M] has been banned FOR NO REISIN by [user]!"), span_userdanger("You have been banned FOR NO REISIN by [user]!"), span_hear("You hear a banhammer banning someone.")) - playsound(loc, 'sound/effects/adminhelp.ogg', 15) //keep it at 15% volume so people don't jump out of their skin too much + playsound(loc, 'sound/effects/adminhelp.ogg', 15, FALSE, ignore_walls = 'sound/effects/adminhelp.ogg') //keep it at 15% volume so people don't jump out of their skin too much if(user.combat_mode) return ..(M, user) diff --git a/code/game/objects/obj_defense.dm b/code/game/objects/obj_defense.dm index 5631f85f0303..b15ddfab95f4 100644 --- a/code/game/objects/obj_defense.dm +++ b/code/game/objects/obj_defense.dm @@ -23,7 +23,7 @@ /obj/bullet_act(obj/projectile/P) . = ..() - playsound(src, P.hitsound, 50, TRUE) + playsound(src, P.hitsound, 50, TRUE, ignore_walls = P.hitsound) var/damage if(!QDELETED(src)) //Bullet on_hit effect might have already destroyed this object damage = take_damage(P.damage, P.damage_type, P.armor_flag, 0, turn(P.dir, 180), P.armor_penetration) diff --git a/code/game/objects/sound_test.dm b/code/game/objects/sound_test.dm new file mode 100644 index 000000000000..3f635c470a98 --- /dev/null +++ b/code/game/objects/sound_test.dm @@ -0,0 +1,49 @@ +// Sound testing object. Plays a sound repeatedly +/obj/sound_test + name = "test" + + var/time = 3 SECONDS + var/sound_vol = 50 + var/sound_file = 'sound/weapons/gun/pistol/shot.ogg' + +/obj/sound_test/Initialize(mapload) + . = ..() + addtimer(CALLBACK(src, PROC_REF(test)), time, TIMER_LOOP) + +/obj/sound_test/proc/test() + set waitfor = FALSE + playsound(src, sound_file, sound_vol, FALSE, ignore_walls = sound_file) + +/obj/sound_test/defib + time = 6 SECONDS + +/obj/sound_test/defib/test() + playsound(src, 'sound/machines/defib_charge.ogg', 75, FALSE, ignore_walls = 'sound/machines/defib_charge.ogg') + sleep(2 SECONDS) + playsound(src, SFX_BODYFALL, 50, FALSE, ignore_walls = SFX_BODYFALL) + playsound(src, 'sound/machines/defib_zap.ogg', 75, FALSE, -1, ignore_walls = 'sound/machines/defib_zap.ogg') + sleep(1.2 SECONDS) + playsound(src, 'sound/machines/defib_success.ogg', 50, FALSE, -1, ignore_walls = 'sound/machines/defib_success.ogg') + +/obj/sound_test/pistol + time = 3 SECONDS + sound_vol = 50 + sound_file = 'sound/weapons/gun/pistol/shot.ogg' + +/obj/sound_test/pistol/test() + playsound(src, sound_file, sound_vol, FALSE, falloff_exponent = 1.5, falloff_distance = 7, ignore_walls = sound_file) + +/obj/sound_test/punch + +/obj/sound_test/punch/test() + playsound(src, SFX_PUNCH, 25, FALSE, -1, ignore_walls = SFX_PUNCH) + +/obj/sound_test/femalescream + sound_file = 'sound/voice/human/femalescream_2.ogg' + sound_vol = 50 + time = 5 SECONDS + +/obj/sound_test/flashbang + sound_file = 'sound/weapons/flashbang.ogg' + sound_vol = 100 + time = 5 SECONDS diff --git a/code/game/objects/structures/cannons/cannon.dm b/code/game/objects/structures/cannons/cannon.dm index a42cc2b0c39d..78634a5e71bb 100644 --- a/code/game/objects/structures/cannons/cannon.dm +++ b/code/game/objects/structures/cannons/cannon.dm @@ -33,7 +33,7 @@ if(shaken_mob.stat == CONSCIOUS) shake_camera(shaken_mob, 3, 1) - playsound(src, fire_sound, 50, TRUE) + playsound(src, fire_sound, 50, TRUE, ignore_walls = fire_sound) flick(icon_state+"_fire", src) if(loaded_cannonball) var/obj/projectile/fired_projectile = new loaded_cannonball.projectile_type(get_turf(src)) diff --git a/code/game/objects/structures/gym.dm b/code/game/objects/structures/gym.dm index d40dde8c9e7b..2bbd60de3ca4 100644 --- a/code/game/objects/structures/gym.dm +++ b/code/game/objects/structures/gym.dm @@ -17,7 +17,8 @@ if(.) return flick("[icon_state]-punch", src) - playsound(loc, pick(hit_sounds), 25, TRUE, -1) + var/sound_played = pick(hit_sounds) + playsound(loc, sound_played, 25, TRUE, -1, ignore_walls = sound_played) if(isliving(user)) var/mob/living/L = user L.apply_status_effect(/datum/status_effect/exercised) diff --git a/code/game/sound.dm b/code/game/sound.dm index 3700a684a147..f17823ca2b66 100644 --- a/code/game/sound.dm +++ b/code/game/sound.dm @@ -35,10 +35,10 @@ * 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. + * ignore_walls - Whether or not the sound can pass through walls. If passed a sound, it will play to anyone who would not normally hear the sound due to LOS. * 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) +/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 = FALSE, falloff_distance = SOUND_DEFAULT_FALLOFF_DISTANCE, use_reverb = TRUE) if(isarea(source)) CRASH("playsound(): source is an area") if(isnull(vol)) @@ -55,14 +55,22 @@ 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() + // Listeners that are hearing through a wall or out of view. They will hear a much quieter sound. + var/list/partial_listeners + var/partial_sound + + if(!isnum(ignore_walls)) + partial_sound = sound(get_sfx(ignore_walls)) + . = list()//output everything that successfully heard the sound var/turf/above_turf = GetAbove(turf_source) var/turf/below_turf = GetBelow(turf_source) - if(ignore_walls) + if(ignore_walls == TRUE) if(above_turf && istransparentturf(above_turf)) listeners += SSmobs.clients_by_zlevel[above_turf.z] @@ -79,12 +87,51 @@ if(below_turf && istransparentturf(turf_source)) listeners += get_hearers_in_view(maxdistance, below_turf) + // If we have a partial sound to play, generate the list of partial listeners. + if(partial_sound) + partial_listeners = SSmobs.clients_by_zlevel[source_z].Copy() + + if(above_turf && istransparentturf(above_turf)) + partial_listeners += SSmobs.clients_by_zlevel[above_turf.z] + + if(below_turf && istransparentturf(turf_source)) + partial_listeners += SSmobs.clients_by_zlevel[below_turf.z] + + partial_listeners -= listeners + partial_listeners -= SSmobs.dead_players_by_zlevel[source_z] + 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 - -/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, wait = FALSE) + if(listening_mob.playsound_local(turf_source, soundin, vol, vary, frequency, falloff_exponent, channel, pressure_affected, S, maxdistance, falloff_distance, 1, use_reverb)) + . += listening_mob + + if(partial_listeners) + for(var/mob/listening_mob in partial_listeners) + var/mob_distance = get_dist(listening_mob, turf_source) + if(mob_distance > maxdistance) + continue + + var/heard_da_sound = listening_mob.playsound_local( + turf_source, + partial_sound, + vol * 0.5, + vary, + frequency, + falloff_exponent + 3, + channel, + pressure_affected, + partial_sound, + maxdistance, + max(min(mob_distance - SOUND_OCCLUSION_DISTANCE_MODIFIER, falloff_distance), 1), + 1, + TRUE, + env_override = SOUND_ENVIRONMENT_PADDED_CELL, + ) + + if(heard_da_sound) + . += listening_mob + +/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, wait = FALSE, env_override = null) if(!client || !can_hear()) return @@ -131,7 +178,7 @@ //End Atmosphere affecting sound if(sound_to_use.volume <= 0) - return //No sound + return FALSE //No sound var/dx = turf_source.x - turf_loc.x // Hearing from the right/left sound_to_use.x = dx * distance_multiplier @@ -142,10 +189,14 @@ sound_to_use.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) + // A sound's environment will be: + // 1. the sound's + // 2. the mob's + // 3. the area's (defaults to SOUND_ENVRIONMENT_NONE) + + if(isnum(env_override)) + sound_to_use.environment = env_override + else if(sound_environment_override != SOUND_ENVIRONMENT_NONE) sound_to_use.environment = sound_environment_override else var/area/A = get_area(src) @@ -155,6 +206,8 @@ sound_to_use.echo[3] = 0 //Room setting, 0 means normal reverb sound_to_use.echo[4] = 0 //RoomHF setting, 0 means normal reverb. + . = TRUE + SEND_SOUND(src, sound_to_use) if(LAZYLEN(observers)) for(var/mob/dead/observer/O as anything in observers) diff --git a/code/modules/admin/smites/fireball.dm b/code/modules/admin/smites/fireball.dm index bb32024aa313..de046459406b 100644 --- a/code/modules/admin/smites/fireball.dm +++ b/code/modules/admin/smites/fireball.dm @@ -26,7 +26,7 @@ if(ismineralturf(T)) var/turf/closed/mineral/M = T M.MinedAway() - playsound(T, SFX_EXPLOSION, 80, TRUE) + playsound(T, SFX_EXPLOSION, 80, TRUE, ignore_walls = TRUE) T.create_fire(1, 10) /obj/effect/temp_visual/fireball diff --git a/code/modules/antagonists/cult/blood_magic.dm b/code/modules/antagonists/cult/blood_magic.dm index 942c7bf3e795..b478c2a4d1f7 100644 --- a/code/modules/antagonists/cult/blood_magic.dm +++ b/code/modules/antagonists/cult/blood_magic.dm @@ -566,7 +566,7 @@ if(candidate.mmi || candidate.shell) channeling = TRUE user.visible_message(span_danger("A dark cloud emanates from [user]'s hand and swirls around [candidate]!")) - playsound(T, 'sound/machines/airlock_alien_prying.ogg', 80, TRUE) + playsound(T, 'sound/machines/airlock_alien_prying.ogg', 80, TRUE, ignore_walls = 'sound/machines/airlock_alien_prying.ogg') var/prev_color = candidate.color candidate.color = "black" if(do_after(user, candidate, 90)) @@ -597,7 +597,7 @@ qdel(candidate) else if(istype(target,/obj/machinery/door/airlock)) channeling = TRUE - playsound(T, 'sound/machines/doors/airlock_open_force.ogg', 50, TRUE) + playsound(T, 'sound/machines/doors/airlock_open_force.ogg', 50, TRUE, ignore_walls = 'sound/machines/doors/airlock_open_force.ogg') do_sparks(5, TRUE, target) if(do_after(user, user, 50)) if(QDELETED(target)) diff --git a/code/modules/antagonists/heretic/magic/expand_sight.dm b/code/modules/antagonists/heretic/magic/expand_sight.dm index 24ec0768c037..833aa0fba4de 100644 --- a/code/modules/antagonists/heretic/magic/expand_sight.dm +++ b/code/modules/antagonists/heretic/magic/expand_sight.dm @@ -16,7 +16,8 @@ /datum/action/innate/expand_sight/Activate() active = TRUE owner.client?.view_size.setTo(boost_to) - playsound(owner, pick('sound/hallucinations/i_see_you1.ogg', 'sound/hallucinations/i_see_you2.ogg'), 50, TRUE, ignore_walls = FALSE) + var/sound_played = pick('sound/hallucinations/i_see_you1.ogg', 'sound/hallucinations/i_see_you2.ogg') + playsound(owner, sound_played, 50, TRUE, ignore_walls = sound_played) COOLDOWN_START(src, last_toggle, 8 SECONDS) /datum/action/innate/expand_sight/Deactivate() diff --git a/code/modules/antagonists/heretic/structures/carving_knife.dm b/code/modules/antagonists/heretic/structures/carving_knife.dm index 39336fa2f82c..1da23cf1785e 100644 --- a/code/modules/antagonists/heretic/structures/carving_knife.dm +++ b/code/modules/antagonists/heretic/structures/carving_knife.dm @@ -190,7 +190,7 @@ /obj/structure/trap/eldritch/attacked_by(obj/item/weapon, mob/living/user) if(istype(weapon, /obj/item/melee/rune_carver) || istype(weapon, /obj/item/nullrod)) loc.balloon_alert(user, "carving dispelled") - playsound(src, 'sound/items/sheath.ogg', 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE, ignore_walls = FALSE) + playsound(src, 'sound/items/sheath.ogg', 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE) qdel(src) return ..() diff --git a/code/modules/antagonists/heretic/structures/mawed_crucible.dm b/code/modules/antagonists/heretic/structures/mawed_crucible.dm index 79cfe7fabb24..1ceb90c2d866 100644 --- a/code/modules/antagonists/heretic/structures/mawed_crucible.dm +++ b/code/modules/antagonists/heretic/structures/mawed_crucible.dm @@ -67,7 +67,7 @@ return TRUE if(istype(weapon, /obj/item/codex_cicatrix) || istype(weapon, /obj/item/melee/touch_attack/mansus_fist)) - playsound(src, 'sound/items/deconstruct.ogg', 30, TRUE, ignore_walls = FALSE) + playsound(src, 'sound/items/deconstruct.ogg', 30, TRUE) set_anchored(!anchored) balloon_alert(user, "[anchored ? "":"un"]anchored") return TRUE diff --git a/code/modules/assembly/flash.dm b/code/modules/assembly/flash.dm index 4f818f3700c6..9f2aa027e579 100644 --- a/code/modules/assembly/flash.dm +++ b/code/modules/assembly/flash.dm @@ -114,7 +114,7 @@ if(burnt_out || (world.time < last_trigger + cooldown)) return FALSE last_trigger = world.time - playsound(src, flash_sound, 100, TRUE) + playsound(src, flash_sound, 100, TRUE, ignore_walls = flash_sound) set_light_on(TRUE) addtimer(CALLBACK(src, PROC_REF(flash_end)), FLASH_LIGHT_DURATION, TIMER_OVERRIDE|TIMER_UNIQUE) times_used++ @@ -406,7 +406,7 @@ return FALSE overheat = TRUE addtimer(CALLBACK(src, PROC_REF(cooldown)), flashcd) - playsound(src, flash_sound, 100, TRUE) + playsound(src, flash_sound, 100, TRUE, ignore_walls = flash_sound) update_icon(ALL, TRUE) return TRUE diff --git a/code/modules/cargo/supplypod.dm b/code/modules/cargo/supplypod.dm index 2f498006af55..9b9fc03c3a13 100644 --- a/code/modules/cargo/supplypod.dm +++ b/code/modules/cargo/supplypod.dm @@ -273,9 +273,9 @@ if (explosion_sum != 0) //If the explosion list isn't all zeroes, call an explosion explosion(turf_underneath, B[1], B[2], B[3], flame_range = B[4], silent = effectQuiet, ignorecap = istype(src, /obj/structure/closet/supplypod/centcompod), explosion_cause = src) //less advanced equipment than bluespace pod, so larger explosion when landing else if (!effectQuiet && !(pod_flags & FIRST_SOUNDS)) //If our explosion list IS all zeroes, we still make a nice explosion sound (unless the effectQuiet var is true) - playsound(src, SFX_EXPLOSION, landingSound ? soundVolume * 0.25 : soundVolume, TRUE) + playsound(src, SFX_EXPLOSION, landingSound ? soundVolume * 0.25 : soundVolume, TRUE, ignore_walls = TRUE) if (landingSound) - playsound(turf_underneath, landingSound, soundVolume, FALSE, FALSE) + playsound(turf_underneath, landingSound, soundVolume, FALSE, FALSE, ignore_walls = TRUE) if (effectMissile) //If we are acting like a missile, then right after we land and finish fucking shit up w explosions, we should delete opened = TRUE //We set opened to TRUE to avoid spending time trying to open (due to being deleted) during the Destroy() proc qdel(src) @@ -322,7 +322,7 @@ /obj/structure/closet/supplypod/proc/startExitSequence(atom/movable/holder) if (leavingSound) - playsound(get_turf(holder), leavingSound, soundVolume, FALSE, FALSE) + playsound(get_turf(holder), leavingSound, soundVolume, FALSE, FALSE, ignore_walls = TRUE) if (reversing) //If we're reversing, we call the close proc. This sends the pod back up to centcom close(holder) else if (bluespace) //If we're a bluespace pod, then delete ourselves (along with our holder, if a separate holder exists) @@ -337,7 +337,7 @@ if (!holder) return take_contents(holder) - playsound(holder, close_sound, soundVolume*0.75, TRUE, -3) + playsound(holder, close_sound, soundVolume*0.75, TRUE, -3, ignore_walls = TRUE) holder.setClosed() addtimer(CALLBACK(src, PROC_REF(preReturn), holder), delays[POD_LEAVING] * 0.2) //Start to leave a bit after closing for cinematic effect diff --git a/code/modules/clothing/head/cakehat.dm b/code/modules/clothing/head/cakehat.dm index 5fa295dcba35..d5de99dd8083 100644 --- a/code/modules/clothing/head/cakehat.dm +++ b/code/modules/clothing/head/cakehat.dm @@ -67,11 +67,11 @@ supports_variations_flags = NONE /obj/item/clothing/head/hardhat/cakehat/energycake/turn_on(mob/living/user) - playsound(user, 'sound/weapons/saberon.ogg', 5, TRUE) + playsound(user, 'sound/weapons/saberon.ogg', 5, TRUE, ignore_walls = 'sound/weapons/saberon.ogg') to_chat(user, span_warning("You turn on \the [src].")) ..() /obj/item/clothing/head/hardhat/cakehat/energycake/turn_off(mob/living/user) - playsound(user, 'sound/weapons/saberoff.ogg', 5, TRUE) + playsound(user, 'sound/weapons/saberoff.ogg', 5, TRUE, ignore_walls = 'sound/weapons/saberoff.ogg') to_chat(user, span_warning("You turn off \the [src].")) ..() diff --git a/code/modules/events/immovable_rod.dm b/code/modules/events/immovable_rod.dm index 2927fb87332e..9ef4e2223c55 100644 --- a/code/modules/events/immovable_rod.dm +++ b/code/modules/events/immovable_rod.dm @@ -206,8 +206,8 @@ In my current plan for it, 'solid' will be defined as anything with density == 1 /obj/effect/immovablerod/Bump(atom/clong) if(prob(10)) - playsound(src, collision_sound, 50, TRUE) - audible_message(span_danger("You hear a CLANG!")) + playsound(src, collision_sound, 50, TRUE, ignore_walls = collision_sound) + audible_message(span_hear("CLANG!")) if(special_target && clong == special_target) complete_trajectory() @@ -277,7 +277,7 @@ In my current plan for it, 'solid' will be defined as anything with density == 1 if(!(HAS_TRAIT(user, TRAIT_ROD_SUPLEX) || (user.mind && HAS_TRAIT(user.mind, TRAIT_ROD_SUPLEX)))) return - playsound(src, 'sound/effects/meteorimpact.ogg', 100, TRUE) + playsound(src, 'sound/effects/meteorimpact.ogg', 100, TRUE, ignore_walls = 'sound/effects/meteorimpact.ogg') for(var/mob/living/nearby_mob in urange(8, src)) if(nearby_mob.stat != CONSCIOUS) continue diff --git a/code/modules/events/portal_storm.dm b/code/modules/events/portal_storm.dm index 53b5d9dfd92f..19aeb6808fa4 100644 --- a/code/modules/events/portal_storm.dm +++ b/code/modules/events/portal_storm.dm @@ -96,7 +96,7 @@ return T = get_step(T, SOUTHWEST) //align center of image with turf flick_overlay_static(storm, T, 15) - playsound(T, 'sound/magic/lightningbolt.ogg', rand(80, 100), TRUE) + playsound(T, 'sound/magic/lightningbolt.ogg', rand(80, 100), TRUE, ignore_walls = 'sound/magic/lightningbolt.ogg') /datum/round_event/portal_storm/proc/spawn_hostile() if(!hostile_types || !hostile_types.len) diff --git a/code/modules/language/language_manuals.dm b/code/modules/language/language_manuals.dm index d264e3425d14..6b24bb835d9c 100644 --- a/code/modules/language/language_manuals.dm +++ b/code/modules/language/language_manuals.dm @@ -28,7 +28,7 @@ attack_self(user) return - playsound(loc, SFX_PUNCH, 25, TRUE, -1) + playsound(loc, SFX_PUNCH, 25, TRUE, -1, ignore_walls = SFX_PUNCH) if(M.stat == DEAD) M.visible_message(span_danger("[user] smacks [M]'s lifeless corpse with [src]."), span_userdanger("[user] smacks your lifeless corpse with [src]."), span_hear("You hear smacking.")) diff --git a/code/modules/mob/living/basic/basic_defense.dm b/code/modules/mob/living/basic/basic_defense.dm index 2cb5d51429de..66c6727a5ed1 100644 --- a/code/modules/mob/living/basic/basic_defense.dm +++ b/code/modules/mob/living/basic/basic_defense.dm @@ -49,7 +49,7 @@ . = ..() if(!.) return - playsound(loc, SFX_PUNCH, 25, TRUE, -1) + playsound(loc, SFX_PUNCH, 25, TRUE, -1, ignore_walls = SFX_PUNCH) visible_message(span_danger("[user] punches [src]!"), \ span_userdanger("You're punched by [user]!"), null, COMBAT_MESSAGE_RANGE, user) to_chat(user, span_danger("You punch [src]!")) diff --git a/code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm b/code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm index 16777169158f..ed2217c6c193 100644 --- a/code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm +++ b/code/modules/mob/living/carbon/alien/humanoid/humanoid_defense.dm @@ -21,7 +21,7 @@ if (body_position == STANDING_UP) if (prob(5)) Unconscious(40) - playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, TRUE, -1) + playsound(loc, 'sound/weapons/thudswoosh.ogg', 50, TRUE, -1, ignore_walls = 'sound/weapons/thudswoosh.ogg') log_combat(user, src, "pushed") visible_message(span_danger("[user] pushes [src] down!"), \ span_userdanger("[user] pushes you down!"), span_hear("You hear aggressive shuffling followed by a loud thud!"), null, user) @@ -29,7 +29,7 @@ return TRUE var/damage = rand(1, 9) if (prob(90)) - playsound(loc, SFX_PUNCH, 25, TRUE, -1) + playsound(loc, SFX_PUNCH, 25, TRUE, -1, ignore_walls = SFX_PUNCH) visible_message(span_danger("[user] punches [src]!"), \ span_userdanger("[user] punches you!"), span_hear("You hear a sickening sound of flesh hitting flesh!"), COMBAT_MESSAGE_RANGE, user) to_chat(user, span_danger("You punch [src]!")) diff --git a/code/modules/mob/living/carbon/alien/larva/larva_defense.dm b/code/modules/mob/living/carbon/alien/larva/larva_defense.dm index debec99bd690..5f09d5fa8736 100644 --- a/code/modules/mob/living/carbon/alien/larva/larva_defense.dm +++ b/code/modules/mob/living/carbon/alien/larva/larva_defense.dm @@ -4,7 +4,7 @@ if(..()) var/damage = rand(1, 9) if (prob(90)) - playsound(loc, SFX_PUNCH, 25, TRUE, -1) + playsound(loc, SFX_PUNCH, 25, TRUE, -1, ignore_walls = SFX_PUNCH) log_combat(user, src, "attacked") visible_message(span_danger("[user] kicks [src]!"), \ span_userdanger("[user] kicks you!"), span_hear("You hear a sickening sound of flesh hitting flesh!"), COMBAT_MESSAGE_RANGE, user) diff --git a/code/modules/mob/living/carbon/carbon.dm b/code/modules/mob/living/carbon/carbon.dm index 09513330614c..c3764b2effd6 100644 --- a/code/modules/mob/living/carbon/carbon.dm +++ b/code/modules/mob/living/carbon/carbon.dm @@ -112,7 +112,7 @@ Paralyze(2 SECONDS) visible_message(span_danger("[src] crashes into [victim][extra_speed ? " really hard" : ""], knocking them both over!"),\ span_userdanger("You violently crash into [victim][extra_speed ? " extra hard" : ""]!")) - playsound(src, SFX_PUNCH ,50,TRUE) + playsound(src, SFX_PUNCH ,50,TRUE, ignore_walls = SFX_PUNCH) log_combat(src, victim, "crashed into") //Throwing stuff diff --git a/code/modules/mob/living/carbon/human/species.dm b/code/modules/mob/living/carbon/human/species.dm index 24015b50bffd..24dc86ded3af 100644 --- a/code/modules/mob/living/carbon/human/species.dm +++ b/code/modules/mob/living/carbon/human/species.dm @@ -1080,7 +1080,7 @@ GLOBAL_LIST_EMPTY(features_by_species) var/armor_block = target.run_armor_check(affecting, BLUNT) - playsound(target.loc, attacking_bodypart.unarmed_attack_sound, 25, TRUE, -1) + playsound(target.loc, attacking_bodypart.unarmed_attack_sound, 25, TRUE, -1, ignore_walls = attacking_bodypart.unarmed_attack_sound) user.visible_message( span_danger("[user] [atk_verb]ed [target] in the [affecting.plaintext_zone]!"), diff --git a/code/modules/mob/living/living_say.dm b/code/modules/mob/living/living_say.dm index e61537f0532a..13c6e69745fd 100644 --- a/code/modules/mob/living/living_say.dm +++ b/code/modules/mob/living/living_say.dm @@ -290,7 +290,7 @@ GLOBAL_LIST_INIT(message_modes_stat_limits, list( speak_sound = voice_type2sound[voice_type]["!"] else speak_sound = voice_type2sound[voice_type][voice_type] - playsound(src, speak_sound, 300, 1, range - SOUND_RANGE, falloff_exponent = 0, pressure_affected = FALSE, ignore_walls = FALSE, use_reverb = FALSE) + playsound(src, speak_sound, 300, 1, range - SOUND_RANGE, falloff_exponent = 0, pressure_affected = FALSE, use_reverb = FALSE) talkcount++ return TRUE diff --git a/code/modules/mob/living/silicon/ai/ai.dm b/code/modules/mob/living/silicon/ai/ai.dm index 5338fda15dfc..96254aa0e31d 100644 --- a/code/modules/mob/living/silicon/ai/ai.dm +++ b/code/modules/mob/living/silicon/ai/ai.dm @@ -910,10 +910,10 @@ if(!istype(apc) || QDELETED(apc) || apc.machine_stat & BROKEN) to_chat(src, span_danger("Hack aborted. The designated APC no longer exists on the power network.")) - playsound(get_turf(src), 'sound/machines/buzz-two.ogg', 50, TRUE, ignore_walls = FALSE) + playsound(get_turf(src), 'sound/machines/buzz-two.ogg', 50, TRUE) else if(apc.aidisabled) to_chat(src, span_danger("Hack aborted. [apc] is no longer responding to our systems.")) - playsound(get_turf(src), 'sound/machines/buzz-sigh.ogg', 50, TRUE, ignore_walls = FALSE) + playsound(get_turf(src), 'sound/machines/buzz-sigh.ogg', 50, TRUE) else malf_picker.processing_time += 10 @@ -922,7 +922,7 @@ apc.locked = TRUE apc.coverlocked = TRUE - playsound(get_turf(src), 'sound/machines/ding.ogg', 50, TRUE, ignore_walls = FALSE) + playsound(get_turf(src), 'sound/machines/ding.ogg', 50, TRUE) to_chat(src, "Hack complete. [apc] is now under your exclusive control.") apc.update_appearance() diff --git a/code/modules/mob/living/silicon/silicon_defense.dm b/code/modules/mob/living/silicon/silicon_defense.dm index 65145599894e..5475e95775b4 100644 --- a/code/modules/mob/living/silicon/silicon_defense.dm +++ b/code/modules/mob/living/silicon/silicon_defense.dm @@ -50,7 +50,7 @@ if(!.) return adjustBruteLoss(rand(10, 15)) - playsound(loc, SFX_PUNCH, 25, TRUE, -1) + playsound(loc, SFX_PUNCH, 25, TRUE, -1, ignore_walls = SFX_PUNCH) visible_message(span_danger("[user] punches [src]!"), \ span_userdanger("[user] punches you!"), null, COMBAT_MESSAGE_RANGE, user) to_chat(user, span_danger("You punch [src]!")) diff --git a/code/modules/mob/living/simple_animal/animal_defense.dm b/code/modules/mob/living/simple_animal/animal_defense.dm index b1613f5f16c2..47238fdbdd29 100644 --- a/code/modules/mob/living/simple_animal/animal_defense.dm +++ b/code/modules/mob/living/simple_animal/animal_defense.dm @@ -49,7 +49,7 @@ . = ..() if(!.) return - playsound(loc, SFX_PUNCH, 25, TRUE, -1) + playsound(loc, SFX_PUNCH, 25, TRUE, -1, ignore_walls = SFX_PUNCH) visible_message(span_danger("[user] punches [src]!"), \ span_userdanger("You're punched by [user]!"), null, COMBAT_MESSAGE_RANGE, user) to_chat(user, span_danger("You punch [src]!")) diff --git a/code/modules/mob/living/simple_animal/bot/SuperBeepsky.dm b/code/modules/mob/living/simple_animal/bot/SuperBeepsky.dm index e7ec27ce0a48..184881469f45 100644 --- a/code/modules/mob/living/simple_animal/bot/SuperBeepsky.dm +++ b/code/modules/mob/living/simple_animal/bot/SuperBeepsky.dm @@ -118,8 +118,9 @@ target = C oldtarget_name = C.name speak("Level [threatlevel] infraction alert!") - playsound(src, pick('sound/voice/beepsky/criminal.ogg', 'sound/voice/beepsky/justice.ogg', 'sound/voice/beepsky/freeze.ogg'), 50, FALSE) - playsound(src,'sound/weapons/saberon.ogg',50,TRUE,-1) + var/sound_played = pick('sound/voice/beepsky/criminal.ogg', 'sound/voice/beepsky/justice.ogg', 'sound/voice/beepsky/freeze.ogg') + playsound(src, sound_played, 50, FALSE, ignore_walls = sound_played) + playsound(src,'sound/weapons/saberon.ogg',50,TRUE,-1, ignore_walls = 'sound/weapons/saberon.ogg') visible_message(span_warning("[src] ignites his energy swords!")) icon_state = "grievous-c" visible_message("[src] points at [C.name]!") diff --git a/code/modules/mob/living/simple_animal/guardian/types/explosive.dm b/code/modules/mob/living/simple_animal/guardian/types/explosive.dm index 49da48bec4cd..46b8b6cda947 100644 --- a/code/modules/mob/living/simple_animal/guardian/types/explosive.dm +++ b/code/modules/mob/living/simple_animal/guardian/types/explosive.dm @@ -62,7 +62,7 @@ to_chat(explodee, span_danger("[source] was boobytrapped!")) to_chat(src, span_danger("Success! Your trap caught [explodee]")) var/turf/T = get_turf(source) - playsound(T,'sound/effects/explosion2.ogg', 200, TRUE) + playsound(T,'sound/effects/explosion2.ogg', 200, TRUE, ignore_walls = TRUE) new /obj/effect/temp_visual/explosion(T) EX_ACT(explodee, EXPLODE_HEAVY) UNREGISTER_BOMB_SIGNALS(source) diff --git a/code/modules/mob/living/simple_animal/hostile/hostile.dm b/code/modules/mob/living/simple_animal/hostile/hostile.dm index 2263216ecd8b..b4accea90173 100644 --- a/code/modules/mob/living/simple_animal/hostile/hostile.dm +++ b/code/modules/mob/living/simple_animal/hostile/hostile.dm @@ -415,11 +415,11 @@ face_atom(targeted_atom) if(casingtype) var/obj/item/ammo_casing/casing = new casingtype(startloc) - playsound(src, projectilesound, 100, TRUE) + playsound(src, projectilesound, 100, TRUE, ignore_walls = projectilesound) casing.fire_casing(targeted_atom, src, null, null, null, ran_zone(), 0, src) else if(projectiletype) var/obj/projectile/P = new projectiletype(startloc) - playsound(src, projectilesound, 100, TRUE) + playsound(src, projectilesound, 100, TRUE, ignore_walls = projectilesound) P.starting = startloc P.firer = src P.fired_from = src diff --git a/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm b/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm index 5e606b5bf833..caadbdb337bf 100644 --- a/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm +++ b/code/modules/mob/living/simple_animal/hostile/jungle/leaper.dm @@ -224,7 +224,7 @@ notransform = FALSE remove_passmob(REF(src)) hopping = FALSE - playsound(src.loc, 'sound/effects/meteorimpact.ogg', 100, TRUE) + playsound(src.loc, 'sound/effects/meteorimpact.ogg', 100, TRUE, ignore_walls = 'sound/effects/meteorimpact.ogg') if(target && AIStatus == AI_ON && projectile_ready && !ckey) face_atom(target) addtimer(CALLBACK(src, PROC_REF(OpenFire), target), 5) @@ -244,7 +244,7 @@ hopping = FALSE set_density(TRUE) notransform = FALSE - playsound(src, 'sound/effects/meteorimpact.ogg', 200, TRUE) + playsound(src, 'sound/effects/meteorimpact.ogg', 200, TRUE, ignore_walls = 'sound/effects/meteorimpact.ogg') for(var/mob/living/L in orange(1, src)) L.adjustBruteLoss(35) if(!QDELETED(L)) // Some mobs are deleted on death diff --git a/code/modules/mob/living/simple_animal/hostile/space_dragon.dm b/code/modules/mob/living/simple_animal/hostile/space_dragon.dm index 04bb989f94a7..c6c39a2a16c5 100644 --- a/code/modules/mob/living/simple_animal/hostile/space_dragon.dm +++ b/code/modules/mob/living/simple_animal/hostile/space_dragon.dm @@ -526,7 +526,7 @@ for(var/obj/structure/carp_rift/c in S.loc.contents) return var/obj/structure/carp_rift/CR = new /obj/structure/carp_rift(S.loc) - playsound(S, 'sound/vehicles/rocketlaunch.ogg', 100, TRUE) + playsound(S, 'sound/vehicles/rocketlaunch.ogg', 100, TRUE, ignore_walls = 'sound/vehicles/rocketlaunch.ogg') S.riftTimer = -1 CR.dragon = S S.rift_list += CR @@ -602,7 +602,7 @@ . += span_notice("It has [carp_stored] carp available to spawn as.") /obj/structure/carp_rift/play_attack_sound(damage_amount, damage_type = BRUTE, damage_flag = 0) - playsound(src, 'sound/magic/lightningshock.ogg', 50, TRUE) + playsound(src, 'sound/magic/lightningshock.ogg', 50, TRUE, ignore_walls = 'sound/magic/lightningshock.ogg') /obj/structure/carp_rift/Destroy() STOP_PROCESSING(SSobj, src) diff --git a/code/modules/paperwork/pen.dm b/code/modules/paperwork/pen.dm index e861a8087fae..37a87f15dd51 100644 --- a/code/modules/paperwork/pen.dm +++ b/code/modules/paperwork/pen.dm @@ -292,7 +292,8 @@ updateEmbedding() balloon_alert(user, "[hidden_name] [active ? "active":"concealed"]") - playsound(user ? user : src, active ? 'sound/weapons/saberon.ogg' : 'sound/weapons/saberoff.ogg', 5, TRUE) + var/sound_played = active ? 'sound/weapons/saberon.ogg' : 'sound/weapons/saberoff.ogg' + playsound(user ? user : src, sound_played, 5, TRUE, ignore_walls = sound_played) return COMPONENT_NO_DEFAULT_MESSAGE ///syndicate prototype for smuggling missions diff --git a/code/modules/power/supermatter/nupermatter_hit_procs.dm b/code/modules/power/supermatter/nupermatter_hit_procs.dm index 36ee84deb5ab..9ba0d8c2fbf3 100644 --- a/code/modules/power/supermatter/nupermatter_hit_procs.dm +++ b/code/modules/power/supermatter/nupermatter_hit_procs.dm @@ -55,7 +55,7 @@ /obj/machinery/power/supermatter/blob_act(obj/structure/blob/blob) if(!blob || isspaceturf(loc)) //does nothing in space return - playsound(get_turf(src), 'sound/effects/supermatter.ogg', 50, TRUE) + playsound(get_turf(src), 'sound/effects/supermatter.ogg', 50, TRUE, ignore_walls = TRUE) damage += blob.get_integrity() * 0.5 //take damage equal to 50% of remaining blob health before it tried to eat us if(blob.get_integrity() > 100) blob.visible_message(span_danger("\The [blob] strikes at \the [src] and flinches away!"), @@ -166,7 +166,7 @@ nom.visible_message(vis_msg, mob_msg, span_hear("You hear an unearthly ringing, then what sounds like a shrilling kettle as you are washed with a wave of heat.")) investigate_log("has been attacked ([cause]) by [key_name(nom)]", INVESTIGATE_ENGINE) add_memory_in_range(src, 7, MEMORY_SUPERMATTER_DUSTED, list(DETAIL_PROTAGONIST = nom, DETAIL_WHAT_BY = src), story_value = STORY_VALUE_OKAY, memory_flags = MEMORY_CHECK_BLIND_AND_DEAF) - playsound(get_turf(src), 'sound/effects/supermatter.ogg', 50, TRUE) + playsound(get_turf(src), 'sound/effects/supermatter.ogg', 50, TRUE, ignore_walls = TRUE) Consume(nom) /obj/machinery/power/supermatter/attackby(obj/item/item, mob/living/user, params) @@ -185,13 +185,13 @@ dust_arm.dismember() user.visible_message(span_danger("The [item] flashes out of existence on contact with \the [src], resonating with a horrible sound..."),\ span_danger("Oops! The [item] flashes out of existence on contact with \the [src], taking your arm with it! That was clumsy of you!")) - playsound(src, 'sound/effects/supermatter.ogg', 150, TRUE) + playsound(src, 'sound/effects/supermatter.ogg', 150, TRUE, ignore_walls = TRUE) Consume(dust_arm) qdel(item) return if(cig.lit || user.combat_mode) user.visible_message(span_danger("A hideous sound echoes as [item] is ashed out on contact with \the [src]. That didn't seem like a good idea...")) - playsound(src, 'sound/effects/supermatter.ogg', 150, TRUE) + playsound(src, 'sound/effects/supermatter.ogg', 150, TRUE, ignore_walls = TRUE) Consume(item) radiation_pulse(src, max_range = 3, threshold = 0.1, chance = 50) return ..() @@ -199,7 +199,7 @@ cig.light() user.visible_message(span_danger("As [user] lights \their [item] on \the [src], silence fills the room..."),\ span_danger("Time seems to slow to a crawl as you touch \the [src] with \the [item].\n\The [item] flashes alight with an eerie energy as you nonchalantly lift your hand away from \the [src]. Damn.")) - playsound(src, 'sound/effects/supermatter.ogg', 50, TRUE) + playsound(src, 'sound/effects/supermatter.ogg', 50, TRUE, ignore_walls = TRUE) radiation_pulse(src, max_range = 1, threshold = 0, chance = 100) return if(istype(item, /obj/item/scalpel/supermatter)) @@ -221,7 +221,7 @@ span_hear("Everything suddenly goes silent.")) investigate_log("has been attacked ([item]) by [key_name(user)]", INVESTIGATE_ENGINE) Consume(item) - playsound(get_turf(src), 'sound/effects/supermatter.ogg', 50, TRUE) + playsound(get_turf(src), 'sound/effects/supermatter.ogg', 50, TRUE, ignore_walls = TRUE) radiation_pulse(src, max_range = 3, threshold = 0.1, chance = 50) @@ -251,7 +251,7 @@ span_warning("You hear a loud crack as you are washed with a wave of heat.") ) - playsound(get_turf(src), 'sound/effects/supermatter.ogg', 50, TRUE) + playsound(get_turf(src), 'sound/effects/supermatter.ogg', 50, TRUE, ignore_walls = TRUE) Consume(AM) /obj/machinery/power/supermatter/Bump(atom/bumped_atom) @@ -268,7 +268,7 @@ null, span_hear("You hear a loud crack as you are washed with a wave of heat.") ) - playsound(src, 'sound/effects/supermatter.ogg', 50, TRUE) + playsound(src, 'sound/effects/supermatter.ogg', 50, TRUE, ignore_walls = TRUE) var/suspicion = null if (fingerprintslast) @@ -294,7 +294,7 @@ else return - playsound(src, 'sound/effects/supermatter.ogg', 50, TRUE) + playsound(src, 'sound/effects/supermatter.ogg', 50, TRUE, ignore_walls = TRUE) Consume(bumped_atom) /obj/machinery/power/supermatter/intercept_zImpact(list/falling_movables, levels) diff --git a/code/modules/power/tesla/coil.dm b/code/modules/power/tesla/coil.dm index 30ae85b88ef9..2d03ca870033 100644 --- a/code/modules/power/tesla/coil.dm +++ b/code/modules/power/tesla/coil.dm @@ -110,7 +110,7 @@ var/power = (powernet.avail) * 0.2 * input_power_multiplier //Always always always use more then you output for the love of god power = min(surplus(), power) //Take the smaller of the two add_load(power) - playsound(src.loc, 'sound/magic/lightningshock.ogg', zap_sound_volume, TRUE, zap_sound_range) + playsound(src.loc, 'sound/magic/lightningshock.ogg', zap_sound_volume, TRUE, zap_sound_range, ignore_walls = 'sound/magic/lightningshock.ogg') tesla_zap(src, 10, power, zap_flags) zap_buckle_check(power) diff --git a/code/modules/power/tesla/energy_ball.dm b/code/modules/power/tesla/energy_ball.dm index a24be64b73d7..353115eb55ec 100644 --- a/code/modules/power/tesla/energy_ball.dm +++ b/code/modules/power/tesla/energy_ball.dm @@ -70,7 +70,7 @@ move(4 + orbiting_balls.len * 1.5) - playsound(src.loc, 'sound/magic/lightningbolt.ogg', 100, TRUE, extrarange = 30) + playsound(src.loc, 'sound/magic/lightningbolt.ogg', 100, TRUE, extrarange = 30, ignore_walls = TRUE) pixel_x = 0 pixel_y = 0 @@ -126,7 +126,7 @@ energy_to_lower = energy_to_raise - 20 energy_to_raise = energy_to_raise * 1.25 - playsound(src.loc, 'sound/magic/lightning_chargeup.ogg', 100, TRUE, extrarange = 30) + playsound(src.loc, 'sound/magic/lightning_chargeup.ogg', 100, TRUE, extrarange = 30, ignore_walls = 'sound/magic/lightning_chargeup.ogg') addtimer(CALLBACK(src, PROC_REF(new_mini_ball)), 100) else if(energy < energy_to_lower && orbiting_balls.len) energy_to_raise = energy_to_raise / 1.25 diff --git a/code/modules/projectiles/gun.dm b/code/modules/projectiles/gun.dm index adc2ff104815..32d9d31d600e 100644 --- a/code/modules/projectiles/gun.dm +++ b/code/modules/projectiles/gun.dm @@ -205,9 +205,9 @@ /// Play the bang bang sound /obj/item/gun/proc/play_fire_sound() if(suppressed) - playsound(src, suppressed_sound, suppressed_volume, vary_fire_sound, ignore_walls = FALSE, extrarange = SILENCED_SOUND_EXTRARANGE, falloff_distance = 0) + playsound(src, suppressed_sound, suppressed_volume, vary_fire_sound, ignore_walls = suppressed_sound, extrarange = SILENCED_SOUND_EXTRARANGE, falloff_distance = 0) else - playsound(src, fire_sound, fire_sound_volume, vary_fire_sound) + playsound(src, fire_sound, fire_sound_volume, vary_fire_sound, falloff_exponent = 1.5, ignore_walls = fire_sound, falloff_distance = 7) /obj/item/gun/emp_act(severity) . = ..() diff --git a/code/modules/projectiles/guns/ballistic/automatic.dm b/code/modules/projectiles/guns/ballistic/automatic.dm index af1f28d2e369..400ee707f01a 100644 --- a/code/modules/projectiles/guns/ballistic/automatic.dm +++ b/code/modules/projectiles/guns/ballistic/automatic.dm @@ -345,7 +345,7 @@ /obj/item/gun/ballistic/automatic/sniper_rifle/ready_to_fire() . = ..() if(suppressed) - playsound(src, 'sound/machines/eject.ogg', 25, TRUE, ignore_walls = FALSE, extrarange = SILENCED_SOUND_EXTRARANGE, falloff_distance = 0) + playsound(src, 'sound/machines/eject.ogg', 25, TRUE, extrarange = SILENCED_SOUND_EXTRARANGE, falloff_distance = 0) else playsound(src, 'sound/machines/eject.ogg', 50, TRUE) diff --git a/code/modules/projectiles/guns/ballistic/launchers.dm b/code/modules/projectiles/guns/ballistic/launchers.dm index bbf835c4d422..77b204553a29 100644 --- a/code/modules/projectiles/guns/ballistic/launchers.dm +++ b/code/modules/projectiles/guns/ballistic/launchers.dm @@ -81,7 +81,7 @@ span_userdanger("You aim [src] at the ground to perform a bisnasty rocket jump...")) if(can_fire()) user.notransform = TRUE - playsound(src, 'sound/vehicles/rocketlaunch.ogg', 80, TRUE, 5) + playsound(src, 'sound/vehicles/rocketlaunch.ogg', 80, TRUE, 5, ignore_walls = 'sound/vehicles/rocketlaunch.ogg') animate(user, pixel_z = 300, time = 30, easing = LINEAR_EASING) sleep(7 SECONDS) animate(user, pixel_z = 0, time = 5, easing = LINEAR_EASING) diff --git a/code/modules/projectiles/guns/ballistic/revolver.dm b/code/modules/projectiles/guns/ballistic/revolver.dm index fefdd8dc8fef..6dd7fe17bdb3 100644 --- a/code/modules/projectiles/guns/ballistic/revolver.dm +++ b/code/modules/projectiles/guns/ballistic/revolver.dm @@ -46,13 +46,13 @@ var/click_frequency_to_use = 1 - frequency_to_use * 0.75 var/play_click = sqrt(magazine?.max_ammo) > get_ammo(TRUE, FALSE) if(suppressed) - playsound(src, suppressed_sound, suppressed_volume, vary_fire_sound, ignore_walls = FALSE, extrarange = SILENCED_SOUND_EXTRARANGE, falloff_distance = 0) + playsound(src, suppressed_sound, suppressed_volume, vary_fire_sound, ignore_walls = suppressed_sound, extrarange = SILENCED_SOUND_EXTRARANGE, falloff_distance = 0) if(play_click) - playsound(src, 'sound/weapons/gun/general/ballistic_click.ogg', suppressed_volume, vary_fire_sound, ignore_walls = FALSE, extrarange = SILENCED_SOUND_EXTRARANGE, falloff_distance = 0, frequency = click_frequency_to_use) + playsound(src, 'sound/weapons/gun/general/ballistic_click.ogg', fire_sound_volume, vary_fire_sound, ignore_walls = 'sound/weapons/gun/general/ballistic_click.ogg', extrarange = SILENCED_SOUND_EXTRARANGE, falloff_distance = 0, frequency = click_frequency_to_use) else - playsound(src, fire_sound, fire_sound_volume, vary_fire_sound) + playsound(src, fire_sound, fire_sound_volume, vary_fire_sound, falloff_exponent = 1.5, ignore_walls = fire_sound, falloff_distance = 7) if(play_click) - playsound(src, 'sound/weapons/gun/general/ballistic_click.ogg', fire_sound_volume, vary_fire_sound, frequency = click_frequency_to_use) + playsound(src, 'sound/weapons/gun/general/ballistic_click.ogg', fire_sound_volume, vary_fire_sound, ignore_walls = 'sound/weapons/gun/general/ballistic_click.ogg', frequency = click_frequency_to_use) /obj/item/gun/ballistic/revolver/verb/spin() set name = "Spin Chamber" diff --git a/code/modules/projectiles/guns/ballistic/rifle.dm b/code/modules/projectiles/guns/ballistic/rifle.dm index adafe919cddb..5bf29e98cf46 100644 --- a/code/modules/projectiles/guns/ballistic/rifle.dm +++ b/code/modules/projectiles/guns/ballistic/rifle.dm @@ -24,7 +24,7 @@ /obj/item/gun/ballistic/rifle/rack(mob/user = null) if (bolt.is_locked == FALSE) // The bolt is closed to_chat(user, span_notice("You open the bolt of \the [src].")) - playsound(src, rack_sound, rack_sound_volume, rack_sound_vary) + playsound(src, rack_sound, rack_sound_volume, rack_sound_vary, ignore_walls = rack_sound) update_chamber(FALSE, FALSE, FALSE) diff --git a/code/modules/projectiles/guns/bolt_types/_gun_bolt.dm b/code/modules/projectiles/guns/bolt_types/_gun_bolt.dm index eb0bf40524f7..d3ee96aa69bb 100644 --- a/code/modules/projectiles/guns/bolt_types/_gun_bolt.dm +++ b/code/modules/projectiles/guns/bolt_types/_gun_bolt.dm @@ -25,7 +25,7 @@ /// Called after rack(), before update_appearance() /datum/gun_bolt/proc/post_rack(mob/user) - playsound(parent, parent.rack_sound, parent.rack_sound_volume, parent.rack_sound_vary) + playsound(parent, parent.rack_sound, parent.rack_sound_volume, parent.rack_sound_vary, ignore_walls = parent.rack_sound) /// Called when ammo was successfully loaded into the weapon. /datum/gun_bolt/proc/loaded_ammo() diff --git a/code/modules/projectiles/guns/energy.dm b/code/modules/projectiles/guns/energy.dm index b8eb68d96641..0dfca522c979 100644 --- a/code/modules/projectiles/guns/energy.dm +++ b/code/modules/projectiles/guns/energy.dm @@ -50,9 +50,9 @@ frequency_to_use = sin((90/max_shots) * shots_left) if(suppressed) - playsound(src, suppressed_sound, suppressed_volume, vary_fire_sound, ignore_walls = FALSE, extrarange = SILENCED_SOUND_EXTRARANGE, falloff_distance = 0, frequency = frequency_to_use) + playsound(src, suppressed_sound, suppressed_volume, vary_fire_sound, extrarange = SILENCED_SOUND_EXTRARANGE, ignore_walls = suppressed_sound, falloff_distance = 0, frequency = frequency_to_use) else - playsound(src, fire_sound, fire_sound_volume, vary_fire_sound, frequency = frequency_to_use) + playsound(src, fire_sound, fire_sound_volume, vary_fire_sound, frequency = frequency_to_use, falloff_exponent = 1.5, ignore_walls = fire_sound, falloff_distance = 7) /obj/item/gun/energy/emp_act(severity) . = ..() @@ -256,7 +256,7 @@ sleep(2.5 SECONDS) if(user.is_holding(src)) user.visible_message(span_suicide("[user] melts [user.p_their()] face off with [src]!")) - playsound(loc, fire_sound, 50, TRUE, -1) + playsound(loc, fire_sound, 50, TRUE, -1, ignore_walls = fire_sound) var/obj/item/ammo_casing/energy/shot = ammo_type[select] cell.use(shot.e_cost) update_appearance() @@ -293,20 +293,20 @@ . = "" else if(loaded_projectile.nodamage || !loaded_projectile.damage || loaded_projectile.damage_type == STAMINA) user.visible_message(span_danger("[user] tries to light [A.loc == user ? "[user.p_their()] [A.name]" : A] with [src], but it doesn't do anything. Dumbass.")) - playsound(user, E.fire_sound, 50, TRUE) - playsound(user, loaded_projectile.hitsound, 50, TRUE) + play_fire_sound() + playsound(user, loaded_projectile.hitsound, 50, TRUE, ignore_walls = loaded_projectile.hitsound) cell.use(E.e_cost) . = "" else if(loaded_projectile.damage_type != BURN) user.visible_message(span_danger("[user] tries to light [A.loc == user ? "[user.p_their()] [A.name]" : A] with [src], but only succeeds in utterly destroying it. Dumbass.")) - playsound(user, E.fire_sound, 50, TRUE) - playsound(user, loaded_projectile.hitsound, 50, TRUE) + play_fire_sound() + playsound(user, loaded_projectile.hitsound, 50, TRUE, ignore_walls = loaded_projectile.hitsound) cell.use(E.e_cost) qdel(A) . = "" else - playsound(user, E.fire_sound, 50, TRUE) - playsound(user, loaded_projectile.hitsound, 50, TRUE) + play_fire_sound() + playsound(user, loaded_projectile.hitsound, 50, TRUE, ignore_walls = loaded_projectile.hitsound) cell.use(E.e_cost) . = span_danger("[user] casually lights [A.loc == user ? "[user.p_their()] [A.name]" : A] with [src]. Damn.") diff --git a/code/modules/projectiles/guns/energy/beam_rifle.dm b/code/modules/projectiles/guns/energy/beam_rifle.dm index 6584247ce4b6..3900157afc00 100644 --- a/code/modules/projectiles/guns/energy/beam_rifle.dm +++ b/code/modules/projectiles/guns/energy/beam_rifle.dm @@ -491,7 +491,7 @@ set waitfor = FALSE if(nodamage) return FALSE - playsound(src, 'sound/effects/explosion3.ogg', 100, TRUE) + playsound(src, 'sound/effects/explosion3.ogg', 100, TRUE, ignore_walls = TRUE) if(!do_pierce) AOE(get_turf(target) || get_turf(src)) if(!QDELETED(target)) diff --git a/code/modules/projectiles/guns/energy/stun.dm b/code/modules/projectiles/guns/energy/stun.dm index d8660b5a5687..cfb696b9de21 100644 --- a/code/modules/projectiles/guns/energy/stun.dm +++ b/code/modules/projectiles/guns/energy/stun.dm @@ -35,9 +35,9 @@ /obj/item/gun/energy/disabler/play_fire_sound() if(suppressed) - playsound(src, suppressed_sound, suppressed_volume, vary_fire_sound, ignore_walls = FALSE, extrarange = SILENCED_SOUND_EXTRARANGE, falloff_distance = 0) + playsound(src, suppressed_sound, suppressed_volume, vary_fire_sound, ignore_walls = suppressed_sound, extrarange = SILENCED_SOUND_EXTRARANGE, falloff_distance = 0) else - playsound(src, fire_sound, fire_sound_volume, vary_fire_sound) + playsound(src, fire_sound, fire_sound_volume, vary_fire_sound, falloff_exponent = 1.5, ignore_walls = fire_sound, falloff_distance = 7) /obj/item/gun/energy/disabler/add_seclight_point() AddComponent(/datum/component/seclite_attachable, \ diff --git a/code/modules/projectiles/guns/magic.dm b/code/modules/projectiles/guns/magic.dm index 26800a91055e..ff2d9cfe2ba0 100644 --- a/code/modules/projectiles/guns/magic.dm +++ b/code/modules/projectiles/guns/magic.dm @@ -84,7 +84,7 @@ /obj/item/gun/magic/suicide_act(mob/user) user.visible_message(span_suicide("[user] is twisting [src] above [user.p_their()] head, releasing a magical blast! It looks like [user.p_theyre()] trying to commit suicide!")) - playsound(loc, fire_sound, 50, TRUE, -1) + play_fire_sound() return (FIRELOSS) /obj/item/gun/magic/vv_edit_var(var_name, var_value) diff --git a/code/modules/projectiles/guns/magic/wand.dm b/code/modules/projectiles/guns/magic/wand.dm index cab757409307..0e725e68be48 100644 --- a/code/modules/projectiles/guns/magic/wand.dm +++ b/code/modules/projectiles/guns/magic/wand.dm @@ -51,7 +51,7 @@ /obj/item/gun/magic/wand/proc/zap_self(mob/living/user) user.visible_message(span_danger("[user] zaps [user.p_them()]self with [src].")) - playsound(user, fire_sound, 50, TRUE) + playsound(user, fire_sound, 50, TRUE, ignore_walls = fire_sound) user.log_message("zapped [user.p_them()]self with a [src]", LOG_ATTACK) diff --git a/code/modules/projectiles/guns/special/tranq_rifle.dm b/code/modules/projectiles/guns/special/tranq_rifle.dm index 5dd67b2af53a..92d6b59cc2dd 100644 --- a/code/modules/projectiles/guns/special/tranq_rifle.dm +++ b/code/modules/projectiles/guns/special/tranq_rifle.dm @@ -41,7 +41,7 @@ return to_chat(user, span_notice("You open the bolt of \the [src].")) - playsound(src, rack_sound, rack_sound_volume, rack_sound_vary) + playsound(src, rack_sound, rack_sound_volume, rack_sound_vary, ignore_walls = rack_sound) chambered = null bolt.is_locked = TRUE return diff --git a/code/modules/projectiles/projectile.dm b/code/modules/projectiles/projectile.dm index e87959a8b749..0066c715f0b3 100644 --- a/code/modules/projectiles/projectile.dm +++ b/code/modules/projectiles/projectile.dm @@ -302,7 +302,7 @@ var/volume = clamp(vol_by_damage() + 20, 0, 100) if(suppressed) volume = 5 - playsound(loc, hitsound_wall, volume, TRUE, -1) + playsound(loc, hitsound_wall, volume, TRUE, -1, ignore_walls = hitsound_wall) return BULLET_ACT_HIT var/mob/living/L = target diff --git a/code/modules/projectiles/projectile/energy/thermal.dm b/code/modules/projectiles/projectile/energy/thermal.dm index 3ec2865d7021..773c1f2cb10f 100644 --- a/code/modules/projectiles/projectile/energy/thermal.dm +++ b/code/modules/projectiles/projectile/energy/thermal.dm @@ -19,7 +19,7 @@ if(how_cold_is_target < danger_zone) explosion(cold_target, devastation_range = -1, heavy_impact_range = -1, light_impact_range = 2, flame_range = 3) //maybe stand back a bit cold_target.bodytemperature = cold_target.dna.species.bodytemp_normal //avoids repeat explosions, maybe could be used to heat up again? - playsound(cold_target, 'sound/weapons/sear.ogg', 30, TRUE, -1) + playsound(cold_target, 'sound/weapons/sear.ogg', 30, TRUE, -1, ignore_walls = 'sound/weapons/sear.ogg') /obj/projectile/energy/cryo name = "frozen nanite bullet" diff --git a/code/modules/projectiles/projectile/magic.dm b/code/modules/projectiles/projectile/magic.dm index 131cb57d156d..8bdb347574bd 100644 --- a/code/modules/projectiles/projectile/magic.dm +++ b/code/modules/projectiles/projectile/magic.dm @@ -557,7 +557,7 @@ /obj/projectile/magic/spell/juggernaut/on_hit(atom/target, blocked) . = ..() var/turf/target_turf = get_turf(src) - playsound(target_turf, 'sound/weapons/resonator_blast.ogg', 100, FALSE) + playsound(target_turf, 'sound/weapons/resonator_blast.ogg', 100, FALSE, ignore_walls = 'sound/weapons/resonator_blast.ogg') new /obj/effect/temp_visual/cult/sac(target_turf) for(var/obj/adjacent_object in range(1, src)) if(!adjacent_object.density) diff --git a/code/modules/projectiles/projectile/special/meteor.dm b/code/modules/projectiles/projectile/special/meteor.dm index c2edfffe86c6..6ab29b4e4913 100644 --- a/code/modules/projectiles/projectile/special/meteor.dm +++ b/code/modules/projectiles/projectile/special/meteor.dm @@ -13,7 +13,7 @@ . = ..() if(. == BULLET_ACT_HIT && isliving(target)) explosion(target, devastation_range = -1, light_impact_range = 2, flame_range = 0, flash_range = 1, adminlog = FALSE) - playsound(target.loc, 'sound/effects/meteorimpact.ogg', 40, TRUE) + playsound(target.loc, 'sound/effects/meteorimpact.ogg', 40, TRUE, ignore_walls = 'sound/effects/meteorimpact.ogg') /obj/projectile/meteor/Bump(atom/hit_target) if(hit_target == firer) @@ -22,7 +22,7 @@ if(isobj(hit_target) || isturf(hit_target)) EX_ACT(hit_target, EXPLODE_HEAVY) - playsound(src.loc, 'sound/effects/meteorimpact.ogg', 40, TRUE) + playsound(src.loc, 'sound/effects/meteorimpact.ogg', 40, TRUE, ignore_walls = 'sound/effects/meteorimpact.ogg') for(var/mob/onlookers_in_range in urange(10, src)) if(!onlookers_in_range.stat) shake_camera(onlookers_in_range, 3, 1) diff --git a/code/modules/reagents/chemistry/recipes.dm b/code/modules/reagents/chemistry/recipes.dm index 0781c2c9cb25..5b85dd0480d8 100644 --- a/code/modules/reagents/chemistry/recipes.dm +++ b/code/modules/reagents/chemistry/recipes.dm @@ -161,7 +161,7 @@ message_admins(message, 0, 1) log_game("[reaction_name] chemical mob spawn reaction occuring at [AREACOORD(T)] carried by [key_name(M)] with last fingerprint [A.fingerprintslast? A.fingerprintslast : "N/A"]") - playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, TRUE) + playsound(get_turf(holder.my_atom), 'sound/effects/phasein.ogg', 100, TRUE, ignore_walls = 'sound/effects/phasein.ogg') for(var/mob/living/carbon/C in viewers(get_turf(holder.my_atom), null)) C.flash_act() @@ -266,7 +266,7 @@ */ /datum/chemical_reaction/proc/explode_deafen(datum/reagents/holder, datum/equilibrium/equilibrium, power = 3, stun = 20, range = 2) var/location = get_turf(holder.my_atom) - playsound(location, 'sound/effects/bang.ogg', 25, TRUE) + playsound(location, 'sound/effects/bang.ogg', 25, TRUE, ignore_walls = 'sound/effects/bang.ogg') for(var/mob/living/carbon/carbon_mob in get_hearers_in_view(range, location)) carbon_mob.soundbang_act(1, stun, power) @@ -296,7 +296,7 @@ var/turf/this_turf = get_turf(holder.my_atom) if(sound_and_text) holder.my_atom.audible_message("The [holder.my_atom] suddenly explodes, sending a shockwave rippling through the air!") - playsound(this_turf, 'sound/chemistry/shockwave_explosion.ogg', 80, TRUE) + playsound(this_turf, 'sound/chemistry/shockwave_explosion.ogg', 80, TRUE, ignore_walls = 'sound/chemistry/shockwave_explosion.ogg') //Modified goonvortex for(var/atom/movable/movey in orange(range, this_turf)) diff --git a/code/modules/reagents/chemistry/recipes/other.dm b/code/modules/reagents/chemistry/recipes/other.dm index f2f3fcf10f84..78cbadbbc002 100644 --- a/code/modules/reagents/chemistry/recipes/other.dm +++ b/code/modules/reagents/chemistry/recipes/other.dm @@ -463,7 +463,8 @@ /datum/chemical_reaction/scream/on_reaction(datum/reagents/holder, datum/equilibrium/reaction, created_volume) - playsound(holder.my_atom, pick(list( 'sound/voice/human/malescream_1.ogg', 'sound/voice/human/malescream_2.ogg', 'sound/voice/human/malescream_3.ogg', 'sound/voice/human/malescream_4.ogg', 'sound/voice/human/malescream_5.ogg', 'sound/voice/human/malescream_6.ogg', 'sound/voice/human/femalescream_1.ogg', 'sound/voice/human/femalescream_2.ogg', 'sound/voice/human/femalescream_3.ogg', 'sound/voice/human/femalescream_4.ogg', 'sound/voice/human/femalescream_5.ogg', 'sound/voice/human/wilhelm_scream.ogg')), created_volume*5,TRUE) + var/sound_used = pick(list( 'sound/voice/human/malescream_1.ogg', 'sound/voice/human/malescream_2.ogg', 'sound/voice/human/malescream_3.ogg', 'sound/voice/human/malescream_4.ogg', 'sound/voice/human/malescream_5.ogg', 'sound/voice/human/malescream_6.ogg', 'sound/voice/human/femalescream_1.ogg', 'sound/voice/human/femalescream_2.ogg', 'sound/voice/human/femalescream_3.ogg', 'sound/voice/human/femalescream_4.ogg', 'sound/voice/human/femalescream_5.ogg', 'sound/voice/human/wilhelm_scream.ogg')) + playsound(holder.my_atom, sound_used, created_volume*5,TRUE, ignore_walls = sound_used) /datum/chemical_reaction/hair_dye results = list(/datum/reagent/hair_dye = 5) diff --git a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm index d198c1280745..d4a219b51b67 100644 --- a/code/modules/reagents/chemistry/recipes/pyrotechnics.dm +++ b/code/modules/reagents/chemistry/recipes/pyrotechnics.dm @@ -104,7 +104,7 @@ var/turf/T = get_turf(holder.my_atom) ///special size for anti cult effect var/effective_size = round(created_volume/48) - playsound(T, 'sound/effects/pray.ogg', 80, FALSE, effective_size) + playsound(T, 'sound/effects/pray.ogg', 80, FALSE, effective_size, ignore_walls = 'sound/effects/pray.ogg') for(var/mob/living/simple_animal/revenant/R in get_hearers_in_view(7,T)) var/deity if(GLOB.deity) @@ -338,7 +338,7 @@ return holder.remove_reagent(/datum/reagent/sonic_powder, created_volume*3) var/location = get_turf(holder.my_atom) - playsound(location, 'sound/effects/bang.ogg', 25, TRUE) + playsound(location, 'sound/effects/bang.ogg', 25, TRUE, ignore_walls = 'sound/effects/bang.ogg') for(var/mob/living/carbon/C in get_hearers_in_view(created_volume/3, location)) C.soundbang_act(1, 100, rand(0, 5)) @@ -348,7 +348,7 @@ /datum/chemical_reaction/sonic_powder_deafen/on_reaction(datum/reagents/holder, datum/equilibrium/reaction, created_volume) var/location = get_turf(holder.my_atom) - playsound(location, 'sound/effects/bang.ogg', 25, TRUE) + playsound(location, 'sound/effects/bang.ogg', 25, TRUE, ignore_walls = 'sound/effects/bang.ogg') for(var/mob/living/carbon/C in get_hearers_in_view(created_volume/10, location)) C.soundbang_act(1, 100, rand(0, 5)) diff --git a/code/modules/reagents/chemistry/recipes/slime_extracts.dm b/code/modules/reagents/chemistry/recipes/slime_extracts.dm index 5a0c26afb685..1646afcf1dba 100644 --- a/code/modules/reagents/chemistry/recipes/slime_extracts.dm +++ b/code/modules/reagents/chemistry/recipes/slime_extracts.dm @@ -130,7 +130,7 @@ //BORK BORK BORK var/turf/T = get_turf(holder.my_atom) - playsound(T, 'sound/effects/phasein.ogg', 100, TRUE) + playsound(T, 'sound/effects/phasein.ogg', 100, TRUE, ignore_walls = 'sound/effects/phasein.ogg') for(var/mob/living/carbon/C in viewers(T, null)) C.flash_act() diff --git a/code/modules/religion/rites.dm b/code/modules/religion/rites.dm index 133e94ce46f1..86472d4c61b9 100644 --- a/code/modules/religion/rites.dm +++ b/code/modules/religion/rites.dm @@ -234,7 +234,7 @@ GLOB.religious_sect.adjust_favor(favor_gained, user) to_chat(user, span_notice("[GLOB.deity] absorbs the burning corpse and any trace of fire with it. [GLOB.deity] rewards you with [favor_gained] favor.")) chosen_sacrifice.dust(force = TRUE) - playsound(get_turf(religious_tool), 'sound/effects/supermatter.ogg', 50, TRUE) + playsound(get_turf(religious_tool), 'sound/effects/supermatter.ogg', 50, TRUE, ignore_walls = TRUE) chosen_sacrifice = null return TRUE diff --git a/code/modules/research/machinery/_production.dm b/code/modules/research/machinery/_production.dm index c7d4aa7f2ed0..5b46eca386e0 100644 --- a/code/modules/research/machinery/_production.dm +++ b/code/modules/research/machinery/_production.dm @@ -152,7 +152,7 @@ DEFINE_INTERACTABLE(/obj/machinery/rnd/production) new path(get_turf(src)) SSblackbox.record_feedback("nested tally", "item_printed", amount, list("[type]", "[path]")) - playsound(src, 'goon/sounds/chime.ogg', 50, FALSE, ignore_walls = FALSE) + playsound(src, 'goon/sounds/chime.ogg', 50, FALSE) /obj/machinery/rnd/production/proc/can_build_design(datum/design/D, amount) var/coeff = efficient_with(D.build_path) ? efficiency_coeff : 1 diff --git a/code/modules/research/xenobiology/crossbreeding/burning.dm b/code/modules/research/xenobiology/crossbreeding/burning.dm index dbe4f485a211..596b26e14aa6 100644 --- a/code/modules/research/xenobiology/crossbreeding/burning.dm +++ b/code/modules/research/xenobiology/crossbreeding/burning.dm @@ -265,7 +265,7 @@ Burning extracts: /// Inflicts a blastwave upon every mob within a small radius. /obj/item/slimecross/burning/oil/proc/boom() var/turf/T = get_turf(src) - playsound(T, 'sound/effects/explosion2.ogg', 200, TRUE) + playsound(T, 'sound/effects/explosion2.ogg', 200, TRUE, ignore_walls = TRUE) for(var/mob/living/target in range(2, T)) new /obj/effect/temp_visual/explosion(get_turf(target)) EX_ACT(target, EXPLODE_HEAVY) diff --git a/code/modules/shuttle/assault_pod.dm b/code/modules/shuttle/assault_pod.dm index 2577fffd8340..5d3b34e66fb4 100644 --- a/code/modules/shuttle/assault_pod.dm +++ b/code/modules/shuttle/assault_pod.dm @@ -13,7 +13,7 @@ /obj/docking_port/mobile/assault_pod/initiate_docking(obj/docking_port/stationary/S1) . = ..() if(!istype(S1, /obj/docking_port/stationary/transit)) - playsound(get_turf(src.loc), 'sound/effects/explosion1.ogg',50,TRUE) + playsound(get_turf(src.loc), 'sound/effects/explosion1.ogg',50,TRUE, ignore_walls = TRUE) diff --git a/code/modules/slapcrafting/slapcraft_step.dm b/code/modules/slapcrafting/slapcraft_step.dm index 2fe6f290b1ef..4d7e2dff70c4 100644 --- a/code/modules/slapcrafting/slapcraft_step.dm +++ b/code/modules/slapcrafting/slapcraft_step.dm @@ -191,7 +191,7 @@ /datum/slapcraft_step/proc/play_perform_sound(mob/living/user, obj/item/item, obj/item/slapcraft_assembly/assembly) if(!insert_item || !item.drop_sound) return - playsound(assembly, item.drop_sound, DROP_SOUND_VOLUME, ignore_walls = FALSE) + playsound(assembly, item.drop_sound, DROP_SOUND_VOLUME) // Procs to generate strings for description steps. /// Makes a description for the step. diff --git a/code/modules/spells/spell.dm b/code/modules/spells/spell.dm index 27b1cf4d61dd..54e35ca7601a 100644 --- a/code/modules/spells/spell.dm +++ b/code/modules/spells/spell.dm @@ -312,7 +312,7 @@ if(invocation_type != INVOCATION_NONE) invocation() if(sound) - playsound(get_turf(owner), sound, 50, TRUE) + playsound(get_turf(owner), sound, 50, TRUE, ignore_walls = sound) /// The invocation that accompanies the spell, called from spell_feedback() before cast(). /datum/action/cooldown/spell/proc/invocation() diff --git a/code/modules/surgery/machines/vitals_monitor.dm b/code/modules/surgery/machines/vitals_monitor.dm index b9c7a3547af4..e5e02afd9018 100644 --- a/code/modules/surgery/machines/vitals_monitor.dm +++ b/code/modules/surgery/machines/vitals_monitor.dm @@ -99,7 +99,7 @@ DEFINE_INTERACTABLE(/obj/machinery/vitals_monitor) . += image(icon, icon_state = "pulse_flatline") . += image(icon, icon_state = "pulse_warning") if (beep) - playsound(src, 'sound/machines/flatline.ogg', 20) + playsound(src, 'sound/machines/flatline.ogg', 10) if (read_alerts) alerts[PULSE_ALERT] = "Cardiac flatline detected!" diff --git a/code/modules/vehicles/mecha/combat/phazon.dm b/code/modules/vehicles/mecha/combat/phazon.dm index 0c57c3f8f56f..b3d11c3b9d84 100644 --- a/code/modules/vehicles/mecha/combat/phazon.dm +++ b/code/modules/vehicles/mecha/combat/phazon.dm @@ -43,7 +43,7 @@ chassis.balloon_alert(owner,"your punches will now deal toxin damage") chassis.damtype = new_damtype button_icon_state = "mech_damtype_[new_damtype]" - playsound(chassis, 'sound/mecha/mechmove01.ogg', 50, TRUE) + playsound(chassis, 'sound/mecha/mechmove01.ogg', 50, TRUE, ignore_walls = 'sound/mecha/mechmove01.ogg') build_all_button_icons() /datum/action/vehicle/sealed/mecha/mech_toggle_phasing diff --git a/code/modules/vehicles/mecha/combat/savannah_ivanov.dm b/code/modules/vehicles/mecha/combat/savannah_ivanov.dm index 35cea0ae9e6a..4019e06af4bb 100644 --- a/code/modules/vehicles/mecha/combat/savannah_ivanov.dm +++ b/code/modules/vehicles/mecha/combat/savannah_ivanov.dm @@ -95,7 +95,7 @@ switch(skyfall_charge_level) if(1) chassis.visible_message(span_warning("[chassis] clicks and whirrs for a moment, with a low hum emerging from the legs.")) - playsound(chassis, 'sound/items/rped.ogg', 50, TRUE) + playsound(chassis, 'sound/items/rped.ogg', 50, TRUE, ignore_walls = 'sound/items/rped.ogg') if(2) chassis.visible_message(span_warning("[chassis] begins to shake, the sounds of electricity growing louder.")) chassis.Shake(5, 5, SKYFALL_SINGLE_CHARGE_TIME-1) // -1 gives space between the animates, so they don't interrupt eachother @@ -106,12 +106,12 @@ chassis.update_appearance(UPDATE_ICON_STATE) if(4) chassis.visible_message(span_warning("[chassis] sparks and shutters as it finalizes preparation.")) - playsound(chassis, 'sound/mecha/skyfall_power_up.ogg', 50, TRUE) + playsound(chassis, 'sound/mecha/skyfall_power_up.ogg', 50, TRUE, ignore_walls = 'sound/mecha/skyfall_power_up.ogg') chassis.Shake(10, 10, SKYFALL_SINGLE_CHARGE_TIME-1) // -1 gives space between the animates, so they don't interrupt eachother chassis.spark_system.start() if(SKYFALL_CHARGELEVEL_LAUNCH) chassis.visible_message(span_danger("[chassis] leaps into the air!")) - playsound(chassis, 'sound/weapons/gun/general/rocket_launch.ogg', 50, TRUE) + playsound(chassis, 'sound/weapons/gun/general/rocket_launch.ogg', 50, TRUE, ignore_walls = 'sound/weapons/gun/general/rocket_launch.ogg') if(skyfall_charge_level != SKYFALL_CHARGELEVEL_LAUNCH) skyfall_charge_loop() return @@ -156,7 +156,7 @@ */ /datum/action/vehicle/sealed/mecha/skyfall/proc/land() chassis.visible_message(span_danger("[chassis] lands from above!")) - playsound(chassis, 'sound/effects/explosion1.ogg', 50, 1) + playsound(chassis, SFX_EXPLOSION, 50, 1, ignore_walls = TRUE) chassis.resistance_flags &= ~INDESTRUCTIBLE chassis.mecha_flags &= ~(QUIET_STEPS|QUIET_TURNS|CANNOT_INTERACT) chassis.phasing = initial(chassis.phasing) diff --git a/code/modules/vehicles/mecha/equipment/tools/mining_tools.dm b/code/modules/vehicles/mecha/equipment/tools/mining_tools.dm index b36e915cf30e..f0a2828776de 100644 --- a/code/modules/vehicles/mecha/equipment/tools/mining_tools.dm +++ b/code/modules/vehicles/mecha/equipment/tools/mining_tools.dm @@ -57,11 +57,11 @@ while(do_after_mecha(target, source, drill_delay)) if(isliving(target)) drill_mob(target, source) - playsound(src,'sound/weapons/drill.ogg',40,TRUE) + playsound(src,'sound/weapons/drill.ogg',40,TRUE, ignore_walls = 'sound/weapons/drill.ogg') else if(isobj(target)) var/obj/O = target O.take_damage(15, BRUTE, 0, FALSE, get_dir(chassis, target)) - playsound(src,'sound/weapons/drill.ogg',40,TRUE) + playsound(src,'sound/weapons/drill.ogg',40,TRUE, ignore_walls = 'sound/weapons/drill.ogg') // If we caused a qdel drilling the target, we can stop drilling them. // Prevents starting a do_after on a qdeleted target. diff --git a/code/modules/vehicles/mecha/equipment/weapons/weapons.dm b/code/modules/vehicles/mecha/equipment/weapons/weapons.dm index 231c4eca71c1..1298307d20f7 100644 --- a/code/modules/vehicles/mecha/equipment/weapons/weapons.dm +++ b/code/modules/vehicles/mecha/equipment/weapons/weapons.dm @@ -44,7 +44,7 @@ projectile_obj.fire() if(!projectile_obj.suppressed && firing_effect_type) new firing_effect_type(get_turf(src), chassis.dir) - playsound(chassis, fire_sound, 50, TRUE) + playsound(chassis, fire_sound, 50, TRUE, ignore_walls = fire_sound) sleep(max(0, projectile_delay)) @@ -165,7 +165,7 @@ /obj/item/mecha_parts/mecha_equipment/weapon/honker/action(mob/source, atom/target, list/modifiers) if(!action_checks(target)) return - playsound(chassis, 'sound/items/airhorn.ogg', 100, TRUE) + playsound(chassis, 'sound/items/airhorn.ogg', 100, TRUE, ignore_walls = 'sound/items/airhorn.ogg') to_chat(source, "[icon2html(src, source)]HONK") for(var/mob/living/carbon/M in ohearers(6, chassis)) if(!M.can_hear()) @@ -331,7 +331,7 @@ if(!action_checks(target)) return var/obj/O = new projectile(chassis.loc) - playsound(chassis, fire_sound, 50, TRUE) + playsound(chassis, fire_sound, 50, TRUE, ignore_walls = fire_sound) log_message("Launched a [O.name] from [name], targeting [target].", LOG_MECHA) projectiles-- proj_init(O, source) diff --git a/daedalus.dme b/daedalus.dme index 4257aa327acd..217f5ebaf19b 100644 --- a/daedalus.dme +++ b/daedalus.dme @@ -1449,6 +1449,7 @@ #include "code\game\objects\items.dm" #include "code\game\objects\obj_defense.dm" #include "code\game\objects\objs.dm" +#include "code\game\objects\sound_test.dm" #include "code\game\objects\structures.dm" #include "code\game\objects\effects\anomalies.dm" #include "code\game\objects\effects\blessing.dm"