Make gravgen sounds respect announcement preference (#5601)

## 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

🆑
sound: Gravity generator startup/shutdown sounds now respect the
announcement sounds preference.
/🆑
This commit is contained in:
Aeri
2026-05-17 04:11:29 +02:00
committed by GitHub
parent 7a4011ee83
commit adc35e700b
+7 -6
View File
@@ -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