[MIRROR] Audio falloff re-work, and increased audio range. (#1406)

* Audio falloff re-work, and increased audio range.

* a

* a

Co-authored-by: Qustinnus <Floydje123@hotmail.com>
Co-authored-by: Azarak <azarak10@gmail.com>
This commit is contained in:
SkyratBot
2020-10-21 07:36:31 +02:00
committed by GitHub
co-authored by Qustinnus Azarak
parent b9fe7a0402
commit d1315d9474
74 changed files with 204 additions and 134 deletions
@@ -31,7 +31,7 @@
/obj/effect/particle_effect/sparks/LateInitialize()
flick(icon_state, src)
playsound(src, "sparks", 100, TRUE)
playsound(src, "sparks", 100, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
var/turf/T = loc
if(isturf(T))
T.hotspot_expose(1000,100)
+2
View File
@@ -72,6 +72,8 @@ GLOBAL_VAR_INIT(embedpocalypse, FALSE) // if true, all items will be able to emb
var/pickup_sound
///Sound uses when dropping the item, or when its thrown.
var/drop_sound
///Whether or not we use stealthy audio levels for this item's attack sounds
var/stealthy_audio = FALSE
///How large is the object, used for stuff like whether it can fit in backpacks or not
var/w_class = WEIGHT_CLASS_NORMAL
+2 -2
View File
@@ -189,7 +189,7 @@
/obj/item/bikehorn/Initialize()
. = ..()
AddComponent(/datum/component/squeak, list('sound/items/bikehorn.ogg'=1), 50)
AddComponent(/datum/component/squeak, list('sound/items/bikehorn.ogg'=1), 50, falloff_exponent = 20) //die off quick please)
/obj/item/bikehorn/attack(mob/living/carbon/M, mob/living/carbon/user)
if(user != M && ishuman(user))
@@ -212,7 +212,7 @@
/obj/item/bikehorn/airhorn/Initialize()
. = ..()
AddComponent(/datum/component/squeak, list('sound/items/airhorn2.ogg'=1), 50)
AddComponent(/datum/component/squeak, list('sound/items/airhorn2.ogg'=1), 50, falloff_exponent = 20) //die off quick please)
//golden bikehorn
/obj/item/bikehorn/golden
@@ -221,7 +221,7 @@
/obj/item/lightreplacer/proc/Emag()
obj_flags ^= EMAGGED
playsound(src.loc, "sparks", 100, TRUE)
playsound(src.loc, "sparks", 100, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
if(obj_flags & EMAGGED)
name = "shortcircuited [initial(name)]"
else
+1 -1
View File
@@ -89,7 +89,7 @@
/obj/item/card/emag/doorjack/proc/recharge(mob/user)
charges = min(charges+1, max_charges)
playsound(src,'sound/machines/twobeep.ogg',10,TRUE)
playsound(src,'sound/machines/twobeep.ogg',10,TRUE, extrarange = SILENCED_SOUND_EXTRARANGE, falloff_distance = 0)
charge_timers.Remove(charge_timers[1])
/obj/item/card/emag/doorjack/examine(mob/user)
@@ -1,6 +1,7 @@
/obj/item/melee/transforming
sharpness = SHARP_EDGED
bare_wound_bonus = 20
stealthy_audio = TRUE //Most of these are antag weps so we dont want them to be /too/ overt.
var/active = FALSE
var/force_on = 30 //force when active
var/faction_bonus_force = 0 //Bonus force dealt against certain factions
+2 -2
View File
@@ -30,7 +30,7 @@
/obj/item/stack/ore/bluespace_crystal/attack_self(mob/user)
user.visible_message("<span class='warning'>[user] crushes [src]!</span>", "<span class='danger'>You crush [src]!</span>")
new /obj/effect/particle_effect/sparks(loc)
playsound(loc, "sparks", 50, TRUE)
playsound(loc, "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
blink_mob(user)
use(1)
@@ -42,7 +42,7 @@
visible_message("<span class='notice'>[src] fizzles and disappears upon impact!</span>")
var/turf/T = get_turf(hit_atom)
new /obj/effect/particle_effect/sparks(T)
playsound(loc, "sparks", 50, TRUE)
playsound(loc, "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
if(isliving(hit_atom))
blink_mob(hit_atom)
use(1)
@@ -470,7 +470,7 @@
user.visible_message("<span class='warning'>Sparks fly from [src]!</span>",
"<span class='warning'>You scramble [src]'s lock, breaking it open!</span>",
"<span class='hear'>You hear a faint electrical spark.</span>")
playsound(src, "sparks", 50, TRUE)
playsound(src, "sparks", 50, TRUE, SHORT_RANGE_SOUND_EXTRARANGE)
broken = TRUE
locked = FALSE
update_icon()