mirror of
https://github.com/VOREStation/VOREStation.git
synced 2026-08-23 12:08:28 +01:00
Whitespace Standardization [MDB IGNORE] (#15748)
* Update settings * Whitespace changes * Comment out merger hooks in gitattributes Corrupt maps would have to be resolved in repo before hooks could be updated * Revert "Whitespace changes" This reverts commitafbdd1d844. * Whitespace again minus example * Gitignore example changelog * Restore changelog merge setting * Keep older dmi hook attribute until hooks can be updated * update vscode settings too * Renormalize remaining * Revert "Gitignore example changelog" This reverts commitde22ad375d. * Attempt to normalize example.yml (and another file I guess) * Try again
This commit is contained in:
@@ -1,126 +1,126 @@
|
||||
/*
|
||||
output_atoms (list of atoms) The destination(s) for the sounds
|
||||
|
||||
mid_sounds (list or soundfile) Since this can be either a list or a single soundfile you can have random sounds. May contain further lists but must contain a soundfile at the end.
|
||||
mid_length (num) The length to wait between playing mid_sounds
|
||||
|
||||
start_sound (soundfile) Played before starting the mid_sounds loop
|
||||
start_length (num) How long to wait before starting the main loop after playing start_sound
|
||||
|
||||
end_sound (soundfile) The sound played after the main loop has concluded
|
||||
|
||||
chance (num) Chance per loop to play a mid_sound
|
||||
volume (num) Sound output volume
|
||||
muted (bool) Private. Used to stop the sound loop.
|
||||
max_loops (num) The max amount of loops to run for.
|
||||
direct (bool) If true plays directly to provided atoms instead of from them
|
||||
opacity_check (bool) If true, things behind walls/opaque things won't hear the sounds.
|
||||
pref_check (type) If set to a /datum/client_preference type, will check if the hearer has that preference active before playing it to them.
|
||||
exclusive (bool) If true, only one of this sound is allowed to play. Relies on if started is true or not. If true, it will not start another loop until it is false.
|
||||
*/
|
||||
/datum/looping_sound
|
||||
var/list/atom/output_atoms
|
||||
var/mid_sounds
|
||||
var/mid_length
|
||||
var/start_sound
|
||||
var/start_length
|
||||
var/end_sound
|
||||
var/chance
|
||||
var/volume = 100
|
||||
var/max_loops
|
||||
var/direct
|
||||
var/vary
|
||||
var/extra_range
|
||||
var/opacity_check
|
||||
var/pref_check
|
||||
var/exclusive
|
||||
|
||||
var/timerid
|
||||
var/started
|
||||
|
||||
/datum/looping_sound/New(list/_output_atoms=list(), start_immediately=FALSE, disable_direct=FALSE)
|
||||
if(!mid_sounds)
|
||||
WARNING("A looping sound datum was created without sounds to play.")
|
||||
return
|
||||
|
||||
output_atoms = _output_atoms
|
||||
if(disable_direct)
|
||||
direct = FALSE
|
||||
|
||||
if(start_immediately)
|
||||
start()
|
||||
|
||||
/datum/looping_sound/Destroy()
|
||||
stop()
|
||||
output_atoms = null
|
||||
return ..()
|
||||
|
||||
/datum/looping_sound/proc/start(atom/add_thing, skip_start_sound = FALSE)
|
||||
if(add_thing)
|
||||
output_atoms |= add_thing
|
||||
if(timerid)
|
||||
return
|
||||
if(skip_start_sound && (!exclusive && !started)) // Skip start sounds optionally, check if we're exclusive AND started already
|
||||
sound_loop()
|
||||
started = TRUE
|
||||
return
|
||||
if(exclusive && started) // Prevents a sound from starting multiple times
|
||||
return // Don't start this loop.
|
||||
on_start()
|
||||
started = TRUE
|
||||
|
||||
/datum/looping_sound/proc/stop(atom/remove_thing, skip_stop_sound = FALSE)
|
||||
if(remove_thing)
|
||||
output_atoms -= remove_thing
|
||||
if(!timerid)
|
||||
return
|
||||
if(!skip_stop_sound)
|
||||
on_stop()
|
||||
deltimer(timerid)
|
||||
timerid = null
|
||||
started = FALSE
|
||||
|
||||
/datum/looping_sound/proc/sound_loop(starttime)
|
||||
if(max_loops && world.time >= starttime + mid_length * max_loops)
|
||||
stop()
|
||||
return
|
||||
if(!chance || prob(chance))
|
||||
play(get_sound(starttime))
|
||||
if(!timerid)
|
||||
timerid = addtimer(CALLBACK(src, PROC_REF(sound_loop), world.time), mid_length, TIMER_STOPPABLE | TIMER_LOOP)
|
||||
|
||||
/datum/looping_sound/proc/play(soundfile)
|
||||
var/list/atoms_cache = output_atoms
|
||||
var/sound/S = sound(soundfile)
|
||||
if(direct)
|
||||
S.channel = SSsounds.random_available_channel()
|
||||
S.volume = volume
|
||||
for(var/i in 1 to atoms_cache.len)
|
||||
var/atom/thing = atoms_cache[i]
|
||||
if(direct)
|
||||
if(ismob(thing))
|
||||
var/mob/M = thing
|
||||
if(pref_check && !M.is_preference_enabled(pref_check))
|
||||
continue
|
||||
SEND_SOUND(thing, S)
|
||||
else
|
||||
playsound(thing, S, volume, vary, extra_range, ignore_walls = !opacity_check, preference = pref_check)
|
||||
|
||||
/datum/looping_sound/proc/get_sound(starttime, _mid_sounds)
|
||||
if(!_mid_sounds)
|
||||
. = mid_sounds
|
||||
else
|
||||
. = _mid_sounds
|
||||
while(!isfile(.) && !isnull(.))
|
||||
. = pickweight(.)
|
||||
|
||||
/datum/looping_sound/proc/on_start()
|
||||
var/start_wait = 1 // On TG this is 0, however it needs to be 1 to work around an issue.
|
||||
if(start_sound)
|
||||
play(start_sound)
|
||||
start_wait = start_length
|
||||
addtimer(CALLBACK(src, PROC_REF(sound_loop)), start_wait)
|
||||
|
||||
/datum/looping_sound/proc/on_stop()
|
||||
if(end_sound)
|
||||
play(end_sound)
|
||||
/*
|
||||
output_atoms (list of atoms) The destination(s) for the sounds
|
||||
|
||||
mid_sounds (list or soundfile) Since this can be either a list or a single soundfile you can have random sounds. May contain further lists but must contain a soundfile at the end.
|
||||
mid_length (num) The length to wait between playing mid_sounds
|
||||
|
||||
start_sound (soundfile) Played before starting the mid_sounds loop
|
||||
start_length (num) How long to wait before starting the main loop after playing start_sound
|
||||
|
||||
end_sound (soundfile) The sound played after the main loop has concluded
|
||||
|
||||
chance (num) Chance per loop to play a mid_sound
|
||||
volume (num) Sound output volume
|
||||
muted (bool) Private. Used to stop the sound loop.
|
||||
max_loops (num) The max amount of loops to run for.
|
||||
direct (bool) If true plays directly to provided atoms instead of from them
|
||||
opacity_check (bool) If true, things behind walls/opaque things won't hear the sounds.
|
||||
pref_check (type) If set to a /datum/client_preference type, will check if the hearer has that preference active before playing it to them.
|
||||
exclusive (bool) If true, only one of this sound is allowed to play. Relies on if started is true or not. If true, it will not start another loop until it is false.
|
||||
*/
|
||||
/datum/looping_sound
|
||||
var/list/atom/output_atoms
|
||||
var/mid_sounds
|
||||
var/mid_length
|
||||
var/start_sound
|
||||
var/start_length
|
||||
var/end_sound
|
||||
var/chance
|
||||
var/volume = 100
|
||||
var/max_loops
|
||||
var/direct
|
||||
var/vary
|
||||
var/extra_range
|
||||
var/opacity_check
|
||||
var/pref_check
|
||||
var/exclusive
|
||||
|
||||
var/timerid
|
||||
var/started
|
||||
|
||||
/datum/looping_sound/New(list/_output_atoms=list(), start_immediately=FALSE, disable_direct=FALSE)
|
||||
if(!mid_sounds)
|
||||
WARNING("A looping sound datum was created without sounds to play.")
|
||||
return
|
||||
|
||||
output_atoms = _output_atoms
|
||||
if(disable_direct)
|
||||
direct = FALSE
|
||||
|
||||
if(start_immediately)
|
||||
start()
|
||||
|
||||
/datum/looping_sound/Destroy()
|
||||
stop()
|
||||
output_atoms = null
|
||||
return ..()
|
||||
|
||||
/datum/looping_sound/proc/start(atom/add_thing, skip_start_sound = FALSE)
|
||||
if(add_thing)
|
||||
output_atoms |= add_thing
|
||||
if(timerid)
|
||||
return
|
||||
if(skip_start_sound && (!exclusive && !started)) // Skip start sounds optionally, check if we're exclusive AND started already
|
||||
sound_loop()
|
||||
started = TRUE
|
||||
return
|
||||
if(exclusive && started) // Prevents a sound from starting multiple times
|
||||
return // Don't start this loop.
|
||||
on_start()
|
||||
started = TRUE
|
||||
|
||||
/datum/looping_sound/proc/stop(atom/remove_thing, skip_stop_sound = FALSE)
|
||||
if(remove_thing)
|
||||
output_atoms -= remove_thing
|
||||
if(!timerid)
|
||||
return
|
||||
if(!skip_stop_sound)
|
||||
on_stop()
|
||||
deltimer(timerid)
|
||||
timerid = null
|
||||
started = FALSE
|
||||
|
||||
/datum/looping_sound/proc/sound_loop(starttime)
|
||||
if(max_loops && world.time >= starttime + mid_length * max_loops)
|
||||
stop()
|
||||
return
|
||||
if(!chance || prob(chance))
|
||||
play(get_sound(starttime))
|
||||
if(!timerid)
|
||||
timerid = addtimer(CALLBACK(src, PROC_REF(sound_loop), world.time), mid_length, TIMER_STOPPABLE | TIMER_LOOP)
|
||||
|
||||
/datum/looping_sound/proc/play(soundfile)
|
||||
var/list/atoms_cache = output_atoms
|
||||
var/sound/S = sound(soundfile)
|
||||
if(direct)
|
||||
S.channel = SSsounds.random_available_channel()
|
||||
S.volume = volume
|
||||
for(var/i in 1 to atoms_cache.len)
|
||||
var/atom/thing = atoms_cache[i]
|
||||
if(direct)
|
||||
if(ismob(thing))
|
||||
var/mob/M = thing
|
||||
if(pref_check && !M.is_preference_enabled(pref_check))
|
||||
continue
|
||||
SEND_SOUND(thing, S)
|
||||
else
|
||||
playsound(thing, S, volume, vary, extra_range, ignore_walls = !opacity_check, preference = pref_check)
|
||||
|
||||
/datum/looping_sound/proc/get_sound(starttime, _mid_sounds)
|
||||
if(!_mid_sounds)
|
||||
. = mid_sounds
|
||||
else
|
||||
. = _mid_sounds
|
||||
while(!isfile(.) && !isnull(.))
|
||||
. = pickweight(.)
|
||||
|
||||
/datum/looping_sound/proc/on_start()
|
||||
var/start_wait = 1 // On TG this is 0, however it needs to be 1 to work around an issue.
|
||||
if(start_sound)
|
||||
play(start_sound)
|
||||
start_wait = start_length
|
||||
addtimer(CALLBACK(src, PROC_REF(sound_loop)), start_wait)
|
||||
|
||||
/datum/looping_sound/proc/on_stop()
|
||||
if(end_sound)
|
||||
play(end_sound)
|
||||
|
||||
@@ -1,45 +1,45 @@
|
||||
/datum/looping_sound/geiger
|
||||
mid_sounds = list(
|
||||
list('sound/items/geiger/low1.ogg'=1, 'sound/items/geiger/low2.ogg'=1, 'sound/items/geiger/low3.ogg'=1, 'sound/items/geiger/low4.ogg'=1),
|
||||
list('sound/items/geiger/med1.ogg'=1, 'sound/items/geiger/med2.ogg'=1, 'sound/items/geiger/med3.ogg'=1, 'sound/items/geiger/med4.ogg'=1),
|
||||
list('sound/items/geiger/high1.ogg'=1, 'sound/items/geiger/high2.ogg'=1, 'sound/items/geiger/high3.ogg'=1, 'sound/items/geiger/high4.ogg'=1),
|
||||
list('sound/items/geiger/ext1.ogg'=1, 'sound/items/geiger/ext2.ogg'=1, 'sound/items/geiger/ext3.ogg'=1, 'sound/items/geiger/ext4.ogg'=1)
|
||||
)
|
||||
mid_length = 1 SECOND
|
||||
volume = 25
|
||||
var/last_radiation
|
||||
|
||||
/datum/looping_sound/geiger/get_sound(starttime)
|
||||
var/danger
|
||||
switch(last_radiation)
|
||||
if(0 to RAD_LEVEL_MODERATE)
|
||||
danger = 1
|
||||
if(RAD_LEVEL_MODERATE to RAD_LEVEL_HIGH)
|
||||
danger = 2
|
||||
if(RAD_LEVEL_HIGH to RAD_LEVEL_VERY_HIGH)
|
||||
danger = 3
|
||||
if(RAD_LEVEL_VERY_HIGH to INFINITY)
|
||||
danger = 4
|
||||
else
|
||||
return null
|
||||
return ..(starttime, mid_sounds[danger])
|
||||
|
||||
/datum/looping_sound/geiger/stop()
|
||||
. = ..()
|
||||
last_radiation = 0
|
||||
|
||||
/datum/looping_sound/small_motor
|
||||
start_sound = 'sound/items/small_motor/motor_start_nopull.ogg'
|
||||
start_length = 2 SECONDS
|
||||
mid_sounds = list(
|
||||
'sound/items/small_motor/motor_idle.ogg',
|
||||
'sound/items/small_motor/motor_fast.ogg',
|
||||
'sound/items/small_motor/motor_faster.ogg'
|
||||
)
|
||||
mid_length = 1.9 SECONDS //someone make this loop better please, i'm no good at sound. the clips should be 2 seconds exact but there's a gap if it's set to 2
|
||||
end_sound = 'sound/items/small_motor/motor_end.ogg'
|
||||
var/speed = 1
|
||||
|
||||
/datum/looping_sound/small_motor/get_sound(starttime)
|
||||
speed = clamp(speed, 1, 3)
|
||||
/datum/looping_sound/geiger
|
||||
mid_sounds = list(
|
||||
list('sound/items/geiger/low1.ogg'=1, 'sound/items/geiger/low2.ogg'=1, 'sound/items/geiger/low3.ogg'=1, 'sound/items/geiger/low4.ogg'=1),
|
||||
list('sound/items/geiger/med1.ogg'=1, 'sound/items/geiger/med2.ogg'=1, 'sound/items/geiger/med3.ogg'=1, 'sound/items/geiger/med4.ogg'=1),
|
||||
list('sound/items/geiger/high1.ogg'=1, 'sound/items/geiger/high2.ogg'=1, 'sound/items/geiger/high3.ogg'=1, 'sound/items/geiger/high4.ogg'=1),
|
||||
list('sound/items/geiger/ext1.ogg'=1, 'sound/items/geiger/ext2.ogg'=1, 'sound/items/geiger/ext3.ogg'=1, 'sound/items/geiger/ext4.ogg'=1)
|
||||
)
|
||||
mid_length = 1 SECOND
|
||||
volume = 25
|
||||
var/last_radiation
|
||||
|
||||
/datum/looping_sound/geiger/get_sound(starttime)
|
||||
var/danger
|
||||
switch(last_radiation)
|
||||
if(0 to RAD_LEVEL_MODERATE)
|
||||
danger = 1
|
||||
if(RAD_LEVEL_MODERATE to RAD_LEVEL_HIGH)
|
||||
danger = 2
|
||||
if(RAD_LEVEL_HIGH to RAD_LEVEL_VERY_HIGH)
|
||||
danger = 3
|
||||
if(RAD_LEVEL_VERY_HIGH to INFINITY)
|
||||
danger = 4
|
||||
else
|
||||
return null
|
||||
return ..(starttime, mid_sounds[danger])
|
||||
|
||||
/datum/looping_sound/geiger/stop()
|
||||
. = ..()
|
||||
last_radiation = 0
|
||||
|
||||
/datum/looping_sound/small_motor
|
||||
start_sound = 'sound/items/small_motor/motor_start_nopull.ogg'
|
||||
start_length = 2 SECONDS
|
||||
mid_sounds = list(
|
||||
'sound/items/small_motor/motor_idle.ogg',
|
||||
'sound/items/small_motor/motor_fast.ogg',
|
||||
'sound/items/small_motor/motor_faster.ogg'
|
||||
)
|
||||
mid_length = 1.9 SECONDS //someone make this loop better please, i'm no good at sound. the clips should be 2 seconds exact but there's a gap if it's set to 2
|
||||
end_sound = 'sound/items/small_motor/motor_end.ogg'
|
||||
var/speed = 1
|
||||
|
||||
/datum/looping_sound/small_motor/get_sound(starttime)
|
||||
speed = clamp(speed, 1, 3)
|
||||
return ..(starttime, mid_sounds[speed])
|
||||
@@ -1,117 +1,117 @@
|
||||
/datum/looping_sound/showering
|
||||
start_sound = 'sound/machines/shower/shower_start.ogg'
|
||||
start_length = 2
|
||||
mid_sounds = list('sound/machines/shower/shower_mid1.ogg'=1,'sound/machines/shower/shower_mid2.ogg'=1,'sound/machines/shower/shower_mid3.ogg'=1)
|
||||
mid_length = 10
|
||||
end_sound = 'sound/machines/shower/shower_end.ogg'
|
||||
volume = 15
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/looping_sound/supermatter
|
||||
mid_sounds = list('sound/machines/sm/loops/calm.ogg'=1)
|
||||
mid_length = 60
|
||||
volume = 40
|
||||
extra_range = 10
|
||||
pref_check = /datum/client_preference/supermatter_hum
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/looping_sound/generator
|
||||
start_sound = 'sound/machines/generator/generator_start.ogg'
|
||||
start_length = 4
|
||||
mid_sounds = list('sound/machines/generator/generator_mid1.ogg'=1, 'sound/machines/generator/generator_mid2.ogg'=1, 'sound/machines/generator/generator_mid3.ogg'=1)
|
||||
mid_length = 4
|
||||
end_sound = 'sound/machines/generator/generator_end.ogg'
|
||||
volume = 40
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/datum/looping_sound/deep_fryer
|
||||
start_sound = 'sound/machines/kitchen/fryer/deep_fryer_immerse.ogg' //my immersions
|
||||
start_length = 10
|
||||
mid_sounds = list('sound/machines/kitchen/fryer/deep_fryer_1.ogg' = 1, 'sound/machines/kitchen/fryer/deep_fryer_2.ogg' = 1)
|
||||
mid_length = 2
|
||||
end_sound = 'sound/machines/kitchen/fryer/deep_fryer_emerge.ogg'
|
||||
volume = 15
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/looping_sound/microwave
|
||||
start_sound = 'sound/machines/kitchen/microwave/microwave-start.ogg'
|
||||
start_length = 10
|
||||
mid_sounds = list('sound/machines/kitchen/microwave/microwave-mid1.ogg'=10, 'sound/machines/kitchen/microwave/microwave-mid2.ogg'=1)
|
||||
mid_length = 10
|
||||
end_sound = 'sound/machines/kitchen/microwave/microwave-end.ogg'
|
||||
volume = 90
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/looping_sound/oven
|
||||
start_sound = 'sound/machines/kitchen/oven/oven-start.ogg'
|
||||
start_length = 10
|
||||
mid_sounds = list('sound/machines/kitchen/oven/oven-mid1.ogg'=10)
|
||||
mid_length = 40
|
||||
end_sound = 'sound/machines/kitchen/oven/oven-stop.ogg'
|
||||
volume = 50
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/looping_sound/grill
|
||||
start_sound = 'sound/machines/kitchen/grill/grill-start.ogg'
|
||||
start_length = 10
|
||||
mid_sounds = list('sound/machines/kitchen/grill/grill-mid1.ogg'=10)
|
||||
mid_length = 40
|
||||
end_sound = 'sound/machines/kitchen/grill/grill-stop.ogg'
|
||||
volume = 50
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/looping_sound/mixer
|
||||
start_sound = 'sound/machines/kitchen/mixer/mixer-start.ogg'
|
||||
start_length = 10
|
||||
mid_sounds = list('sound/machines/kitchen/mixer/mixer-mid1.ogg'=10)
|
||||
mid_length = 10
|
||||
end_sound = 'sound/machines/kitchen/mixer/mixer-stop.ogg'
|
||||
volume = 50
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/looping_sound/cerealmaker
|
||||
start_sound = 'sound/machines/kitchen/cerealmaker/cerealmaker-start.ogg'
|
||||
start_length = 10
|
||||
mid_sounds = list('sound/machines/kitchen/cerealmaker/cerealmaker-mid1.ogg'=10)
|
||||
mid_length = 60
|
||||
end_sound = 'sound/machines/kitchen/cerealmaker/cerealmaker-stop.ogg'
|
||||
volume = 50
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/looping_sound/candymaker
|
||||
start_sound = 'sound/machines/kitchen/candymaker/candymaker-start.ogg'
|
||||
start_length = 10
|
||||
mid_sounds = list('sound/machines/kitchen/candymaker/candymaker-mid1.ogg'=10)
|
||||
mid_length = 40
|
||||
end_sound = 'sound/machines/kitchen/candymaker/candymaker-stop.ogg'
|
||||
volume = 20
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/datum/looping_sound/air_pump
|
||||
start_sound = 'sound/machines/air_pump/airpumpstart.ogg'
|
||||
start_length = 10
|
||||
mid_sounds = list('sound/machines/air_pump/airpumpidle.ogg' = 1)
|
||||
mid_length = 70
|
||||
end_sound = 'sound/machines/air_pump/airpumpshutdown.ogg'
|
||||
volume = 15
|
||||
pref_check = /datum/client_preference/air_pump_noise
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/looping_sound/vehicle_engine
|
||||
start_sound = 'sound/machines/vehicle/engine_start.ogg'
|
||||
start_length = 2
|
||||
mid_sounds = list('sound/machines/vehicle/engine_mid.ogg'=1)
|
||||
mid_length = 6
|
||||
end_sound = 'sound/machines/vehicle/engine_end.ogg'
|
||||
volume = 20
|
||||
/datum/looping_sound/showering
|
||||
start_sound = 'sound/machines/shower/shower_start.ogg'
|
||||
start_length = 2
|
||||
mid_sounds = list('sound/machines/shower/shower_mid1.ogg'=1,'sound/machines/shower/shower_mid2.ogg'=1,'sound/machines/shower/shower_mid3.ogg'=1)
|
||||
mid_length = 10
|
||||
end_sound = 'sound/machines/shower/shower_end.ogg'
|
||||
volume = 15
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/looping_sound/supermatter
|
||||
mid_sounds = list('sound/machines/sm/loops/calm.ogg'=1)
|
||||
mid_length = 60
|
||||
volume = 40
|
||||
extra_range = 10
|
||||
pref_check = /datum/client_preference/supermatter_hum
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/looping_sound/generator
|
||||
start_sound = 'sound/machines/generator/generator_start.ogg'
|
||||
start_length = 4
|
||||
mid_sounds = list('sound/machines/generator/generator_mid1.ogg'=1, 'sound/machines/generator/generator_mid2.ogg'=1, 'sound/machines/generator/generator_mid3.ogg'=1)
|
||||
mid_length = 4
|
||||
end_sound = 'sound/machines/generator/generator_end.ogg'
|
||||
volume = 40
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
/datum/looping_sound/deep_fryer
|
||||
start_sound = 'sound/machines/kitchen/fryer/deep_fryer_immerse.ogg' //my immersions
|
||||
start_length = 10
|
||||
mid_sounds = list('sound/machines/kitchen/fryer/deep_fryer_1.ogg' = 1, 'sound/machines/kitchen/fryer/deep_fryer_2.ogg' = 1)
|
||||
mid_length = 2
|
||||
end_sound = 'sound/machines/kitchen/fryer/deep_fryer_emerge.ogg'
|
||||
volume = 15
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/looping_sound/microwave
|
||||
start_sound = 'sound/machines/kitchen/microwave/microwave-start.ogg'
|
||||
start_length = 10
|
||||
mid_sounds = list('sound/machines/kitchen/microwave/microwave-mid1.ogg'=10, 'sound/machines/kitchen/microwave/microwave-mid2.ogg'=1)
|
||||
mid_length = 10
|
||||
end_sound = 'sound/machines/kitchen/microwave/microwave-end.ogg'
|
||||
volume = 90
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/looping_sound/oven
|
||||
start_sound = 'sound/machines/kitchen/oven/oven-start.ogg'
|
||||
start_length = 10
|
||||
mid_sounds = list('sound/machines/kitchen/oven/oven-mid1.ogg'=10)
|
||||
mid_length = 40
|
||||
end_sound = 'sound/machines/kitchen/oven/oven-stop.ogg'
|
||||
volume = 50
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/looping_sound/grill
|
||||
start_sound = 'sound/machines/kitchen/grill/grill-start.ogg'
|
||||
start_length = 10
|
||||
mid_sounds = list('sound/machines/kitchen/grill/grill-mid1.ogg'=10)
|
||||
mid_length = 40
|
||||
end_sound = 'sound/machines/kitchen/grill/grill-stop.ogg'
|
||||
volume = 50
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/looping_sound/mixer
|
||||
start_sound = 'sound/machines/kitchen/mixer/mixer-start.ogg'
|
||||
start_length = 10
|
||||
mid_sounds = list('sound/machines/kitchen/mixer/mixer-mid1.ogg'=10)
|
||||
mid_length = 10
|
||||
end_sound = 'sound/machines/kitchen/mixer/mixer-stop.ogg'
|
||||
volume = 50
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/looping_sound/cerealmaker
|
||||
start_sound = 'sound/machines/kitchen/cerealmaker/cerealmaker-start.ogg'
|
||||
start_length = 10
|
||||
mid_sounds = list('sound/machines/kitchen/cerealmaker/cerealmaker-mid1.ogg'=10)
|
||||
mid_length = 60
|
||||
end_sound = 'sound/machines/kitchen/cerealmaker/cerealmaker-stop.ogg'
|
||||
volume = 50
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/looping_sound/candymaker
|
||||
start_sound = 'sound/machines/kitchen/candymaker/candymaker-start.ogg'
|
||||
start_length = 10
|
||||
mid_sounds = list('sound/machines/kitchen/candymaker/candymaker-mid1.ogg'=10)
|
||||
mid_length = 40
|
||||
end_sound = 'sound/machines/kitchen/candymaker/candymaker-stop.ogg'
|
||||
volume = 20
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
/datum/looping_sound/air_pump
|
||||
start_sound = 'sound/machines/air_pump/airpumpstart.ogg'
|
||||
start_length = 10
|
||||
mid_sounds = list('sound/machines/air_pump/airpumpidle.ogg' = 1)
|
||||
mid_length = 70
|
||||
end_sound = 'sound/machines/air_pump/airpumpshutdown.ogg'
|
||||
volume = 15
|
||||
pref_check = /datum/client_preference/air_pump_noise
|
||||
|
||||
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
/datum/looping_sound/vehicle_engine
|
||||
start_sound = 'sound/machines/vehicle/engine_start.ogg'
|
||||
start_length = 2
|
||||
mid_sounds = list('sound/machines/vehicle/engine_mid.ogg'=1)
|
||||
mid_length = 6
|
||||
end_sound = 'sound/machines/vehicle/engine_end.ogg'
|
||||
volume = 20
|
||||
|
||||
@@ -1,175 +1,175 @@
|
||||
// These looping sounds work off of a sequence of things (usually letters or numbers) given to them.
|
||||
|
||||
// Base sequencer type.
|
||||
/datum/looping_sound/sequence
|
||||
var/sequence = "The quick brown fox jumps over the lazy dog" // The string to iterate over.
|
||||
var/position = 1 // Where we are inside the sequence. IE the index we're on for the above.
|
||||
var/loop_sequence = TRUE // If it should loop the entire sequence upon reaching the end. Otherwise stop() is called.
|
||||
var/repeat_sequnce_delay = 2 SECONDS // How long to wait when reaching the end, if the above var is true, in deciseconds.
|
||||
var/next_iteration_delay = 0
|
||||
|
||||
/datum/looping_sound/sequence/vv_edit_var(var_name, var_value)
|
||||
if(var_name == "sequence")
|
||||
set_new_sequence(var_value)
|
||||
return ..()
|
||||
|
||||
/datum/looping_sound/sequence/proc/iterate_on_sequence()
|
||||
var/data = get_data_from_position()
|
||||
next_iteration_delay = process_data(data)
|
||||
increment_position()
|
||||
|
||||
/datum/looping_sound/sequence/proc/get_data_from_position()
|
||||
return sequence[position]
|
||||
|
||||
// Override to do something based on the input.
|
||||
/datum/looping_sound/sequence/proc/process_data(input)
|
||||
return
|
||||
|
||||
// Changes the sequence, and sets the position back to the start.
|
||||
/datum/looping_sound/sequence/proc/set_new_sequence(new_sequence)
|
||||
sequence = new_sequence
|
||||
reset_position()
|
||||
|
||||
// Called to advance the position, and handle reaching the end if so.
|
||||
/datum/looping_sound/sequence/proc/increment_position()
|
||||
position++
|
||||
if(position > get_max_position())
|
||||
reached_end_of_sequence()
|
||||
|
||||
/datum/looping_sound/sequence/proc/get_max_position()
|
||||
return length(sequence)
|
||||
|
||||
/datum/looping_sound/sequence/proc/reset_position()
|
||||
position = 1
|
||||
|
||||
// Called when the sequence is finished being iterated over.
|
||||
// If looping is on, the position will be reset, otherwise processing will stop.
|
||||
/datum/looping_sound/sequence/proc/reached_end_of_sequence()
|
||||
if(loop_sequence)
|
||||
next_iteration_delay += repeat_sequnce_delay
|
||||
reset_position()
|
||||
else
|
||||
stop()
|
||||
|
||||
/datum/looping_sound/sequence/sound_loop(starttime)
|
||||
iterate_on_sequence()
|
||||
|
||||
timerid = addtimer(CALLBACK(src, PROC_REF(sound_loop), world.time), next_iteration_delay, TIMER_STOPPABLE)
|
||||
|
||||
#define MORSE_DOT "*" // Yes this is an asterisk but its easier to see on a computer compared to a period.
|
||||
#define MORSE_DASH "-"
|
||||
#define MORSE_BASE_DELAY 1 // If you change this you will also need to change [dot|dash]_soundfile variables.
|
||||
|
||||
// This implements an automatic conversion of text (the sequence) into audible morse code.
|
||||
// This can be useful for flavor purposes. For 'real' usage its suggested to also display the sequence in text form, for the benefit of those without sound.
|
||||
/datum/looping_sound/sequence/morse
|
||||
// This is just to pass validation in the base type.
|
||||
mid_sounds = list('sound/effects/tones/440_sine_01.ogg')
|
||||
mid_length = 1
|
||||
opacity_check = TRUE // So we don't have to constantly hear it when out of sight.
|
||||
|
||||
// Dots.
|
||||
// In Morse Code, the dot's length is one unit.
|
||||
var/dot_soundfile = 'sound/effects/tones/440_sine_01.ogg' // The sound file to play for a 'dot'.
|
||||
var/dot_delay = MORSE_BASE_DELAY // How long the sound above plays for, in deciseconds.
|
||||
|
||||
// Dashes.
|
||||
// In Morse Code, a dash's length is equal to three units (or three dots).
|
||||
var/dash_soundfile = 'sound/effects/tones/440_sine_03.ogg' // The sound file to play for a 'dash'.
|
||||
var/dash_delay = MORSE_BASE_DELAY * 3 // Same as the dot delay, except for the dash sound.
|
||||
|
||||
// Spaces.
|
||||
// In Morse Code, a space's length is equal to one unit (or one dot).
|
||||
var/spaces_between_sounds = MORSE_BASE_DELAY // How many spaces are between parts of the same letter.
|
||||
var/spaces_between_letters = MORSE_BASE_DELAY * 3 // How many spaces are between different letters in the same word.
|
||||
var/spaces_between_words = MORSE_BASE_DELAY * 7 // How many spaces are between different words.
|
||||
|
||||
// Morse Alphabet.
|
||||
// Note that it is case-insensative. 'A' and 'a' will make the same sounds.
|
||||
// Unfortunately there isn't a nice way to implement procedure signs w/o the space inbetween the letters.
|
||||
// Also some of the punctuation isn't super offical/widespread in real life but its the future so *shrug.
|
||||
var/static/list/morse_alphabet = list(
|
||||
"A" = list("*", "-"),
|
||||
"B" = list("-", "*", "*", "*"),
|
||||
"C" = list("-", "*", "-", "*"),
|
||||
"D" = list("-", "*", "*"),
|
||||
"E" = list("*"),
|
||||
"F" = list("*", "*", "-", "*"),
|
||||
"G" = list("-", "-", "*"),
|
||||
"H" = list("*", "*", "*", "*"),
|
||||
"I" = list("*", "*"),
|
||||
"J" = list("*", "-", "-", "-"),
|
||||
"K" = list("-", "*", "-"),
|
||||
"L" = list("*", "-", "*", "*"),
|
||||
"M" = list("*", "*"),
|
||||
"N" = list("-", "*"),
|
||||
"O" = list("-", "-", "-"),
|
||||
"P" = list("*", "-", "-", "*"),
|
||||
"Q" = list("-", "-", "*", "-"),
|
||||
"R" = list("*", "-", "*"),
|
||||
"S" = list("*", "*", "*"),
|
||||
"T" = list("-"),
|
||||
"U" = list("*", "*", "-"),
|
||||
"V" = list("*", "*", "*", "-"),
|
||||
"W" = list("*", "-", "-"),
|
||||
"X" = list("-", "*", "*", "-"),
|
||||
"Y" = list("-", "*", "-", "-"),
|
||||
"Z" = list("-", "-", "*", "*"),
|
||||
|
||||
"1" = list("*", "-", "-", "-", "-"),
|
||||
"2" = list("*", "*", "-", "-", "-"),
|
||||
"3" = list("*", "*", "*", "-", "-"),
|
||||
"4" = list("*", "*", "*", "*", "-"),
|
||||
"5" = list("*", "*", "*", "*", "*"),
|
||||
"6" = list("-", "*", "*", "*", "*"),
|
||||
"7" = list("-", "-", "*", "*", "*"),
|
||||
"8" = list("-", "-", "-", "*", "*"),
|
||||
"9" = list("-", "-", "-", "-", "*"),
|
||||
"0" = list("-", "-", "-", "-", "-"),
|
||||
|
||||
"." = list("*", "-", "*", "-", "*", "-"),
|
||||
"," = list("-", "-", "*", "*", "-", "-"),
|
||||
"?" = list("*", "*", "-", "-", "*", "*"),
|
||||
"'" = list("*", "-", "-", "-", "-", "*"),
|
||||
"!" = list("-", "*", "-", "*", "-", "-"),
|
||||
"/" = list("-", "*", "*", "-", "*"),
|
||||
"(" = list("-", "*", "-", "-", "*"),
|
||||
")" = list("-", "*", "-", "-", "*", "-"),
|
||||
"&" = list("*", "-", "*", "*", "*"),
|
||||
":" = list("-", "-", "-", "*", "*", "*"),
|
||||
";" = list("-", "*", "-", "*", "-", "*"),
|
||||
"=" = list("-", "*", "*", "*", "-"),
|
||||
"+" = list("*", "-", "*", "-", "*"),
|
||||
"-" = list("-", "*", "*", "*", "*", "-"),
|
||||
"_" = list("*", "*", "-", "-", "*", "-"),
|
||||
"\""= list("*", "-", "*", "*", "-", "*"),
|
||||
"$" = list("*", "*", "*", "-", "*", "*", "-"),
|
||||
"@" = list("*", "-", "-", "*", "-", "*"),
|
||||
)
|
||||
|
||||
|
||||
/datum/looping_sound/sequence/morse/process_data(letter)
|
||||
letter = uppertext(letter) // Make it case-insensative.
|
||||
|
||||
// If it's whitespace, treat it as a (Morse) space.
|
||||
if(letter == " ")
|
||||
return spaces_between_words
|
||||
|
||||
if(!(letter in morse_alphabet))
|
||||
CRASH("Encountered invalid character in Morse sequence \"[letter]\".")
|
||||
|
||||
// So I heard you like sequences...
|
||||
// Play a sequence of sounds while inside the current iteration of the outer sequence.
|
||||
var/list/instructions = morse_alphabet[letter]
|
||||
for(var/sound in instructions)
|
||||
if(sound == MORSE_DOT)
|
||||
play(dot_soundfile)
|
||||
sleep(dot_delay)
|
||||
else // It's a dash otherwise.
|
||||
play(dash_soundfile)
|
||||
sleep(dash_delay)
|
||||
sleep(spaces_between_sounds)
|
||||
return spaces_between_letters
|
||||
|
||||
#undef MORSE_DOT
|
||||
#undef MORSE_DASH
|
||||
// These looping sounds work off of a sequence of things (usually letters or numbers) given to them.
|
||||
|
||||
// Base sequencer type.
|
||||
/datum/looping_sound/sequence
|
||||
var/sequence = "The quick brown fox jumps over the lazy dog" // The string to iterate over.
|
||||
var/position = 1 // Where we are inside the sequence. IE the index we're on for the above.
|
||||
var/loop_sequence = TRUE // If it should loop the entire sequence upon reaching the end. Otherwise stop() is called.
|
||||
var/repeat_sequnce_delay = 2 SECONDS // How long to wait when reaching the end, if the above var is true, in deciseconds.
|
||||
var/next_iteration_delay = 0
|
||||
|
||||
/datum/looping_sound/sequence/vv_edit_var(var_name, var_value)
|
||||
if(var_name == "sequence")
|
||||
set_new_sequence(var_value)
|
||||
return ..()
|
||||
|
||||
/datum/looping_sound/sequence/proc/iterate_on_sequence()
|
||||
var/data = get_data_from_position()
|
||||
next_iteration_delay = process_data(data)
|
||||
increment_position()
|
||||
|
||||
/datum/looping_sound/sequence/proc/get_data_from_position()
|
||||
return sequence[position]
|
||||
|
||||
// Override to do something based on the input.
|
||||
/datum/looping_sound/sequence/proc/process_data(input)
|
||||
return
|
||||
|
||||
// Changes the sequence, and sets the position back to the start.
|
||||
/datum/looping_sound/sequence/proc/set_new_sequence(new_sequence)
|
||||
sequence = new_sequence
|
||||
reset_position()
|
||||
|
||||
// Called to advance the position, and handle reaching the end if so.
|
||||
/datum/looping_sound/sequence/proc/increment_position()
|
||||
position++
|
||||
if(position > get_max_position())
|
||||
reached_end_of_sequence()
|
||||
|
||||
/datum/looping_sound/sequence/proc/get_max_position()
|
||||
return length(sequence)
|
||||
|
||||
/datum/looping_sound/sequence/proc/reset_position()
|
||||
position = 1
|
||||
|
||||
// Called when the sequence is finished being iterated over.
|
||||
// If looping is on, the position will be reset, otherwise processing will stop.
|
||||
/datum/looping_sound/sequence/proc/reached_end_of_sequence()
|
||||
if(loop_sequence)
|
||||
next_iteration_delay += repeat_sequnce_delay
|
||||
reset_position()
|
||||
else
|
||||
stop()
|
||||
|
||||
/datum/looping_sound/sequence/sound_loop(starttime)
|
||||
iterate_on_sequence()
|
||||
|
||||
timerid = addtimer(CALLBACK(src, PROC_REF(sound_loop), world.time), next_iteration_delay, TIMER_STOPPABLE)
|
||||
|
||||
#define MORSE_DOT "*" // Yes this is an asterisk but its easier to see on a computer compared to a period.
|
||||
#define MORSE_DASH "-"
|
||||
#define MORSE_BASE_DELAY 1 // If you change this you will also need to change [dot|dash]_soundfile variables.
|
||||
|
||||
// This implements an automatic conversion of text (the sequence) into audible morse code.
|
||||
// This can be useful for flavor purposes. For 'real' usage its suggested to also display the sequence in text form, for the benefit of those without sound.
|
||||
/datum/looping_sound/sequence/morse
|
||||
// This is just to pass validation in the base type.
|
||||
mid_sounds = list('sound/effects/tones/440_sine_01.ogg')
|
||||
mid_length = 1
|
||||
opacity_check = TRUE // So we don't have to constantly hear it when out of sight.
|
||||
|
||||
// Dots.
|
||||
// In Morse Code, the dot's length is one unit.
|
||||
var/dot_soundfile = 'sound/effects/tones/440_sine_01.ogg' // The sound file to play for a 'dot'.
|
||||
var/dot_delay = MORSE_BASE_DELAY // How long the sound above plays for, in deciseconds.
|
||||
|
||||
// Dashes.
|
||||
// In Morse Code, a dash's length is equal to three units (or three dots).
|
||||
var/dash_soundfile = 'sound/effects/tones/440_sine_03.ogg' // The sound file to play for a 'dash'.
|
||||
var/dash_delay = MORSE_BASE_DELAY * 3 // Same as the dot delay, except for the dash sound.
|
||||
|
||||
// Spaces.
|
||||
// In Morse Code, a space's length is equal to one unit (or one dot).
|
||||
var/spaces_between_sounds = MORSE_BASE_DELAY // How many spaces are between parts of the same letter.
|
||||
var/spaces_between_letters = MORSE_BASE_DELAY * 3 // How many spaces are between different letters in the same word.
|
||||
var/spaces_between_words = MORSE_BASE_DELAY * 7 // How many spaces are between different words.
|
||||
|
||||
// Morse Alphabet.
|
||||
// Note that it is case-insensative. 'A' and 'a' will make the same sounds.
|
||||
// Unfortunately there isn't a nice way to implement procedure signs w/o the space inbetween the letters.
|
||||
// Also some of the punctuation isn't super offical/widespread in real life but its the future so *shrug.
|
||||
var/static/list/morse_alphabet = list(
|
||||
"A" = list("*", "-"),
|
||||
"B" = list("-", "*", "*", "*"),
|
||||
"C" = list("-", "*", "-", "*"),
|
||||
"D" = list("-", "*", "*"),
|
||||
"E" = list("*"),
|
||||
"F" = list("*", "*", "-", "*"),
|
||||
"G" = list("-", "-", "*"),
|
||||
"H" = list("*", "*", "*", "*"),
|
||||
"I" = list("*", "*"),
|
||||
"J" = list("*", "-", "-", "-"),
|
||||
"K" = list("-", "*", "-"),
|
||||
"L" = list("*", "-", "*", "*"),
|
||||
"M" = list("*", "*"),
|
||||
"N" = list("-", "*"),
|
||||
"O" = list("-", "-", "-"),
|
||||
"P" = list("*", "-", "-", "*"),
|
||||
"Q" = list("-", "-", "*", "-"),
|
||||
"R" = list("*", "-", "*"),
|
||||
"S" = list("*", "*", "*"),
|
||||
"T" = list("-"),
|
||||
"U" = list("*", "*", "-"),
|
||||
"V" = list("*", "*", "*", "-"),
|
||||
"W" = list("*", "-", "-"),
|
||||
"X" = list("-", "*", "*", "-"),
|
||||
"Y" = list("-", "*", "-", "-"),
|
||||
"Z" = list("-", "-", "*", "*"),
|
||||
|
||||
"1" = list("*", "-", "-", "-", "-"),
|
||||
"2" = list("*", "*", "-", "-", "-"),
|
||||
"3" = list("*", "*", "*", "-", "-"),
|
||||
"4" = list("*", "*", "*", "*", "-"),
|
||||
"5" = list("*", "*", "*", "*", "*"),
|
||||
"6" = list("-", "*", "*", "*", "*"),
|
||||
"7" = list("-", "-", "*", "*", "*"),
|
||||
"8" = list("-", "-", "-", "*", "*"),
|
||||
"9" = list("-", "-", "-", "-", "*"),
|
||||
"0" = list("-", "-", "-", "-", "-"),
|
||||
|
||||
"." = list("*", "-", "*", "-", "*", "-"),
|
||||
"," = list("-", "-", "*", "*", "-", "-"),
|
||||
"?" = list("*", "*", "-", "-", "*", "*"),
|
||||
"'" = list("*", "-", "-", "-", "-", "*"),
|
||||
"!" = list("-", "*", "-", "*", "-", "-"),
|
||||
"/" = list("-", "*", "*", "-", "*"),
|
||||
"(" = list("-", "*", "-", "-", "*"),
|
||||
")" = list("-", "*", "-", "-", "*", "-"),
|
||||
"&" = list("*", "-", "*", "*", "*"),
|
||||
":" = list("-", "-", "-", "*", "*", "*"),
|
||||
";" = list("-", "*", "-", "*", "-", "*"),
|
||||
"=" = list("-", "*", "*", "*", "-"),
|
||||
"+" = list("*", "-", "*", "-", "*"),
|
||||
"-" = list("-", "*", "*", "*", "*", "-"),
|
||||
"_" = list("*", "*", "-", "-", "*", "-"),
|
||||
"\""= list("*", "-", "*", "*", "-", "*"),
|
||||
"$" = list("*", "*", "*", "-", "*", "*", "-"),
|
||||
"@" = list("*", "-", "-", "*", "-", "*"),
|
||||
)
|
||||
|
||||
|
||||
/datum/looping_sound/sequence/morse/process_data(letter)
|
||||
letter = uppertext(letter) // Make it case-insensative.
|
||||
|
||||
// If it's whitespace, treat it as a (Morse) space.
|
||||
if(letter == " ")
|
||||
return spaces_between_words
|
||||
|
||||
if(!(letter in morse_alphabet))
|
||||
CRASH("Encountered invalid character in Morse sequence \"[letter]\".")
|
||||
|
||||
// So I heard you like sequences...
|
||||
// Play a sequence of sounds while inside the current iteration of the outer sequence.
|
||||
var/list/instructions = morse_alphabet[letter]
|
||||
for(var/sound in instructions)
|
||||
if(sound == MORSE_DOT)
|
||||
play(dot_soundfile)
|
||||
sleep(dot_delay)
|
||||
else // It's a dash otherwise.
|
||||
play(dash_soundfile)
|
||||
sleep(dash_delay)
|
||||
sleep(spaces_between_sounds)
|
||||
return spaces_between_letters
|
||||
|
||||
#undef MORSE_DOT
|
||||
#undef MORSE_DASH
|
||||
|
||||
@@ -1,98 +1,98 @@
|
||||
/datum/looping_sound/weather
|
||||
pref_check = /datum/client_preference/weather_sounds
|
||||
|
||||
/datum/looping_sound/weather/outside_blizzard
|
||||
mid_sounds = list(
|
||||
'sound/effects/weather/snowstorm/outside/active_mid1.ogg' = 1,
|
||||
'sound/effects/weather/snowstorm/outside/active_mid1.ogg' = 1,
|
||||
'sound/effects/weather/snowstorm/outside/active_mid1.ogg' = 1
|
||||
)
|
||||
mid_length = 8 SECONDS
|
||||
start_sound = 'sound/effects/weather/snowstorm/outside/active_start.ogg'
|
||||
start_length = 13 SECONDS
|
||||
end_sound = 'sound/effects/weather/snowstorm/outside/active_end.ogg'
|
||||
volume = 40
|
||||
|
||||
/datum/looping_sound/weather/inside_blizzard
|
||||
mid_sounds = list(
|
||||
'sound/effects/weather/snowstorm/inside/active_mid1.ogg' = 1,
|
||||
'sound/effects/weather/snowstorm/inside/active_mid2.ogg' = 1,
|
||||
'sound/effects/weather/snowstorm/inside/active_mid3.ogg' = 1
|
||||
)
|
||||
mid_length = 8 SECONDS
|
||||
start_sound = 'sound/effects/weather/snowstorm/inside/active_start.ogg'
|
||||
start_length = 13 SECONDS
|
||||
end_sound = 'sound/effects/weather/snowstorm/inside/active_end.ogg'
|
||||
volume = 20
|
||||
|
||||
/datum/looping_sound/weather/outside_snow
|
||||
mid_sounds = list(
|
||||
'sound/effects/weather/snowstorm/outside/weak_mid1.ogg' = 1,
|
||||
'sound/effects/weather/snowstorm/outside/weak_mid2.ogg' = 1,
|
||||
'sound/effects/weather/snowstorm/outside/weak_mid3.ogg' = 1
|
||||
)
|
||||
mid_length = 8 SECONDS
|
||||
start_sound = 'sound/effects/weather/snowstorm/outside/weak_start.ogg'
|
||||
start_length = 13 SECONDS
|
||||
end_sound = 'sound/effects/weather/snowstorm/outside/weak_end.ogg'
|
||||
volume = 20
|
||||
|
||||
/datum/looping_sound/weather/inside_snow
|
||||
mid_sounds = list(
|
||||
'sound/effects/weather/snowstorm/inside/weak_mid1.ogg' = 1,
|
||||
'sound/effects/weather/snowstorm/inside/weak_mid2.ogg' = 1,
|
||||
'sound/effects/weather/snowstorm/inside/weak_mid3.ogg' = 1
|
||||
)
|
||||
mid_length = 8 SECONDS
|
||||
start_sound = 'sound/effects/weather/snowstorm/inside/weak_start.ogg'
|
||||
start_length = 13 SECONDS
|
||||
end_sound = 'sound/effects/weather/snowstorm/inside/weak_end.ogg'
|
||||
volume = 10
|
||||
|
||||
/datum/looping_sound/weather/wind
|
||||
mid_sounds = list(
|
||||
'sound/effects/weather/wind/wind_2_1.ogg' = 1,
|
||||
'sound/effects/weather/wind/wind_2_2.ogg' = 1,
|
||||
'sound/effects/weather/wind/wind_3_1.ogg' = 1,
|
||||
'sound/effects/weather/wind/wind_4_1.ogg' = 1,
|
||||
'sound/effects/weather/wind/wind_4_2.ogg' = 1,
|
||||
'sound/effects/weather/wind/wind_5_1.ogg' = 1
|
||||
)
|
||||
mid_length = 10 SECONDS // The lengths for the files vary, but the longest is ten seconds, so this will make it sound like intermittent wind.
|
||||
volume = 45
|
||||
|
||||
// Don't have special sounds so we just make it quieter indoors.
|
||||
/datum/looping_sound/weather/wind/indoors
|
||||
volume = 25
|
||||
|
||||
/datum/looping_sound/weather/wind/gentle
|
||||
volume = 15
|
||||
|
||||
/datum/looping_sound/weather/wind/gentle/indoors
|
||||
volume = 5
|
||||
|
||||
/datum/looping_sound/weather/rain
|
||||
mid_sounds = list(
|
||||
'sound/effects/weather/acidrain_mid.ogg' = 1
|
||||
)
|
||||
mid_length = 15 SECONDS
|
||||
start_sound = 'sound/effects/weather/acidrain_start.ogg'
|
||||
start_length = 13 SECONDS
|
||||
end_sound = 'sound/effects/weather/acidrain_end.ogg'
|
||||
volume = 20
|
||||
|
||||
/datum/looping_sound/weather/rain/heavy
|
||||
volume = 40
|
||||
|
||||
/datum/looping_sound/weather/rain/indoors
|
||||
mid_sounds = list(
|
||||
'sound/effects/weather/indoorrain_mid.ogg' = 1
|
||||
)
|
||||
mid_length = 15 SECONDS
|
||||
start_sound = 'sound/effects/weather/indoorrain_start.ogg'
|
||||
start_length = 13 SECONDS
|
||||
end_sound = 'sound/effects/weather/indoorrain_end.ogg'
|
||||
volume = 20 //Sound is already quieter in file
|
||||
|
||||
/datum/looping_sound/weather/rain/indoors/heavy
|
||||
/datum/looping_sound/weather
|
||||
pref_check = /datum/client_preference/weather_sounds
|
||||
|
||||
/datum/looping_sound/weather/outside_blizzard
|
||||
mid_sounds = list(
|
||||
'sound/effects/weather/snowstorm/outside/active_mid1.ogg' = 1,
|
||||
'sound/effects/weather/snowstorm/outside/active_mid1.ogg' = 1,
|
||||
'sound/effects/weather/snowstorm/outside/active_mid1.ogg' = 1
|
||||
)
|
||||
mid_length = 8 SECONDS
|
||||
start_sound = 'sound/effects/weather/snowstorm/outside/active_start.ogg'
|
||||
start_length = 13 SECONDS
|
||||
end_sound = 'sound/effects/weather/snowstorm/outside/active_end.ogg'
|
||||
volume = 40
|
||||
|
||||
/datum/looping_sound/weather/inside_blizzard
|
||||
mid_sounds = list(
|
||||
'sound/effects/weather/snowstorm/inside/active_mid1.ogg' = 1,
|
||||
'sound/effects/weather/snowstorm/inside/active_mid2.ogg' = 1,
|
||||
'sound/effects/weather/snowstorm/inside/active_mid3.ogg' = 1
|
||||
)
|
||||
mid_length = 8 SECONDS
|
||||
start_sound = 'sound/effects/weather/snowstorm/inside/active_start.ogg'
|
||||
start_length = 13 SECONDS
|
||||
end_sound = 'sound/effects/weather/snowstorm/inside/active_end.ogg'
|
||||
volume = 20
|
||||
|
||||
/datum/looping_sound/weather/outside_snow
|
||||
mid_sounds = list(
|
||||
'sound/effects/weather/snowstorm/outside/weak_mid1.ogg' = 1,
|
||||
'sound/effects/weather/snowstorm/outside/weak_mid2.ogg' = 1,
|
||||
'sound/effects/weather/snowstorm/outside/weak_mid3.ogg' = 1
|
||||
)
|
||||
mid_length = 8 SECONDS
|
||||
start_sound = 'sound/effects/weather/snowstorm/outside/weak_start.ogg'
|
||||
start_length = 13 SECONDS
|
||||
end_sound = 'sound/effects/weather/snowstorm/outside/weak_end.ogg'
|
||||
volume = 20
|
||||
|
||||
/datum/looping_sound/weather/inside_snow
|
||||
mid_sounds = list(
|
||||
'sound/effects/weather/snowstorm/inside/weak_mid1.ogg' = 1,
|
||||
'sound/effects/weather/snowstorm/inside/weak_mid2.ogg' = 1,
|
||||
'sound/effects/weather/snowstorm/inside/weak_mid3.ogg' = 1
|
||||
)
|
||||
mid_length = 8 SECONDS
|
||||
start_sound = 'sound/effects/weather/snowstorm/inside/weak_start.ogg'
|
||||
start_length = 13 SECONDS
|
||||
end_sound = 'sound/effects/weather/snowstorm/inside/weak_end.ogg'
|
||||
volume = 10
|
||||
|
||||
/datum/looping_sound/weather/wind
|
||||
mid_sounds = list(
|
||||
'sound/effects/weather/wind/wind_2_1.ogg' = 1,
|
||||
'sound/effects/weather/wind/wind_2_2.ogg' = 1,
|
||||
'sound/effects/weather/wind/wind_3_1.ogg' = 1,
|
||||
'sound/effects/weather/wind/wind_4_1.ogg' = 1,
|
||||
'sound/effects/weather/wind/wind_4_2.ogg' = 1,
|
||||
'sound/effects/weather/wind/wind_5_1.ogg' = 1
|
||||
)
|
||||
mid_length = 10 SECONDS // The lengths for the files vary, but the longest is ten seconds, so this will make it sound like intermittent wind.
|
||||
volume = 45
|
||||
|
||||
// Don't have special sounds so we just make it quieter indoors.
|
||||
/datum/looping_sound/weather/wind/indoors
|
||||
volume = 25
|
||||
|
||||
/datum/looping_sound/weather/wind/gentle
|
||||
volume = 15
|
||||
|
||||
/datum/looping_sound/weather/wind/gentle/indoors
|
||||
volume = 5
|
||||
|
||||
/datum/looping_sound/weather/rain
|
||||
mid_sounds = list(
|
||||
'sound/effects/weather/acidrain_mid.ogg' = 1
|
||||
)
|
||||
mid_length = 15 SECONDS
|
||||
start_sound = 'sound/effects/weather/acidrain_start.ogg'
|
||||
start_length = 13 SECONDS
|
||||
end_sound = 'sound/effects/weather/acidrain_end.ogg'
|
||||
volume = 20
|
||||
|
||||
/datum/looping_sound/weather/rain/heavy
|
||||
volume = 40
|
||||
|
||||
/datum/looping_sound/weather/rain/indoors
|
||||
mid_sounds = list(
|
||||
'sound/effects/weather/indoorrain_mid.ogg' = 1
|
||||
)
|
||||
mid_length = 15 SECONDS
|
||||
start_sound = 'sound/effects/weather/indoorrain_start.ogg'
|
||||
start_length = 13 SECONDS
|
||||
end_sound = 'sound/effects/weather/indoorrain_end.ogg'
|
||||
volume = 20 //Sound is already quieter in file
|
||||
|
||||
/datum/looping_sound/weather/rain/indoors/heavy
|
||||
volume = 40
|
||||
Reference in New Issue
Block a user