diff --git a/code/game/sound.dm b/code/game/sound.dm index d9bcabd7baa..d241cb1c25c 100644 --- a/code/game/sound.dm +++ b/code/game/sound.dm @@ -17,7 +17,7 @@ GLOBAL_VAR_INIT(sound_env_dry, 0) return //allocate a channel if necessary now so its the same for everyone - channel = channel || open_sound_channel() + channel = channel || SSsounds.random_available_channel() // Looping through the player list has the added bonus of working for mobs inside containers var/sound/S = sound(get_sfx(soundin)) @@ -71,7 +71,7 @@ GLOBAL_VAR_INIT(sound_distance_offscreen, 7) S = sound(get_sfx(soundin)) S.wait = 0 //No queue - S.channel = channel || open_sound_channel() //SSsounds.random_available_channel() + S.channel = channel || SSsounds.random_available_channel() S.volume = vol // TG EDIT S.environment = GLOB.sound_default_environment diff --git a/code/modules/instruments/songs/play_legacy.dm b/code/modules/instruments/songs/play_legacy.dm index 52b4507f3dd..d41c41e8f46 100644 --- a/code/modules/instruments/songs/play_legacy.dm +++ b/code/modules/instruments/songs/play_legacy.dm @@ -78,5 +78,5 @@ var/sound/music_played = sound(soundfile) for(var/i in hearing_mobs) var/mob/M = i - M.playsound_local(source, null, volume * using_instrument.volume_multiplier, falloff = 5, S = music_played) + M.playsound_local(source, null, volume * using_instrument.volume_multiplier, falloff = 5, S = music_played, preference = /datum/client_preference/instrument_toggle) // Could do environment and echo later but not for now diff --git a/code/modules/instruments/songs/play_synthesized.dm b/code/modules/instruments/songs/play_synthesized.dm index f70e1a86d3c..4d19ae4b395 100644 --- a/code/modules/instruments/songs/play_synthesized.dm +++ b/code/modules/instruments/songs/play_synthesized.dm @@ -80,7 +80,7 @@ last_channel_played = channel_text for(var/i in hearing_mobs) var/mob/M = i - M.playsound_local(get_turf(parent), null, volume, FALSE, K.frequency, INSTRUMENT_DISTANCE_NO_FALLOFF, channel, null, copy, distance_multiplier = INSTRUMENT_DISTANCE_FALLOFF_BUFF) + M.playsound_local(get_turf(parent), null, volume, FALSE, K.frequency, INSTRUMENT_DISTANCE_NO_FALLOFF, FALSE, channel, null, copy, /datum/client_preference/intrument_toggle, distance_multiplier = INSTRUMENT_DISTANCE_FALLOFF_BUFF) // Could do environment and echo later but not for now /datum/song/proc/terminate_all_sounds(clear_channels = TRUE) diff --git a/vorestation.dme b/vorestation.dme index 2e99e85210d..cebd066058b 100644 --- a/vorestation.dme +++ b/vorestation.dme @@ -280,6 +280,7 @@ #include "code\controllers\subsystems\radiation.dm" #include "code\controllers\subsystems\server_maint.dm" #include "code\controllers\subsystems\shuttles.dm" +#include "code\controllers\subsystems\sounds.dm" #include "code\controllers\subsystems\sun.dm" #include "code\controllers\subsystems\time_track.dm" #include "code\controllers\subsystems\timer.dm" @@ -1056,7 +1057,6 @@ #include "code\game\objects\items\devices\tvcamera.dm" #include "code\game\objects\items\devices\uplink.dm" #include "code\game\objects\items\devices\uplink_random_lists.dm" -#include "code\game\objects\items\devices\violin.dm" #include "code\game\objects\items\devices\whistle.dm" #include "code\game\objects\items\devices\communicator\cartridge.dm" #include "code\game\objects\items\devices\communicator\communicator.dm" @@ -2057,6 +2057,22 @@ #include "code\modules\hydroponics\trays\tray_update_icons.dm" #include "code\modules\identification\identification.dm" #include "code\modules\identification\item_procs.dm" +#include "code\modules\instruments\instrument_data\_instrument_data.dm" +#include "code\modules\instruments\instrument_data\_instrument_key.dm" +#include "code\modules\instruments\instrument_data\brass.dm" +#include "code\modules\instruments\instrument_data\chromatic_percussion.dm" +#include "code\modules\instruments\instrument_data\fun.dm" +#include "code\modules\instruments\instrument_data\guitar.dm" +#include "code\modules\instruments\instrument_data\hardcoded.dm" +#include "code\modules\instruments\instrument_data\organ.dm" +#include "code\modules\instruments\instrument_data\piano.dm" +#include "code\modules\instruments\instrument_data\synth_tones.dm" +#include "code\modules\instruments\instruments\item.dm" +#include "code\modules\instruments\instruments\stationary.dm" +#include "code\modules\instruments\songs\_song.dm" +#include "code\modules\instruments\songs\editor.dm" +#include "code\modules\instruments\songs\play_legacy.dm" +#include "code\modules\instruments\songs\play_synthesized.dm" #include "code\modules\integrated_electronics\_defines.dm" #include "code\modules\integrated_electronics\core\assemblies.dm" #include "code\modules\integrated_electronics\core\detailer.dm"