Broad TG Sound Update (#15608)

* Broad TG Sound Update

* jester update
This commit is contained in:
Fox McCloud
2021-02-27 06:59:33 -05:00
committed by GitHub
parent d510702d4f
commit f65c8994ce
58 changed files with 251 additions and 138 deletions
+16 -3
View File
@@ -12,7 +12,14 @@
var/last_use = 0
var/use_delay = 20
/datum/component/squeak/Initialize(custom_sounds, volume_override, chance_override, step_delay_override, use_delay_override, squeak_on_move)
///extra-range for this component's sound
var/sound_extra_range = -1
///when sounds start falling off for the squeak
var/sound_falloff_distance = SOUND_DEFAULT_FALLOFF_DISTANCE
///sound exponent for squeak. Defaults to 10 as squeaking is loud and annoying enough.
var/sound_falloff_exponent = 10
/datum/component/squeak/Initialize(custom_sounds, volume_override, chance_override, step_delay_override, use_delay_override, squeak_on_move, extrarange, falloff_exponent, fallof_distance)
if(!isatom(parent))
return COMPONENT_INCOMPATIBLE
RegisterSignal(parent, list(COMSIG_ATOM_ENTERED, COMSIG_ATOM_BLOB_ACT, COMSIG_ATOM_HULK_ATTACK, COMSIG_PARENT_ATTACKBY), .proc/play_squeak)
@@ -39,6 +46,12 @@
step_delay = step_delay_override
if(isnum(use_delay_override))
use_delay = use_delay_override
if(isnum(extrarange))
sound_extra_range = extrarange
if(isnum(falloff_exponent))
sound_falloff_exponent = falloff_exponent
if(isnum(fallof_distance))
sound_falloff_distance = fallof_distance
/datum/component/squeak/proc/play_squeak()
if(ismob(parent))
@@ -47,9 +60,9 @@
return
if(prob(squeak_chance))
if(!override_squeak_sounds)
playsound(parent, pickweight(default_squeak_sounds), volume, 1, -1)
playsound(parent, pickweight(default_squeak_sounds), volume, TRUE, sound_extra_range, sound_falloff_exponent, falloff_distance = sound_falloff_distance)
else
playsound(parent, pickweight(override_squeak_sounds), volume, 1, -1)
playsound(parent, pickweight(override_squeak_sounds), volume, TRUE, sound_extra_range, sound_falloff_exponent, falloff_distance = sound_falloff_distance)
/datum/component/squeak/proc/step_squeak()
if(steps > step_delay)
+5 -2
View File
@@ -24,10 +24,13 @@
var/end_sound
var/chance
var/volume = 100
var/muted = TRUE
var/vary = FALSE
var/max_loops
var/direct
var/extra_range = 0
var/falloff_exponent
var/muted = TRUE
var/falloff_distance
/datum/looping_sound/New(list/_output_atoms = list(), start_immediately = FALSE, _direct = FALSE)
if(!mid_sounds)
@@ -79,7 +82,7 @@
if(direct)
SEND_SOUND(thing, S)
else
playsound(thing, S, volume, extrarange = extra_range)
playsound(thing, S, volume, vary, extra_range, falloff_exponent = falloff_exponent, falloff_distance = falloff_distance)
/datum/looping_sound/proc/get_sound(looped, _mid_sounds)
if(!_mid_sounds)
@@ -12,4 +12,7 @@
mid_sounds = list('sound/machines/sm/loops/calm.ogg' = 1)
mid_length = 60
volume = 40
extra_range = 10
extra_range = 25
falloff_exponent = 10
falloff_distance = 5
vary = TRUE
+4 -4
View File
@@ -8,7 +8,7 @@
start_sound = 'sound/weather/ashstorm/outside/active_start.ogg'
start_length = 130
end_sound = 'sound/weather/ashstorm/outside/active_end.ogg'
volume = 40
volume = 80
/datum/looping_sound/active_inside_ashstorm
mid_sounds = list(
@@ -20,7 +20,7 @@
start_sound = 'sound/weather/ashstorm/inside/active_start.ogg'
start_length = 130
end_sound = 'sound/weather/ashstorm/inside/active_end.ogg'
volume = 30
volume = 60
/datum/looping_sound/weak_outside_ashstorm
mid_sounds = list(
@@ -32,7 +32,7 @@
start_sound = 'sound/weather/ashstorm/outside/weak_start.ogg'
start_length = 130
end_sound = 'sound/weather/ashstorm/outside/weak_end.ogg'
volume = 20
volume = 50
/datum/looping_sound/weak_inside_ashstorm
mid_sounds = list(
@@ -44,4 +44,4 @@
start_sound = 'sound/weather/ashstorm/inside/weak_start.ogg'
start_length = 130
end_sound = 'sound/weather/ashstorm/inside/weak_end.ogg'
volume = 10
volume = 30