Adds a new config option to disable ambience and white noise (#22064)

* finally... sweet sweet silence...

* well it works

* oops
This commit is contained in:
Contrabang
2023-09-10 17:12:15 +01:00
committed by GitHub
parent 4f765061fa
commit d4cc3a6297
4 changed files with 13 additions and 1 deletions
@@ -36,6 +36,8 @@
var/starlight = TRUE
/// Disable lobby music?
var/disable_lobby_music = FALSE
/// Disable ambient sound and white noise
var/disable_ambient_noise = FALSE
/// Disable a popup if 2 users are on the same CID?
var/disable_cid_warning_popup = FALSE
/// Amount of loadout points non-donors should get
@@ -97,6 +99,7 @@
CONFIG_LOAD_BOOL(ghost_interaction, data["ghost_interaction"])
CONFIG_LOAD_BOOL(starlight, data["starlight"])
CONFIG_LOAD_BOOL(disable_lobby_music, data["disable_lobby_music"])
CONFIG_LOAD_BOOL(disable_ambient_noise, data["disable_ambient_noise"])
CONFIG_LOAD_BOOL(disable_cid_warning_popup, data["disable_cid_warning_popup"])
CONFIG_LOAD_BOOL(enable_ooc_emoji, data["enable_ooc_emoji"])
CONFIG_LOAD_BOOL(developer_express_start, data["developer_express_start"])
+5 -1
View File
@@ -1,7 +1,7 @@
/// The subsystem used to play ambience to users every now and then, makes them real excited.
SUBSYSTEM_DEF(ambience)
name = "Ambience"
flags = SS_BACKGROUND | SS_NO_INIT
flags = SS_BACKGROUND
priority = FIRE_PRIORITY_AMBIENCE
runlevels = RUNLEVEL_GAME | RUNLEVEL_POSTGAME
wait = 1 SECONDS
@@ -9,6 +9,10 @@ SUBSYSTEM_DEF(ambience)
///Assoc list of listening client - next ambience time
var/list/ambience_listening_clients = list()
/datum/controller/subsystem/ambience/Initialize()
if(GLOB.configuration.general.disable_ambient_noise)
flags |= SS_NO_FIRE
/datum/controller/subsystem/ambience/fire(resumed)
for(var/C in ambience_listening_clients)
var/client/client_iterator = C
+3
View File
@@ -434,6 +434,9 @@
if((oldarea.has_gravity == 0) && (newarea.has_gravity == 1) && (L.m_intent == MOVE_INTENT_RUN)) // Being ready when you change areas gives you a chance to avoid falling all together.
thunk(L)
if(GLOB.configuration.general.disable_ambient_noise)
return
//Ship ambience just loops if turned on.
if(L && L.client && !L.client.ambience_playing && (L.client.prefs.sound & SOUND_BUZZ))
L.client.ambience_playing = TRUE
+2
View File
@@ -298,6 +298,8 @@ ghost_interaction = false
starlight = true
# Disable lobby music on the server
disable_lobby_music = false
# Disable ambient noise and white noise
disable_ambient_noise = false
# Enable this if you want to disable the popup alert for people on the same CID
disable_cid_warning_popup = false
# Amount of loadout points people should get