From 7aba38db01986e7cc617e49dc6518fe4b373cfd5 Mon Sep 17 00:00:00 2001 From: VerySoft Date: Sun, 12 Nov 2023 18:59:50 -0500 Subject: [PATCH] LOOC sound Adds a new notification sound for LOOC messages. Similar to the other sounds, this one also has a verb associated for turning it on/off, "Sound-Toggle-LOOC" in the preferences tab --- .../preference_setup/global/setting_datums.dm | 10 +++++++++- code/modules/client/preferences_toggle_procs.dm | 15 +++++++++++++++ code/modules/client/verbs/ooc.dm | 4 ++++ sound/talksounds/looc_sound.ogg | Bin 0 -> 7698 bytes 4 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 sound/talksounds/looc_sound.ogg diff --git a/code/modules/client/preference_setup/global/setting_datums.dm b/code/modules/client/preference_setup/global/setting_datums.dm index f8c0615ef95..cee1b37e176 100644 --- a/code/modules/client/preference_setup/global/setting_datums.dm +++ b/code/modules/client/preference_setup/global/setting_datums.dm @@ -323,6 +323,14 @@ var/list/_client_preferences_by_type enabled_description = "On" disabled_description = "Off" +//RS ADDITION +/datum/client_preference/looc_sounds + description = "LOOC Sound" + key = "LOOC_SOUNDS" + enabled_description = "On" + disabled_description = "Off" +//RS ADDITION END + /datum/client_preference/runechat_mob description = "Runechat (Mobs)" key = "RUNECHAT_MOB" @@ -373,7 +381,7 @@ var/list/_client_preferences_by_type key = "RECEIVE_TIPS" enabled_description = "Enabled" disabled_description = "Disabled" - + /datum/client_preference/pain_frequency description = "Pain Messages Cooldown" key = "PAIN_FREQUENCY" diff --git a/code/modules/client/preferences_toggle_procs.dm b/code/modules/client/preferences_toggle_procs.dm index dff1c3f5a2f..a9ff7cd59da 100644 --- a/code/modules/client/preferences_toggle_procs.dm +++ b/code/modules/client/preferences_toggle_procs.dm @@ -479,6 +479,21 @@ feedback_add_details("admin_verb","TSubtleSounds") +//RS ADDITION +/client/verb/toggle_looc_sounds() + set name = "Sound-Toggle-LOOC" + set category = "Preferences" + set desc = "Toggle hearing a sound when somebody uses LOOC." + + var/pref_path = /datum/client_preference/looc_sounds + toggle_preference(pref_path) + SScharacter_setup.queue_preferences_save(prefs) + + to_chat(src, "You will now [(is_preference_enabled(/datum/client_preference/looc_sounds)) ? "hear" : "not hear"] LOOC sounds.") + + feedback_add_details("admin_verb","TLOOCSounds") +//RS ADDITION END + // Not attached to a pref datum because those are strict binary toggles /client/verb/toggle_examine_mode() set name = "Toggle Examine Mode" diff --git a/code/modules/client/verbs/ooc.dm b/code/modules/client/verbs/ooc.dm index 0a5622752c7..6ccee7fe1dd 100644 --- a/code/modules/client/verbs/ooc.dm +++ b/code/modules/client/verbs/ooc.dm @@ -178,6 +178,10 @@ admin_stuff += "/([key])" to_chat(target, "" + create_text_tag("looc", "LOOC:", target) + " [display_name][admin_stuff]: [msg]") + //RS ADDITION + if(target.is_preference_enabled(/datum/client_preference/looc_sounds)) + target << sound('sound/talksounds/looc_sound.ogg', volume = 50) + //RS ADDITION END for(var/client/target in r_receivers) var/admin_stuff = "/([key])([admin_jump_link(mob, target.holder)])" diff --git a/sound/talksounds/looc_sound.ogg b/sound/talksounds/looc_sound.ogg new file mode 100644 index 0000000000000000000000000000000000000000..d5380a7e60c17f6100ffe47efd9da72107a52534 GIT binary patch literal 7698 zcmeHMdpMM9yT9kyU}!Losb(^m5gKE(kXkbnIYcoiib52nK0?u9d1Ek5lBFRgX&ggm zope?bijdA$r4(wdRjuV~rKA1KsBe91U;DcDwXe1R+Sh*OnRlM^;dkH9{rv8C=C4>0 z0C@Nsm}z4P_Ou&QaFcNB{;@VPHc?fC$IgCjvL2^SG~ni|dj2b@da7!!Ou6q*n=$&A z@RTq%&{R|(92*~FH-GI4MqF&<0`>3=F9wfm&*SpA4h;7E)oWto*G4BsuSw#l#>SDx zx>|^4FTjBSfR$)$J*O(sP(m{m`I+>aiEga=#YE(zn{LMQS$y3hF^^fP6iFAew{+zN zfvQ8cFoiCW2`Nm8#mwOR46B(aC3Qw+v8pnf=-b2HIR@1VDHA3ATqkPAbEgqAiMw+! z4V4WsB;!R5ii`u!s4>gY(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