From adc35e700b3aa65eb7ab54e2e2747b00b06f5576 Mon Sep 17 00:00:00 2001 From: Aeri Date: Sat, 16 May 2026 22:11:29 -0400 Subject: [PATCH] Make gravgen sounds respect announcement preference (#5601) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## About The Pull Request Gates the EXTREMELY LOUD gravity generator startup/shutdown sound behind the existing announcement sound preference with the other highly irritating Skyrat announcement sounds. Previously, the gravity generator’s up/down sounds were played directly through `playsound_local()`, which meant they could still play even when a player had disabled announcement sounds. This PR checks `/datum/preference/toggle/sound_announcements` before playing the gravgen sound. This only affects the sound playback. Camera shake and gravity behavior are unchanged. ## Why It's Good For The Game The gravity generator restart sound is loud, lengthy, and announcement-like, so it should respect the same player preference as other announcement sounds. I can distinctly tell that these two sounds are part of the "Skyrat announcer pack" which is mostly dispelled by the sounds. The station still shakes and it makes a softer noise somehow anyways, so I think it works great! This improves preference consistency and gives players who disable announcement sounds a way to avoid what is definitely an announcement sound. ## Changelog :cl: sound: Gravity generator startup/shutdown sounds now respect the announcement sounds preference. /:cl: --- code/modules/power/gravitygenerator.dm | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/code/modules/power/gravitygenerator.dm b/code/modules/power/gravitygenerator.dm index 47f852daac9..1d8b3940bb9 100644 --- a/code/modules/power/gravitygenerator.dm +++ b/code/modules/power/gravitygenerator.dm @@ -425,12 +425,13 @@ GLOBAL_LIST_EMPTY(gravity_generators) */ if(mobs.client) shake_camera(M = mobs, duration = 3.2 SECONDS, strength = 0.5) - mobs.playsound_local( - turf_source = mob_turf, - soundin = alert_sound, - vol = 90, - vary = FALSE, - ) + if(mobs.client.prefs?.read_preference(/datum/preference/toggle/sound_announcements)) + mobs.playsound_local( + turf_source = mob_turf, + soundin = alert_sound, + vol = 90, + vary = FALSE, + ) /* Shut up Skyrat priority announcer //SKYRAT EDIT ADDITON BEGIN if(!SSmapping.level_has_any_trait(z, ZTRAIT_STATION)) // SHUT THE FUCK UP ABANDONED STATIONS, I DON'T CARE