mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-23 05:00:55 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user