mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 12:41:09 +01:00
## About The Pull Request As the title said, re-adds the radio noise volume slider in the preferences menu. <details> <summary>Images</summary> Before: <img width="920" height="770" alt="image" src="https://github.com/user-attachments/assets/d182f6ed-7968-4fa7-a4df-73d1125e9c32" /> After: <img width="920" height="770" alt="image" src="https://github.com/user-attachments/assets/3e414130-ca04-4f76-8dbb-608bca1b84f4" /> </details> ## Why It's Good For The Game People should be able to adjust the volume of radio beeps, since it can be overwhelmingly loud when radio is really going off. ## Changelog 🆑 fix: Fixed the radio volume slider being missing in game preferences /🆑 --------- Co-authored-by: Ghom <42542238+Ghommie@users.noreply.github.com>
187 lines
6.7 KiB
Plaintext
187 lines
6.7 KiB
Plaintext
/datum/preference/numeric/volume
|
|
abstract_type = /datum/preference/numeric/volume
|
|
minimum = 0
|
|
maximum = 100
|
|
|
|
/datum/preference/numeric/volume/create_default_value()
|
|
return maximum
|
|
|
|
/// Controls ambience volume
|
|
/datum/preference/numeric/volume/sound_ambience_volume
|
|
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
|
|
savefile_key = "sound_ambience_volume"
|
|
savefile_identifier = PREFERENCE_PLAYER
|
|
|
|
/datum/preference/numeric/volume/sound_ambience_volume/apply_to_client(client/client, value)
|
|
client.update_ambience_pref(value)
|
|
|
|
/datum/preference/toggle/sound_breathing
|
|
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
|
|
savefile_key = "sound_breathing"
|
|
savefile_identifier = PREFERENCE_PLAYER
|
|
|
|
/datum/preference/toggle/sound_breathing/apply_to_client_updated(client/client, value)
|
|
var/mob/living/carbon/carbon_mob = client.mob
|
|
if(istype(carbon_mob) && !value)
|
|
carbon_mob.breathing_loop.stop()
|
|
|
|
/// Controls hearing announcement sounds
|
|
/datum/preference/toggle/sound_announcements
|
|
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
|
|
savefile_key = "sound_announcements"
|
|
savefile_identifier = PREFERENCE_PLAYER
|
|
|
|
/// Controls hearing the combat mode sound
|
|
/datum/preference/toggle/sound_combatmode
|
|
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
|
|
savefile_key = "sound_combatmode"
|
|
savefile_identifier = PREFERENCE_PLAYER
|
|
|
|
/// Controls hearing instruments
|
|
/datum/preference/numeric/volume/sound_instruments
|
|
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
|
|
savefile_key = "sound_instruments"
|
|
savefile_identifier = PREFERENCE_PLAYER
|
|
|
|
/// Controls jukebox track volume
|
|
/datum/preference/numeric/volume/sound_jukebox
|
|
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
|
|
savefile_key = "sound_jukebox"
|
|
savefile_identifier = PREFERENCE_PLAYER
|
|
|
|
/datum/preference/numeric/volume/sound_jukebox/apply_to_client_updated(client/client, value)
|
|
var/mob/client_mob = client.mob
|
|
if(!isnull(client_mob))
|
|
SEND_SIGNAL(client_mob, COMSIG_MOB_JUKEBOX_PREFERENCE_APPLIED)
|
|
|
|
/datum/preference/choiced/sound_tts
|
|
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
|
|
savefile_key = "sound_tts"
|
|
savefile_identifier = PREFERENCE_PLAYER
|
|
|
|
/datum/preference/choiced/sound_tts/init_possible_values()
|
|
return list(TTS_SOUND_ENABLED, TTS_SOUND_BLIPS, TTS_SOUND_OFF)
|
|
|
|
/datum/preference/choiced/sound_tts/create_default_value()
|
|
return TTS_SOUND_ENABLED
|
|
|
|
/datum/preference/choiced/sound_tts_radio
|
|
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
|
|
savefile_key = "sound_tts_radio"
|
|
savefile_identifier = PREFERENCE_PLAYER
|
|
|
|
/datum/preference/choiced/sound_tts_radio/init_possible_values()
|
|
return list(TTS_SOUND_ALL_RADIO, TTS_SOUND_DEPARTMENTAL_RADIO, TTS_SOUND_NO_RADIO)
|
|
|
|
/datum/preference/choiced/sound_tts_radio/create_default_value()
|
|
return TTS_SOUND_ALL_RADIO
|
|
|
|
/datum/preference/toggle/sound_tts_hear_self_radio
|
|
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
|
|
savefile_key = "sound_tts_hear_self_radio"
|
|
savefile_identifier = PREFERENCE_PLAYER
|
|
default_value = FALSE // turn this on at your own peril
|
|
|
|
/datum/preference/numeric/volume/sound_tts_volume
|
|
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
|
|
savefile_key = "sound_tts_volume"
|
|
savefile_identifier = PREFERENCE_PLAYER
|
|
|
|
/datum/preference/numeric/volume/sound_tts_volume/apply_to_client_updated(client/client, value)
|
|
var/mob/client_mob = client.mob
|
|
if(!isnull(client_mob))
|
|
SEND_SIGNAL(client_mob, COMSIG_MOB_TTS_VOLUME_PREFERENCE_APPLIED)
|
|
|
|
/datum/preference/numeric/volume/sound_tts_radio_volume
|
|
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
|
|
savefile_key = "sound_tts_radio_volume"
|
|
savefile_identifier = PREFERENCE_PLAYER
|
|
|
|
/datum/preference/numeric/volume/sound_tts_radio_volume/apply_to_client_updated(client/client, value)
|
|
var/mob/client_mob = client.mob
|
|
if(!isnull(client_mob))
|
|
SEND_SIGNAL(client_mob, COMSIG_MOB_TTS_RADIO_VOLUME_PREFERENCE_APPLIED)
|
|
|
|
/datum/preference/numeric/volume/sound_tts_radio_volume/create_default_value()
|
|
return 75
|
|
|
|
/datum/preference/choiced/sound_achievement
|
|
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
|
|
savefile_key = "sound_achievement"
|
|
savefile_identifier = PREFERENCE_PLAYER
|
|
|
|
/datum/preference/choiced/sound_achievement/init_possible_values()
|
|
return list(CHEEVO_SOUND_PING, CHEEVO_SOUND_JINGLE, CHEEVO_SOUND_TADA, CHEEVO_SOUND_OFF)
|
|
|
|
/datum/preference/choiced/sound_achievement/create_default_value()
|
|
return CHEEVO_SOUND_PING
|
|
|
|
/datum/preference/choiced/sound_achievement/apply_to_client_updated(client/client, value)
|
|
var/sound/sound_to_send = LAZYACCESS(GLOB.achievement_sounds, value)
|
|
if(sound_to_send)
|
|
SEND_SOUND(client.mob, sound_to_send)
|
|
|
|
/// Controls hearing lobby music
|
|
/datum/preference/numeric/volume/sound_lobby_volume
|
|
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
|
|
savefile_key = "sound_lobby_volume"
|
|
savefile_identifier = PREFERENCE_PLAYER
|
|
|
|
/datum/preference/numeric/volume/sound_lobby_volume/apply_to_client_updated(client/client, value)
|
|
if (value && isnewplayer(client.mob))
|
|
client.playtitlemusic()
|
|
else
|
|
client.mob.stop_sound_channel(CHANNEL_LOBBYMUSIC)
|
|
|
|
/// Controls hearing admin music
|
|
/datum/preference/numeric/volume/sound_midi
|
|
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
|
|
savefile_key = "sound_midi"
|
|
savefile_identifier = PREFERENCE_PLAYER
|
|
|
|
/// Controls ship ambience volume
|
|
/datum/preference/numeric/volume/sound_ship_ambience_volume
|
|
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
|
|
savefile_key = "sound_ship_ambience_volume"
|
|
savefile_identifier = PREFERENCE_PLAYER
|
|
|
|
/datum/preference/numeric/volume/sound_ship_ambience_volume/apply_to_client_updated(client/client, value)
|
|
client.mob.refresh_looping_ambience()
|
|
|
|
/// Controls radio noise volume
|
|
/datum/preference/numeric/volume/sound_radio_noise
|
|
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
|
|
savefile_key = "sound_radio_noise"
|
|
savefile_identifier = PREFERENCE_PLAYER
|
|
|
|
/// Controls hearing AI VOX announcements
|
|
/datum/preference/numeric/volume/sound_ai_vox
|
|
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
|
|
savefile_key = "sound_ai_vox"
|
|
savefile_identifier = PREFERENCE_PLAYER
|
|
|
|
/// Choice of which ghost poll prompt to use
|
|
/datum/preference/choiced/sound_ghost_poll_prompt
|
|
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
|
|
savefile_key = "sound_ghost_poll_prompt"
|
|
savefile_identifier = PREFERENCE_PLAYER
|
|
|
|
/datum/preference/choiced/sound_ghost_poll_prompt/create_default_value()
|
|
return GHOST_POLL_PROMPT_1
|
|
|
|
/datum/preference/choiced/sound_ghost_poll_prompt/init_possible_values()
|
|
return list(GHOST_POLL_PROMPT_DISABLED, GHOST_POLL_PROMPT_1, GHOST_POLL_PROMPT_2)
|
|
|
|
/// Volume which ghost poll prompts are played at
|
|
/datum/preference/numeric/sound_ghost_poll_prompt_volume
|
|
category = PREFERENCE_CATEGORY_GAME_PREFERENCES
|
|
savefile_key = "sound_ghost_poll_prompt_volume"
|
|
savefile_identifier = PREFERENCE_PLAYER
|
|
|
|
minimum = 0
|
|
maximum = 200
|
|
|
|
/// default value is max/2 because 100 1x modifier, while 200 is 2x
|
|
/datum/preference/numeric/sound_ghost_poll_prompt_volume/create_default_value()
|
|
return maximum/2
|