diff --git a/code/__DEFINES/__game.dm b/code/__DEFINES/__game.dm index 6617c5aafcee..e667ccf6db3f 100644 --- a/code/__DEFINES/__game.dm +++ b/code/__DEFINES/__game.dm @@ -105,6 +105,7 @@ #define SOUND_ADMIN_ATMOSPHERIC (1<<7) #define SOUND_ARES_MESSAGE (1<<8) #define SOUND_OBSERVER_ANNOUNCEMENTS (1<<9) +#define SOUND_FAX_MACHINE (1<<10) //toggles_chat #define CHAT_OOC (1<<0) @@ -159,7 +160,7 @@ #define TOGGLES_LANGCHAT_DEFAULT (LANGCHAT_SEE_EMOTES) -#define TOGGLES_SOUND_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|SOUND_INTERNET|SOUND_ADMIN_MEME|SOUND_ADMIN_ATMOSPHERIC|SOUND_OBSERVER_ANNOUNCEMENTS) +#define TOGGLES_SOUND_DEFAULT (SOUND_ADMINHELP|SOUND_MIDI|SOUND_AMBIENCE|SOUND_LOBBY|SOUND_INTERNET|SOUND_ADMIN_MEME|SOUND_ADMIN_ATMOSPHERIC|SOUND_OBSERVER_ANNOUNCEMENTS|SOUND_FAX_MACHINE) #define TOGGLES_FLASHING_DEFAULT (FLASH_ROUNDSTART|FLASH_ROUNDEND|FLASH_CORPSEREVIVE|FLASH_ADMINPM|FLASH_UNNEST) diff --git a/code/game/machinery/fax_machine.dm b/code/game/machinery/fax_machine.dm index b3c981a0cf71..b15117bb2554 100644 --- a/code/game/machinery/fax_machine.dm +++ b/code/game/machinery/fax_machine.dm @@ -387,7 +387,8 @@ GLOBAL_LIST_EMPTY(alldepartments) to_chat(C, msg_admin) else to_chat(C, msg_ghost) - C << 'sound/effects/incoming-fax.ogg' + if(C.prefs?.toggles_sound & SOUND_FAX_MACHINE) + C << 'sound/effects/incoming-fax.ogg' if(msg_ghost) for(var/i in GLOB.observer_list) var/mob/dead/observer/g = i @@ -398,7 +399,8 @@ GLOBAL_LIST_EMPTY(alldepartments) if((R_ADMIN|R_MOD) & C.admin_holder.rights) //staff don't need to see the fax twice continue to_chat(C, msg_ghost) - C << 'sound/effects/incoming-fax.ogg' + if(C.prefs?.toggles_sound & SOUND_FAX_MACHINE) + C << 'sound/effects/incoming-fax.ogg' /obj/structure/machinery/faxmachine/proc/send_fax(datum/fax/faxcontents) diff --git a/code/modules/client/preferences.dm b/code/modules/client/preferences.dm index 2432303a1416..12111e12be3a 100644 --- a/code/modules/client/preferences.dm +++ b/code/modules/client/preferences.dm @@ -596,6 +596,7 @@ GLOBAL_LIST_INIT(bgstate_options, list( dat += "tgui Window Placement: [(tgui_lock) ? "Primary monitor" : "Free (default)"]
" dat += "Play Admin Sounds: [(toggles_sound & SOUND_MIDI) ? "Yes" : "No"]
" dat += "Play Announcement Sounds As Ghost: [(toggles_sound & SOUND_OBSERVER_ANNOUNCEMENTS) ? "Yes" : "No"]
" + dat += "Play Fax Sounds As Ghost: [(toggles_sound & SOUND_FAX_MACHINE) ? "Yes" : "No"]
" dat += "Toggle Meme or Atmospheric Sounds: Toggle
" dat += "Set Eye Blur Type: Set
" dat += "Set Flash Type: Set
" @@ -1850,6 +1851,9 @@ GLOBAL_LIST_INIT(bgstate_options, list( if("hear_observer_announcements") toggles_sound ^= SOUND_OBSERVER_ANNOUNCEMENTS + if("hear_faxes") + toggles_sound ^= SOUND_FAX_MACHINE + if("lobby_music") toggles_sound ^= SOUND_LOBBY if(toggles_sound & SOUND_LOBBY) diff --git a/code/modules/client/preferences_savefile.dm b/code/modules/client/preferences_savefile.dm index db52f58acc68..e261595d300f 100644 --- a/code/modules/client/preferences_savefile.dm +++ b/code/modules/client/preferences_savefile.dm @@ -1,5 +1,5 @@ #define SAVEFILE_VERSION_MIN 8 -#define SAVEFILE_VERSION_MAX 23 +#define SAVEFILE_VERSION_MAX 24 //handles converting savefiles to new formats //MAKE SURE YOU KEEP THIS UP TO DATE! @@ -142,6 +142,12 @@ skin_color = "tan3" S["skin_color"] << skin_color + if(savefile_version < 24) // adds fax machine sounds on by default + var/sound_toggles + S["toggles_sound"] >> sound_toggles + sound_toggles |= (SOUND_FAX_MACHINE) + S["toggles_sound"] << sound_toggles + savefile_version = SAVEFILE_VERSION_MAX return 1 diff --git a/code/modules/client/preferences_toggles.dm b/code/modules/client/preferences_toggles.dm index 9db140f54958..cb3114f6c5a4 100644 --- a/code/modules/client/preferences_toggles.dm +++ b/code/modules/client/preferences_toggles.dm @@ -15,7 +15,7 @@ if(!admin_holder) return prefs.toggles_sound ^= SOUND_ADMINHELP prefs.save_preferences() - to_chat(usr,SPAN_BOLDNOTICE( "You will [(prefs.toggles_sound & SOUND_ADMINHELP) ? "now" : "no longer"] hear a sound when adminhelps arrive.")) + to_chat(usr, SPAN_BOLDNOTICE("You will [(prefs.toggles_sound & SOUND_ADMINHELP) ? "now" : "no longer"] hear a sound when adminhelps arrive.")) /client/proc/toggleprayers() set name = "Show/Hide Prayers" @@ -33,6 +33,14 @@ prefs.save_preferences() to_chat(usr, SPAN_BOLDNOTICE("You will [(prefs.toggles_sound & SOUND_OBSERVER_ANNOUNCEMENTS) ? "now" : "no longer"] hear announcement sounds as an observer.")) +/client/verb/toggle_fax_machine_sounds() + set name = "Hear/Silence Ghost Fax Machines" + set category = "Preferences.Sound" + set desc = "Toggle hearing a notification of faxes while being an observer." + prefs.toggles_sound ^= SOUND_FAX_MACHINE + prefs.save_preferences() + to_chat(usr, SPAN_BOLDNOTICE("You will [(prefs.toggles_sound & SOUND_FAX_MACHINE) ? "now" : "no longer"] hear a fax sounds as an observer.")) + /client/verb/toggletitlemusic() set name = "Hear/Silence LobbyMusic" set category = "Preferences.Sound"